Browse Source

WebGLRenderer: Removed wireframe support on BufferGeometry.
It's going to create more problems than it solves...

Mr.doob 11 years ago
parent
commit
aa4956b402
2 changed files with 9 additions and 5 deletions
  1. 6 0
      src/core/BufferGeometry.js
  2. 3 5
      src/renderers/WebGLRenderer.js

+ 6 - 0
src/core/BufferGeometry.js

@@ -198,6 +198,12 @@ THREE.BufferGeometry.prototype = {
 
 	}(),
 
+	computeFaceNormals: function () {
+
+		// backwards compatibility
+
+	},
+
 	computeVertexNormals: function () {
 
 		if ( this.attributes[ "position" ] ) {

+ 3 - 5
src/renderers/WebGLRenderer.js

@@ -2580,8 +2580,6 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		if ( object instanceof THREE.Mesh ) {
 
-			var mode = material.wireframe === false ? _gl.TRIANGLES : _gl.LINES;
-
 			var index = geometryAttributes[ "index" ];
 
 			if ( index ) {
@@ -2613,7 +2611,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 					}
 
-					_gl.drawElements( mode, index.array.length, type, 0 );
+					_gl.drawElements( _gl.TRIANGLES, index.array.length, type, 0 );
 
 					_this.info.render.calls ++;
 					_this.info.render.vertices += index.array.length; // not really true, here vertices can be shared
@@ -2640,7 +2638,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 						// render indexed triangles
 
-						_gl.drawElements( mode, offsets[ i ].count, type, offsets[ i ].start * size );
+						_gl.drawElements( _gl.TRIANGLES, offsets[ i ].count, type, offsets[ i ].start * size );
 
 						_this.info.render.calls ++;
 						_this.info.render.vertices += offsets[ i ].count; // not really true, here vertices can be shared
@@ -2664,7 +2662,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 				// render non-indexed triangles
 
-				_gl.drawArrays( mode, 0, position.array.length / 3 );
+				_gl.drawArrays( _gl.TRIANGLES, 0, position.array.length / 3 );
 
 				_this.info.render.calls ++;
 				_this.info.render.vertices += position.array.length / 3;