PDA

View Full Version : recreating windows and textures



8eight8
02-21-2001, 09:54 AM
To do fullscreen, resolution, and color bitdepth switching (while in the app) I am just destroying the GL window and recreating it. I have to reload all texture data, right? Should I call glDeleteTextures before I destroy the window? Can I blindly reuse the texure[] array with the call to glGenTexures again or should I zero it out?
Are there any other pitfalls when it comes to destroying and recreating the Opengl window. This is in win2000, VC6.

DFrey
02-21-2001, 10:28 AM
Here's what I do:

Unload all textures
Switch off RC
Destroy RC
Destroy window
Change mode
Create window
Set pixel format
Create RC
Make RC current
Initialize GL state
Load textures