Skip to main content
gamedev.net
🔒 Locked

Problems with resident texture

Started by Sanson 0 replies 300+ views
Original Post
Sanson
Sanson
I would like to know if the texture is resident in memory. GLint* isResident; glBindTexture(GL_TEXTURE_2D, textures[1].texID); //If I call the next function the program crash,why???; glGetTexParameteriv(GL_TEXTURE_2D , GL_TEXTURE_RESIDENT,isResident); //Here I would like to find the value of isResident if(isResident== some code... glCallList(object[1]); Can you help me? Thanks
Gelmir
Gelmir
Your code crash becouse you are using a pointer uninitialized.
try this one:

/************************************************************/
GLint isResident;
glBindTexture(GL_TEXTURE_2D, textures[1].texID);
//If I call the next function the program crash,why???;
glGetTexParameteriv(GL_TEXTURE_2D ,
GL_TEXTURE_RESIDENT,&isResident);
//Here I would like to find the value of isResident
if(isResident== some code...
/***********************************************************/

I recommend you that before doing things more complicated, learn about pointers, references, memory addressing, etc...

That''s the hardest part of C/C++.



"If you''''re gonna die, die with your boots on"
"If you''re gonna die, die with your boots on"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.