glMatrixMode GL_TEXTURE vs display lists

Hi,

I used to scale all texture
coordinates like this :
glTexCoord2f( (vit)->txxs, (vit)->tyys );

But now I’m trying to use the texture matrix in a display list and for some reason my texture doesn’t display correctly:

glMatrixMode(GL_TEXTURE)
glLoadIdentity();
glScalef(xs,ys,1.0);

listid = glGenLists(1);
glNewList( listid, GL_COMPILE );
draw_objects()
glEndList();

What could be wrong ?

Hi,

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 ??

Ex :

glTexImage2D(GL_TEXTURE_2D, 0, 3,
l_iCols, l_iRows,
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 :

if (bValid)
glBindTexture(…
else
continue…

U.

Okay maybe I should rephrase my problem :

// Texture gen code
glBindTexture(GL_TEXTURE_2D, textureID);
glTexImage2D(…

// Drawing code A) - No texture displayed
if( glIsTexture(textureID) == GL_TRUE )
glBindTexture(GL_TEXTURE_2D, textureID);

// Drawing code B) - Texture displays
glBindTexture(GL_TEXTURE_2D, textureID);

So why does glIsTexture returns GL_FALSE while it dipslays if I remove the check ?

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 ?

“I always thought this was a stable driver?”

Is there such a thing?!