فهرست منبع

WebGLRenderer: Fixed handling of indexed buffergeometries with no offsets.

Mr.doob 11 سال پیش
والد
کامیت
322f38b60d
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/renderers/WebGLRenderer.js

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -2611,7 +2611,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 								attributeSize = attributeItem.itemSize;
 								attributeSize = attributeItem.itemSize;
 								_gl.bindBuffer( _gl.ARRAY_BUFFER, attributeItem.buffer );
 								_gl.bindBuffer( _gl.ARRAY_BUFFER, attributeItem.buffer );
 								enableAttribute( attributePointer );
 								enableAttribute( attributePointer );
-								_gl.vertexAttribPointer( attributePointer, attributeSize, _gl.FLOAT, false, 0, startIndex * attributeSize * 4 ); // 4 bytes per Float32
+								_gl.vertexAttribPointer( attributePointer, attributeSize, _gl.FLOAT, false, 0, 0 );
 
 
 							} else if ( material.defaultAttributeValues ) {
 							} else if ( material.defaultAttributeValues ) {