Jump to content
  • Advertisement
Sign in to follow this  
zdude255

SDL losing OpenGL Context

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

Whenever I do an SDL_SetVideoMode() after my program has already set it once, (For a resolution change or to toggle fullscreen.) it loses the OpenGL context and all I get from GL is a black screen and drawing doesn't work. I've tried restarting SDL entirely, but it just doesn't fix it. Does anyone know a way to get this to work?

Share this post


Link to post
Share on other sites
Advertisement
When you change resolutions, color depth or what have you, you need to reload your textures, reset your viewport and projection matrix and set all states again.

Share this post


Link to post
Share on other sites
hi

i have this problem when changin context, but i load every thing after do it again

screen shot of problem in OGL:
http://psware.persiangig.ir/e/KGE_test/set_video2.jpg

how can i sole this problem?

Share this post


Link to post
Share on other sites
Looks like you need to also reset all the rendering states. It looks to me like depth testing is disabled (or depth writing is disabled?).

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!