Switching to fullscreen back and forth

Hello,

It is possible to start an application in a normal OpenGL window, then
sometimes zoom to fullscreen, and later on go back to normal ?

I guess that I can use SDL_SetVideoMode each time but:

  • is it acceptable to do so ? (didn’t look the source sorry)
  • what about the OpenGL attributes ? Do I have to call SDL_GL_SetAttribute
    each time ?

Thanks,
Christopher

It is possible to start an application in a normal OpenGL window, then
sometimes zoom to fullscreen, and later on go back to normal ?

Yes.

I guess that I can use SDL_SetVideoMode each time but:

  • is it acceptable to do so ? (didn’t look the source sorry)

Yes. You should, for better results, try SDL_WM_ToggleFullScreen() first,
and see if that suceeds, because it results in less window/context
juggling on systems that support it (Currently, X11 is the only one that
does).

  • what about the OpenGL attributes ? Do I have to call SDL_GL_SetAttribute
    each time ?

I would recommend it.

–ryan.