[SDL] window resize resets the GL context state on winXP/opengl

Glenn Maynard g_sdl at zewt.org
Tue Mar 11 20:08:01 PST 2003


On Tue, Mar 11, 2003 at 09:28:26PM -0600, Kevin Meinert wrote:
> When I resize my window in any way (maximize, fullscreen, drag with 
> mouse), then the stuff in my graphics context (like tex objs, shaders, 
> display lists) is reset and I'm left looking at a white scene (the stuff 
> that isn't displaylisted without textures).
> 
> Anyone know how to fix?  Or is this a known bug in SDL?  Is there a bug 
> list for SDL I can check in the future?  What are the plans to fix?

This is a known annoyance.  I don't know if this is done on all platforms
or just Windows; it's not documented, AFAIK.

I've offered to fix this, and Sam seemed to want a fix, but he hasn't
responded to my questions of exactly how this should be fixed.  Windows
*must* reset the OpenGL context when some settings are changed, so we need
an interface to indicate whether the context is reset; I need to know
what type of interface will be accepted.  (This is one of my more major
patches that I'm maintaining a fork for, and as I hate maintaining
forks, I'd very much like to get this cleaned up and put into CVS.)

Sam, I understand that you're busy; could you at least give an indication
that you havn't forgotton about this?  :)

(I hadn't thought of doing this via a message.  Sam, would sending a
message indicating that the OpenGL context has been reset be a reasonable
way to do this that you'd consider applying to CVS?  I like it because it
doesn't add an entry point, just a message type, and it gives a way to
handle the theoretical future case where the OpenGL context is lost for
other reasons.)

-- 
Glenn Maynard




More information about the SDL mailing list