This topic is now archived and is closed to further replies.


Managing Render States.

Recommended Posts

Hello, Two questions: 1) I would like to know how you manage the different render states taht every object will need to render correctly. Do you hard code them in the model class or do you add it to the model information in the file? (any other way to do it?). 2) I have thought about having a switch in my renderer in order to check if a needed render state for the set of triangles I´m gonna to render is set or not, something like: 1 - The renderer has a render list filled with Render Groups that hold info about the different triangles to render and the states needed to render them (for every render group). 2 - The renderer checks for the render states that the next set of triangles needs (here come the switch) and calls SetRenderState, in order to set the render states it needs or unset what it doesn´t. Is this how people does this?, won´t it be too slow to has the switch there, checking every render state change?. NOTE: I´m using directx. Cheers, HexDump.

Share this post

Link to post
Share on other sites