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

Merge pull request #4990 from WestLangley/dev-lines

WebGLRenderer: render LineStrip or LinePieces with indexed BufferGeometry
......@@ -2730,7 +2730,7 @@ THREE.WebGLRenderer = function ( parameters ) {
}
_gl.drawElements( _gl.LINES, index.array.length, type, 0 ); // 2 bytes per Uint16Array
_gl.drawElements( mode, index.array.length, type, 0 ); // 2 bytes per Uint16Array
_this.info.render.calls ++;
_this.info.render.vertices += index.array.length; // not really true, here vertices can be shared
......@@ -2756,7 +2756,7 @@ THREE.WebGLRenderer = function ( parameters ) {
// render indexed lines
_gl.drawElements( _gl.LINES, offsets[ i ].count, type, offsets[ i ].start * size ); // 2 bytes per Uint16Array
_gl.drawElements( mode, offsets[ i ].count, type, offsets[ i ].start * size ); // 2 bytes per Uint16Array
_this.info.render.calls ++;
_this.info.render.vertices += offsets[ i ].count; // not really true, here vertices can be shared
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册