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?
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.
hm.. smells like a texture manager.. not?
What ufnction are you using to load the memory.
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