Jump to content
  • Advertisement
Sign in to follow this  
ajithk

Changing Direct3D state

This topic is 927 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys,

immediateContext->OMSetRenderTargets(1,&renderTargetView,dsv);
immediateContext->UpdateSubresource(buffer,0,NULL,data,0,0);

The above code works, but if I reverse those statements it draws blank. I don't know even what to ask. All right, I will do my best.

Is there a particular sequence in which I need to change state in D3D11. Like for example, if I am setting buffers, shader resources etc should I do all those after shaders are attached to pipeline? Or before? If only I know what the driver is doing inside. Does the question make any sense :(

Share this post


Link to post
Share on other sites
Advertisement
Hi Hodgman,

No, they are unrelated. But I myself feel that the question is too vague for you guys to help me without looking at the code. Anyway, I will observe this issue further in my code and see if I can zero in it exactly.

@Nik02. Yeah. I hope so.

Thanks, guys

Share this post


Link to post
Share on other sites

But I myself feel that the question is too vague for you guys to help me without looking at the code. Anyway, I will observe this issue further in my code and see if I can zero in it exactly.

Try this:

1. Add D3D11_CREATE_DEVICE_DEBUG flag on device creation (D3D11CreateDevice)

2. In debug mode, hit F5 (debugging)

Probably you will see errors in Visual Studio output window.

Edited by Happy SDE

Share this post


Link to post
Share on other sites
@Hodgeman

Sorry friend, What I said earlier is wrong. That 'buffer' did have a connection. Maybe that's the reason.

@Happy SDE

I did that. There are several lines like 'Loaded 'C\Windows\SysWoW64\blahblah.dll,' Cannot find or open the PDB file' .But other than that everything is fine though. They did not affect my output.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!