What i'm proposing is an extension that gives some control onto the OpenGL's texture manager.. for a simple reason.
Correct me if i'm wrong. When you create a texture ( glTexImage2d for example ), it is uploaded to video memory, as needed, but a copy is also made in system or AGP memory, in case the texture is destroyed in video memory ( ie alt-tab, changing the resolution, etc.. ). This can be seen as an advantage ( simplicity: the user doesn't have to bother about this issue ), or a disadvantage, since it takes some more memory to store it. Quite frankly i'd prefer to have the possibility to check myself if a texture is still in video memory, and update it myself if not, as with surfaces in DirectX.
Here's how i see it implemented:
- glIsLost ( GLint tex ) : to tell if a texture was lost.. if so it is the user's responsability to bind the texture and glTexImage it again.
- glEnable/Disable ( GL_LOST_TEXTURE_EXT ) to enable/disable the extension.. could be done on a per-texture basis ( ie you could keep the OpenGL mechanism for some textures, and not for others ? ).
What do you think of that ?