Jump to content
  • Advertisement
Sign in to follow this  
Burnhard

Render state management

This topic is 2948 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

How do you all manage render state changes? I made an object on the RAII principle, that resets the render state for all states I'm likely to change, back to default values when the render method of each object ends (and the render state objects goes out of scope). I'm pretty sure this wouldn't work so well if you have thousands of objects to draw though (I've only got a few dozen). I can see from D3D debug output that D3D ignores redundant state changes anyway, so I'm thinking the cost of resetting all render states is pretty minimal. Is there a general principle to apply for this?

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!