OpenGL disappears after resize & set-video-mode called

I am running an OpenGL context in a SDL resizable window under Windows XP. I am experiencing a slight problem where the OpenGL display disappears when I call set-video-mode with the new window size after I receive an SDL_VIDEORESIZE event.

Anyone else had this problem?

-Luke

Yes, search the archives. :slight_smile: (short answer: patch in the works and
testing)On Fri, Apr 18, 2003 at 10:55:33PM -0700, Luke J Crook wrote:

I am running an OpenGL context in a SDL resizable window under Windows XP. I am experiencing a slight problem where the OpenGL display disappears when I call set-video-mode with the new window size after I receive an SDL_VIDEORESIZE event.

Anyone else had this problem?


Glenn Maynard

Thanks. I was just in the process of reading though the relevant messages.

One question though. Since SDL resets the OpenGL context, how is it
restarted ?

Does this require that: SDL_setvideomode, SDL_GL_SetAttribute and all OpenGL
display lists etc. are recreated again. In other words almost initializing
the program from scratch ?

-Luke> ----- Original Message -----

From: g_sdl@zewt.org (Glenn Maynard)
To:
Sent: Friday, April 18, 2003 11:29 PM
Subject: Re: [SDL] OpenGL disappears after resize & set-video-mode called

On Fri, Apr 18, 2003 at 10:55:33PM -0700, Luke J Crook wrote:

I am running an OpenGL context in a SDL resizable window under Windows
XP. I am experiencing a slight problem where the OpenGL display disappears
when I call set-video-mode with the new window size after I receive an
SDL_VIDEORESIZE event.

Anyone else had this problem?

Yes, search the archives. :slight_smile: (short answer: patch in the works and
testing)


Glenn Maynard


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Er. It’s triggered by calling SDL_SetVideoMode, so you don’t have to
call it yet again. :slight_smile:

Other than that, yeah. It’s easy enough to do; it’s only annoying because
you also have to recreate textures, which can take a long time.On Fri, Apr 18, 2003 at 11:41:43PM -0700, Luke J Crook wrote:

One question though. Since SDL resets the OpenGL context, how is it
restarted ?

Does this require that: SDL_setvideomode, SDL_GL_SetAttribute and all OpenGL
display lists etc. are recreated again. In other words almost initializing
the program from scratch ?


Glenn Maynard