SDL losing OpenGL Context

Started by
3 comments, last by gharen2 16 years, 2 months ago
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?
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.
And I discovered that GLTT is using some sort of texture. I really should've realized this. Thanks.
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?
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?).

This topic is closed to new replies.

Advertisement