Using SDL_FillRect with OpenGL/SDL

Started by
2 comments, last by Sharlin 18 years, 8 months ago
I made a GUI system in SDL when my project was not using OpenGL for hardware accelerated rotation purposes. So when I switched to using OpenGL, the GUI stopped rendering. I was wondering if there was a way to switch to orthographic mode or something in SDL so that functions like SDL_FillRect and SDL_BlitSurface() would work correctly. Thanks for your response!
my siteGenius is 1% inspiration and 99% perspiration
Advertisement
You can use the SDL_OPENGLBLIT flag when calling SDL_SetVideoMode() to make the screen surface accept normal SDL blitting functions, but it's deprecated.
Ok... :( Is this the only way, really? I hope someone else knows another way. Thanks, SiCrane.
my siteGenius is 1% inspiration and 99% perspiration
Well, you can always convert your game wholly to OpenGL... if your engine is well-designed, that shouldn't be too difficult. If not, well, it's a good learning experience :)

This topic is closed to new replies.

Advertisement