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 8 of 8

Thread: warning: no vertex attribute zero

  1. #1
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    2,882

    warning: no vertex attribute zero

    Code :
    warning: no vertex attribute is explicitly assigned to vertex attribute zero
    If anybody has hit this, what are the options for getting rid of this warning?

    Sometimes you just don't need gl_Vertex (vertex attrib 0) in the vertex shader to do the job.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,726

    Re: warning: no vertex attribute zero

    If you're not using the built-in attribute "gl_Vertex", you must specifically designate one of the vertex attributes to be attribute 0. Use "glBindAttribLocation" before linking the program.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Sep 2004
    Location
    Prombaatu
    Posts
    1,401

    Re: warning: no vertex attribute zero

    #pragma warning(...) would be nice here.

  4. #4
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    2,882

    Re: warning: no vertex attribute zero

    Quote Originally Posted by Alfonse Reinheart
    If you're not using the built-in attribute "gl_Vertex", you must specifically designate one of the vertex attributes to be attribute 0. Use "glBindAttribLocation" before linking the program.
    Thanks. I didn't find anything on this in the spec. Is this a spec issue or a vendor driver quirk?

    And if the former, is this true even for GLSL 1.3-1.5? Maybe I'm just searching for the wrong strings.

  5. #5
    Junior Member Regular Contributor
    Join Date
    Aug 2007
    Posts
    121

    Re: warning: no vertex attribute zero

    The orange book mentions this in the chapter about vertex attributes and uniforms. I don't know where they got this information from however.

  6. #6
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    2,882

    Re: warning: no vertex attribute zero

    Thanks for the tip!

  7. #7
    Member Regular Contributor
    Join Date
    Oct 2006
    Posts
    349

    Re: warning: no vertex attribute zero

    I think this limitation was lifted in OpenGL 3.0+.

  8. #8
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,726

    Re: warning: no vertex attribute zero

    I think this limitation was lifted in OpenGL 3.0+.
    Well, it is just a warning...

Posting Permissions

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