提交 aa4956b4 编写于 作者: M Mr.doob

WebGLRenderer: Removed wireframe support on BufferGeometry.

It's going to create more problems than it solves...
上级 61d81ef5
......@@ -198,6 +198,12 @@ THREE.BufferGeometry.prototype = {
}(),
computeFaceNormals: function () {
// backwards compatibility
},
computeVertexNormals: function () {
if ( this.attributes[ "position" ] ) {
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册