Texture Problem When Switching Modes...

I’ve discovered a minor bug in my game engine that I need to fix. Apparently, whenever I switch from windowed to fullscreen or vice-versa, texturing stops working. All of my polygons are solid white. If I start windowed and go full, full is messed up but switching back to windowed works fine. The same can be said for starting full.

I don’t know if it matters, but textures only seem to load if I call the LoadTextures() function from within InitGL(). Why can I not call it once at the end of the level loading function, and then have it work?

When your program switches from windowed to full, it destroys the rendering context. When this happens your textures vanish as well

OK, so I have to re-load all textures after each mode change. Now, any idea why I can load textures ONLY during OpenGL initialization and not when the level is done loading?

Also, is there a way I need to free texture memory? I never have before, but I am curious. If I need to free the texture memory, I’ll do it when switching modes and at app exit.