I got that shader specification from id software and now I want to get some of those shader functions working in my code.
My question is: There are a ton of things that can be custimized (everying from culling to vertex colors, to texture scaling, to much much more). This equates to a lot of opengl state changes. This is bad. I know now that I could sort my polygons so that all polygons with similar shaders would be rendered in order, but I’m not sure if this will be possible once I get bsp trees working. Either way we’re talking about some serious state changing. Whats the best way to do this? The best way I can think of is to have a big struct that holds all the shader info and then a bunch of if statements before rendering that is set by this structure. This seems slow since I’ll be doing it alot. Another idea I have is using display lists to hold these state changes, but there are so many I’m not sure it would be worth holding all these lists. What do you guys think?