Explorar o código

another fix for vertex+fragment buffer binding

Nicolas Cannasse %!s(int64=4) %!d(string=hai) anos
pai
achega
9c75c6adff
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      h3d/impl/GlDriver.hx

+ 1 - 1
h3d/impl/GlDriver.hx

@@ -540,7 +540,7 @@ class GlDriver extends Driver {
 		case Buffers:
 			if( s.buffers != null ) {
 				for( i in 0...s.buffers.length )
-					gl.bindBufferBase(GL2.UNIFORM_BUFFER, i, @:privateAccess buf.buffers[i].buffer.vbuf.b);
+					gl.bindBufferBase(GL2.UNIFORM_BUFFER, s.vertex ? i : curShader.vertex.buffers.length + i, @:privateAccess buf.buffers[i].buffer.vbuf.b);
 			}
 		case Textures:
 			var tcount = s.textures.length;