Sign in to follow this  
Burnhard

Render state management

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this