Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

'Shader resource view' problem

$
0
0
Hi Guys, I am revisiting an old DX11 framework I was creating a while back and am scratching my head with a small issue. I am trying to set the pixel shader resources and am getting the following error on every loop. As you can see in the below code, I am clearing out the shader resources as per the documentation. (Even going overboard and doing it both sides of the main PSSet call). But I just can't get rid of the error. Which results in the render target not being drawn. ID3D11ShaderResourceView* srv = { 0 }; d3dContext->PSSetShaderResources(0, 1, &srv); for (std::vector<RenderTarget>::iterator it = rtVector.begin(); it != rtVector.end(); ++it) { if (it->szName == name) { //std::cout << it->srv <<"\r\n"; d3dContext->PSSetShaderResources(0, 1, &it->srv); break; } } d3dContext->PSSetShaderResources(0, 1, &srv); I am storing the RT's in a vector and setting them by name. I have tested the it->srv and am retrieving a valid pointer. At this stage I am out of ideas. Any help would be greatly appreciated

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>