![]() | VertexAttribute Constructor (Program, String) |
Namespace: Ooogles
Exception | Condition |
---|---|
GLException | InvalidOperation if program is not a valid program or has not been successfully linked. |
The association between an attribute variable name and a generic attribute index can be specified by using the other constructor VertexAttribute(Program, Int32, String). Attribute bindings do not go into effect until Link is called. After a program object has been linked successfully, the index values for attribute variables remain fixed until the next link command occurs. The attribute values can only be queried after a link if the link was successful.
This method uses the binding that actually went into effect the last time Link was called for the specified program object. Attribute bindings that have been specified since the last link operation are not used.
Note: in DEBUG mode, a warning will be logged to the debug console if program does not contain an attribute named attributeName, or attributeName starts with the reserved prefix 'gl_'.
OpenGL API: glGetAttribLocation