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?
Checking if Texture is Loaded into Memory
Started by john, Feb 09 2003 08:46 AM
5 replies to this topic
#1
Posted 09 February 2003 - 08:46 AM
#2
Posted 09 February 2003 - 09: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
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.
#3
Posted 09 February 2003 - 12:11 PM
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.
#4
Posted 09 February 2003 - 08:57 PM
hm.. smells like a texture manager.. not?
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....
#5
Posted 10 February 2003 - 03:35 PM
What ufnction are you using to load the memory.
#6
Posted 11 February 2003 - 02:32 AM
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
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












