• Advertisement
Sign in to follow this  

Using SDL_Rect/SDL_Surface with OpenGL

This topic is 3743 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it possible with an OpenGL window in SDL to still somehow use SDL_Rect and other non OpenGL objects on top of the OpenGL window? I'm in the process of making a menu system, but to speed up the process I'd like to use SDL stuff on top of OpenGL instead of writing all the mundane mouse menu items and whatnot in OpenGL. If not, it's what I expected, but I'd still like a professionals opinion.

Share this post


Link to post
Share on other sites
Advertisement
Short answer: No.

Long answer: No. You can only use SDL's rendering in memory when you have an OpenGL window.

Share this post


Link to post
Share on other sites
all tho you cant use rects and the such from sdl when using opengl for rendering you can still use the sdl event manager to handle events which makes it not so mundane.

Share this post


Link to post
Share on other sites
I use SDL surfaces for my menus and GUI objects while my actual game scene is rendered with Opengl.

SDL won't render to the opengl window however a SDL_Surface can be converted into an opengl texture which of course can be rendered.

Share this post


Link to post
Share on other sites
Thanks for the insight guys. This makes quite a bit of sense.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement