I'm at the beginning of organizing a simple framework to build a game on. So far the SDL game engine framework here on the site has been very useful.
http://content.gpwiki.org/index.php/SDL:Tutorials:Simple_Engine_FrameworkThe simple engine framework is straightforward and very easy to use. Excellent code.
My problem is that as I'm learning the basics of OpenGL, I don't have a good perspective on how to create a drawing routine. It seems that if you want to get something on screen in a drawing loop, the function would have to be huge. I don't have a way to organize it yet, which is why I'm here asking this question.
Using the above mentioned framework (the only change is initializing opengl). What would be the best way to setup the DoRender function to display a tilemap and characters above it. I'm not exactly looking for code, but if thats how you have an example, that would be fine. I'm just looking to figure out, how to organize my OpenGL commands, so it's consistent and dynamic instead of just dumping everything into a huge DoRender function.
If you have ever done this, please share. If you program in SDL but Not OpenGL, you are welcome to comment, I am also looking at SDL samples to compare to SDL/OpenGL.