Przeglądaj źródła

fixed drawIndexedIndirect (only perform a single command at once)

Nicolas Cannasse 3 lat temu
rodzic
commit
3ec00d98e3
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      h3d/impl/DirectXDriver.hx

+ 4 - 2
h3d/impl/DirectXDriver.hx

@@ -1312,8 +1312,10 @@ class DirectXDriver extends h3d.impl.Driver {
 			#else
 			#else
 			dx.Driver.drawIndexedInstanced(commands.indexCount, commands.commandCount, commands.startIndex, 0, 0);
 			dx.Driver.drawIndexedInstanced(commands.indexCount, commands.commandCount, commands.startIndex, 0, 0);
 			#end
 			#end
-		} else
-			dx.Driver.drawIndexedInstancedIndirect(commands.data, 0);
+		} else {
+			for( i in 0...commands.commandCount )
+				dx.Driver.drawIndexedInstancedIndirect(commands.data,i * 20);
+		}
 	}
 	}
 
 
 	static var COMPARE : Array<ComparisonFunc> = [
 	static var COMPARE : Array<ComparisonFunc> = [