Hi All,
I’m porting a fairly large GLUT based application to SDL. These are probably
way basic questions, but the documentation I’m reading is not very clear
about this…
I’m creating a window like this: (variables made explicit for clarity…)
SDL_SetVideoMode( 800, 600, 0, SDL_OPENGL | SDL_RESIZABLE );
SDL_WM_SetCaption( “ApplicationTitle”, “opengl” );
You can see that I’m requesting window resize events. Additionally, I have
the F1 key as a toggle between full screen and a windowed display…
My question is about the correct, or “most correct”, method for handling
resize and full screen toggle events. Right now I re-execute the above logic
(plus set the OpenGL viewport and perspective) and I also call
SDL_WM_SetCaption(). The reason that I ask is because any resizing of the
window causes all my OpenGL textures to be lost. Do I need to delete those
texture objects first and then reinitialize them after the resize operation?
-Blake