How often do calls such as
[source]
m_pD3DDevice->VSSetConstantBuffers( 0, NUMBUFFERS, m_pCBuffers );
m_pD3DDevice->GSSetConstantBuffers( 0, NUMBUFFERS, m_pCBuffers );
m_pD3DDevice->PSSetConstantBuffers( 0, NUMBUFFERS, m_pCBuffers );
[/source]
need to be made?
If all my shaders use the same CBuffers, can I just make the above call once? Say at the start of each frame, or do I need to call it every time I change a shader such as "VSSetShader" ?
Same goes for "PSSetSamplers", "PSSetShaderResources", "VSSetShaderResources". IF the textures and samplers didnt change between me switching shaders, do I still need to set them again when changing shader?