I am learning directx. It provides tremendous freedom in how to do something, but it seems that different strategies act differently, and he gives no indication as to how well use patterns can be used.
When using directx, is it typical to swap several new data several times for each rendering?
The most obvious and probably really ineffective way of using it would be this.
Stragety 1
On each individual render
Download everything for model 0 (including textures) and do it (IASetVertexBuffers, VSSetShader, PSSetShader, PSSetShaderResources, PSSetConstantBuffers, VSSetConstantBuffers, Draw)
Download everything for model 1 (including textures) and make it (IASetVertexBuffers, VSSetShader, PSSetShader, PSSetShaderResources, PSSetConstantBuffers, VSSetConstantBuffers, Draw)
etc...
I assume that you can make it more efficient if the biggest things to load are given by dedicated slots, for example. if the texture for model 0 is really complicated, don't reload it at every step, just load it into slot 1 and leave it there. Of course, since I'm not sure how many registers in each of the DX11 exist, this is difficult (can anyone point out the documentation for this?)
Stragety 2
Select multiple texture slots to load, and others to permanently store the most complex textures.
Only once
Load the most complex models, shaders, and textures into slots designed for eternal storage.
On each individual render
Download everything that does not exist for model 0 using the slots that you set aside for loading and rendering (IASetVertexBuffers, VSSetShader, PSSetShader, PSSetShaderResources, PSSetConstantBuffers, VSSetConstantBuffers, Draw)
Download everything that does not exist for model 1 using the slots that you set aside for loading and rendering (IASetVertexBuffers, VSSetShader, PSSetShader, PSSetShaderResources, PSSetConstantBuffers, VSSetConstantBuffers, Draw)
etc...
Strategy 3 I have no idea, but the above is probably all wrong, because I'm really new to this.
What are the standard strategies for efficient directx rendering (specifically DX11) to make it as efficient as possible?
directx graphics rendering directx-11
John robertson
source share