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: Max length of uniform/attribute name

  1. #1
    Intern Contributor
    Join Date
    Mar 2002
    Posts
    65

    Max length of uniform/attribute name

    I couldn't find any maximum length for a variable name specifically uniforms and attributes. Can the names be arbitrarily large? Or do implementations fix it to some value?

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,453

    Re: Max length of uniform/attribute name

    You shouldn't need to bother.
    There are functions which return the maximum length of attribute and uniform names per program.
    Use glGetProgramiv with GL_ACTIVE_UNIFORM_MAX_LENGTH or GL_ACTIVE_ATTRIBUTE_MAX.
    Actual lengths can be queried with glGetActiveUniform and glGetActiveAttrib.

  3. #3
    Intern Contributor
    Join Date
    Mar 2002
    Posts
    65

    Re: Max length of uniform/attribute name

    As a user of the OpenGL Api, I don't have to bother. But I was just wondering what the IHVs do/ could do.

Posting Permissions

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