PDA

View Full Version : Why "Invalid enumerant" when checking for texture shader consistency on GeForce3.



jonask
10-14-2002, 02:14 AM
Hi,

I want to check the consistency of the texture shaders on my GeForce3, and therefore I use code similar to what is described in http://developer.nvidia.com/docs/IO/1244/ATT/132 , page 132:




for (i=0; i<4; i++)
{
GLint isConsistent = 1 ;
glActiveTextureARB (GL_TEXTURE0_ARB + i) ;
GLboolean e = glIsEnabled (GL_TEXTURE_SHADER_NV) ; // returns GL_TRUE
assert (glGetError() == GL_NO_ERROR) ; // Ok
glTexEnviv (GL_TEXTURE_SHADER_NV, GL_SHADER_CONSISTENT_NV, &amp;isConsistent);
assert (glGetError() == GL_NO_ERROR) ; // Fails with code 0x500 ("invalid enumerant")
assert (isConsistent) ;
}


The problem is glTexEnviv always fails and glGetError returns code 0x500 ("invalid enumerant").

What am I missing here? It's supposed to be correct according the spec (http://www.nvidia.com/dev_content/nvopenglspecs/GL_NV_texture_shader.txt) .

Thanks,

/Jonas

JML
10-14-2002, 03:35 AM
glTexEnviv (GL_TEXTURE_SHADER_NV, GL_SHADER_CONSISTENT_NV, &isConsistent);
assert (glGetError() == GL_NO_ERROR) ; // Fails with code 0x500 ("invalid enumerant")
assert (isConsistent) ;
}
[/B]

Jonas, are you sure that shouldn't be glGetTexEnviv?

HTH
Jean-Marc

jonask
10-14-2002, 12:54 PM
Sigh. You are right, of course. Stupid me, I just copied the code from the presentation... (the link was supposed to be http://developer.nvidia.com/docs/IO/1244/ATT/TextureShaders.pdf )

Thanks,

/Jonas