Object-Oriented OpenGL
Posted
by
Sullivan
on Game Development
See other posts from Game Development
or by Sullivan
Published on 2012-03-18T00:11:22Z
Indexed on
2012/03/18
18:25 UTC
Read the original article
Hit count: 273
I have been using OpenGL for a while and have read a large number of tutorials. Aside from the fact that a lot of them still use the fixed pipeline, they usually throw all the initialisation, state changes and drawing in one source file. This is fine for the limited scope of a tutorial, but I’m having a hard time working out how to scale it up to a full game.
How do you split your usage of OpenGL across files? Conceptually, I can see the benefits of having, say, a rendering class that purely renders stuff to screen, but how would stuff like shaders and lights work? Should I have separate classes for things like lights and shaders?
© Game Development or respective owner