View Full Version : Max length of uniform/attribute name
07-17-2006, 06:36 AM
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?
07-17-2006, 07:29 AM
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.
07-17-2006, 02:39 PM
As a user of the OpenGL Api, I don't have to bother. But I was just wondering what the IHVs do/ could do.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.