OpenGL lost/gained focus/context

Okay, so I’m somewhat confused as to when I need to reload my OpenGL
textures, and how I should best do it.

Previously I posted the code I use to check for regaining of focus, and how
I then reload my textures. This does not work correctly.

Is it possible for some guys from the list to post a fully working sample of
code that will reload textures correctly under Windows for a fullscreen
OpenGL app when switching away/back to the application?

I suspect this would be very useful to others, as well as me (but definitely
to me :)), and might therefore be useful to add to the main SDL site (up to
Sam, of course, just a thought),

Rob

Okay, so I’m somewhat confused as to when I need to reload my OpenGL
textures, and how I should best do it.

Previously I posted the code I use to check for regaining of focus, and how
I then reload my textures. This does not work correctly.

Is it possible for some guys from the list to post a fully working sample of
code that will reload textures correctly under Windows for a fullscreen
OpenGL app when switching away/back to the application?

As far as I know, the only time you have to reload textures is when you
set a new video mode.

By the way, I’m accepting patches to SDL that allow it to automatically
configure the mouse rect in OpenGL mode so you don’t have to do a full
re-initialization. I haven’t touched that code in a while so I’d prefer
if somebody who has looked into it before (Glenn? :slight_smile: could test it out.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment