Advertisement

SDL & OpenGL simultaneously?

Started by February 22, 2005 04:00 PM
0 comments, last by Drew_Benton 20 years ago
So I have successfully gotten SDL to display both a bitmap image and also to display an OpenGL window, but these seem to be mutually exlusive modes. I've tried to figure out if I could split the screen and have both an OpenGL window bordered by SDL 2d faces, but so far have been unsuccessful in either finding documentation on how this is possible, or accomplishing it myself. Does anyone know whether this can be done and how?
It *can* be done but is higly advisible not to, but what you need is to use SDL_OPENGLBLIT when you create your screen. Like I said, it is not advisible because it is a 'hack' implemented into SDL to make sure a few things worked with older versions. I do not know how much longer it will stay in the library for it is already depreciated.

When you do that you should be able to do what you have described. However, take a look at how you will need to blit now. When you do this, you will see a significant drop in FPS. Just a note that I have had since, chanced opinions on thse use of that flag since that post [smile]. The new way most perferable is to not use SDL_Surface's at all and rather OpenGL textures in glOrtho mode.

- Drew

This topic is closed to new replies.

Advertisement