I have just been blindly creating texture names and then using glBindTexture when I want the texture to be used. In my app there is potential for up to 500M of textures that can be used at one time or another, and so I have been managing these using a disk cache.
When a texture gets swapped out to the cache, its data is deleted and when its needed again its allocated a new chunk of memory.
So the question is, when I do the initial bind, and glTexture2D thing, I pass a pointer to the current image data. However during the program this image may be in a different location when I use the glBindTexture with the appropriatte texture name.
It just occured to me that this might be a problem, but the app works fine, even transversing the scene so that all 500M of textures will eventually get displayed. Why does my App still work even when I shift the textures’s data? I’m thinking this is going to bite me later.
Thanks