   CommitChanges() functionality for DX10
  There is something that make me wonder...I'll explain my problem :I have to draw 1-10-100-1000 quads with different textures/color/worldmatrix, but the same vertex shader, vertex buffer, index buffer, pixel shader...i need an EFFICIENT way to change only the first parameters...In DX9 we had the CommitChanges that send the changes of the constants into the shader...(in Pix i see that execute just 1 operation for each change and change only the constants)In DX10 lots of people tell to use Pass.Apply() to do the same, but Pass.Apply() actually (as i see in Pix) set again the vertex shader/pixel shader etcetera slowing down the whole system.(making them into number, over 4 quads i recover 0,43 ms each frame by avoiding resetting each time everything. It is quite a bit IMHO)Any idea about HOW i can do something like CommitChanges in DirectX10?   
  You can use a constant buffer that contains only the values that change every frame. When you want to change the value, call UpdateSubresource, then draw.   ;Quote:Original post by sirobYou can use a constant buffer that contains only the values that change every frame. When you want to change the value, call UpdateSubresource, then draw.Omg, i haven't thought about this way. Thanks a lot, i'll try as soon as i can and see what happen. :)   ;  Another little question, what about textures?There is a way to change the texture applied to the shader directly? :( (without having to use Pass.Apply())[Edited by - feal87 on May 23, 2009 2:22:36 PM]