Jump to content
  • Advertisement
Sign in to follow this  

Some SDL/OpenGL Win32 ResizeEvent hack !?

This topic is 4525 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

There was a major problem for me using SDL+OpenGL on Win2k: The std method for resizing a window (re-calling SDL_SetVideoMode()) re-creates the OpenGL context flushing all textures, etc. this way... Now I found some work-around, which seems to make the SDL_SetVideoMode() call obsolete & is fine for me: Catch the respective SDL_ResizeEvent and write new width & height into SDL_GetVideoSurface()'s result (don't forget to adjust glViewport) - yes, I know: this surface pointer is supposed to be read-only - but hey, it works! Is this work-around documented somewhere ? Does it work for any other Win32 platforms ?

Share this post

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!