Original Post
I have a question relating to OO and graphics. I have a GUI object in my engine called hbStaticBitmap. It contains a reference to a bitmap which is stored as a pointer to an SDL surface. When I want to render the bitmap, where should the logic for this go? Should the rendering logic be in the hbStaticBitmap::Render() function, or should the logic be elsewhere to prevent the code from being littered with OpenGL calls? The main problem is that the hbStaticBitmap object is contained in the Gui DLL, while the code for initialising, clearing and swapping OpenGL buffers is in a different DLL. That isn''t a problem in the sense that code can be accessed, but from an OO point of view the two should be separate. Any suggestions?
Thanks