Jelajahi Sumber

bugfix when attribute is optimized out

ncannasse 9 tahun lalu
induk
melakukan
19c5a46b9e
1 mengubah file dengan 4 tambahan dan 1 penghapusan
  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;