View Full Version : Checking if Texture is Loaded into Memory
I want to check my memory to see if a certain texture is loaded, and if it is, not load it into memory again. Anyone have an idea on how to check which textures have been loaded so far?
baldurk
02-09-2003, 01:36 AM
the best way to do it would be have a boolean flag in your code, and set it to true when the texture is loaded. I don't know of any way to check in OpenGL if a texture is loaded
Maybe u can look at the OpenGl error codes. I've never looked at this problem before ut I'm pretty sure there's an error code if u try to display a texture map if there isn't actually texture loaded for it.
davepermen
02-09-2003, 12:57 PM
hm.. smells like a texture manager.. not?
CyraX
02-10-2003, 07:35 AM
What ufnction are you using to load the memory.
shezan
02-10-2003, 06:32 PM
i'm not sure if this is what you are looking for, but glIsTexture() will determine whether the texture has been created. As to whether it is loaded in graphics memory (VRAM), i dont think this is possible because there is no function in openGL to actually instruct the driver to put the texture in VRAM (as far as i know). The only method I can think of that would force a texture into VRAM is glBindTexture() which basically makes the texture "current". You can use glGet (i think) to retrieve the current texture
vBulletin, Copyright ©2000-2010, Jelsoft Enterprises Ltd.