Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Why "Invalid enumerant" when checking for texture shader consistency on GeForce3.

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2002
    Posts
    7

    Why "Invalid enumerant" when checking for texture shader consistency on GeForce3.

    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:

    Code :
    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 .

    Thanks,

    /Jonas

  2. #2
    Junior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Holland
    Posts
    184

    Re: Why "Invalid enumerant" when checking for texture shader consistency on GeForce3.

    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

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2002
    Posts
    7

    Re: Why "Invalid enumerant" when checking for texture shader consistency on GeForce3.

    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/...ureShaders.pdf )

    Thanks,

    /Jonas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •