• Advertisement
Sign in to follow this  

SDL losing OpenGL Context

This topic is 3660 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
And I discovered that GLTT is using some sort of texture. I really should've realized this. Thanks.

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