Managing Render States.

Started by
0 comments, last by HexDump 21 years, 7 months ago
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.
Advertisement
Couldn´t anyone pls help here?.

This topic is closed to new replies.

Advertisement