瀏覽代碼

bufix selectMultiBuffers

Nicolas Cannasse 2 年之前
父節點
當前提交
b3daaf7351
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      h3d/impl/DirectXDriver.hx

+ 4 - 0
h3d/impl/DirectXDriver.hx

@@ -1206,6 +1206,10 @@ class DirectXDriver extends h3d.impl.Driver {
 			layout = makeLayout(formats.resolveMapping(currentShader.format));
 			layout = makeLayout(formats.resolveMapping(currentShader.format));
 			currentShader.layouts.set(-formats.uid-1, layout);
 			currentShader.layouts.set(-formats.uid-1, layout);
 		}
 		}
+		if( layout != currentLayout ) {
+			dx.Driver.iaSetInputLayout(layout);
+			currentLayout = layout;
+		}
 		var map = formats.resolveMapping(currentShader.format);
 		var map = formats.resolveMapping(currentShader.format);
 		var start = -1, max = -1, force = false;
 		var start = -1, max = -1, force = false;
 		for( i in 0...map.length ) {
 		for( i in 0...map.length ) {