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?

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.

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

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.