john at February 9th, 2003 03:46 — #1
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 at February 9th, 2003 04:36 — #2
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
yau at February 9th, 2003 07:11 — #3
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 at February 9th, 2003 15:57 — #4
hm.. smells like a texture manager.. not?
cyrax at February 10th, 2003 10:35 — #5
What ufnction are you using to load the memory.
shezan at February 10th, 2003 21:32 — #6
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 loadedin 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