소스 검색

bugfix when attribute is optimized out

ncannasse 9 년 전
부모
커밋
19c5a46b9e
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      h3d/impl/GlDriver.hx

+ 4 - 1
h3d/impl/GlDriver.hx

@@ -195,7 +195,10 @@ class GlDriver extends Driver {
 					default: throw "assert " + v.type;
 					}
 					var index = gl.getAttribLocation(p.p, glout.varNames.get(v.id));
-					if( index < 0 ) continue;
+					if( index < 0 ) {
+						p.stride += size;
+						continue;
+					}
 					p.attribs.push( { offset : p.stride, index : index, size:size, type:t } );
 					p.attribNames.push(v.name);
 					p.stride += size;