View Full Version : glMatrixMode GL_TEXTURE vs display lists
I used to scale all texture
coordinates like this :
glTexCoord2f( (*vit)->tx*xs, (*vit)->ty*ys );
But now I'm trying to use the texture matrix in a display list and for some reason my texture doesn't display correctly:
listid = glGenLists(1);
glNewList( listid, GL_COMPILE );
What could be wrong ?
I tracked down the problem :
Just after the call to glTexImage2D I check on glIsTexture, if it's invalid, I don't use the texture, otherwise I do.
But if I force the bind (ignore what glIsTexture returns) then the object displays correctly.
Is there a reason that glIsTexture returns false even if the texture (seems) to be valid ??
glTexImage2D(GL_TEXTURE_2D, 0, 3,
0, GL_RGB, GL_UNSIGNED_BYTE,
(char *) l_pGLTex->getPixels() );
if( glIsTexture(textureID) )
bValid = true
else bValid = false;
A bit further in the code I do :
Okay maybe I should rephrase my problem :
// Texture gen code
// Drawing code A) - No texture displayed
if( glIsTexture(textureID) == GL_TRUE )
// Drawing code B) - Texture displays
So why does glIsTexture returns GL_FALSE while it dipslays if I remove the check ?
01-21-2003, 08:08 AM
Sounds like a driver bug, if I've read the specs correctly in the past.
Try glGenTextures for all your texture objects and see if glIsTexture can find it then.
I'm using the latest nVidia Detonater drivers on a GForce2/GTS board...
I always thought this was a stable driver ?
01-24-2003, 06:52 AM
"I always thought this was a stable driver?"
Is there such a thing?! http://www.opengl.org/discussion_boards/ubb/wink.gif
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.