Explorar el Código

bugfix when attribute is optimized out

ncannasse hace 9 años
padre
commit
19c5a46b9e
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  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;