提交 c43ea38d 编写于 作者: D Dan V

Render buffer geometry lines/particles separately from buffer update

上级 a6e9f9cd
......@@ -2708,16 +2708,16 @@ THREE.WebGLRenderer = function ( parameters ) {
}
var position = geometryAttributes[ "position" ];
}
// render particles
var position = geometryAttributes[ "position" ];
_gl.drawArrays( _gl.POINTS, 0, position.numItems / 3 );
// render particles
_this.info.render.calls ++;
_this.info.render.points += position.numItems / 3;
_gl.drawArrays( _gl.POINTS, 0, position.numItems / 3 );
}
_this.info.render.calls ++;
_this.info.render.points += position.numItems / 3;
} else if ( object instanceof THREE.Line ) {
......@@ -2755,22 +2755,22 @@ THREE.WebGLRenderer = function ( parameters ) {
}
// render lines
}
var primitives = ( object.type === THREE.LineStrip ) ? _gl.LINE_STRIP : _gl.LINES;
// render lines
setLineWidth( material.linewidth );
var primitives = ( object.type === THREE.LineStrip ) ? _gl.LINE_STRIP : _gl.LINES;
var position = geometryAttributes[ "position" ];
setLineWidth( material.linewidth );
_gl.drawArrays( primitives, 0, position.numItems / 3 );
var position = geometryAttributes[ "position" ];
_this.info.render.calls ++;
_this.info.render.points += position.numItems;
_gl.drawArrays( primitives, 0, position.numItems / 3 );
}
_this.info.render.calls ++;
_this.info.render.points += position.numItems;
}
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册