GLGETACTIVEATTRIB - Online Linux Manual PageSection : 3G
Updated : 01/20/2022
Source : [FIXME: source]
Note : [FIXME: manual]

NAMEglGetActiveAttrib − Returns information about an active attribute variable for the specified program object

C SPECIFICATIONvoid glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);

PARAMETERSprogram Specifies the program object to be queried​. index Specifies the index of the attribute variable to be queried​. bufSize Specifies the maximum number of characters OpenGL is allowed to write in the character buffer indicated by name​. length Returns the number of characters actually written by OpenGL in the string indicated by name (excluding the null terminator) if a value other than NULL is passed​. size Returns the size of the attribute variable​. type Returns the data type of the attribute variable​. name Returns a null terminated string containing the name of the attribute variable​.

DESCRIPTIONglGetActiveAttrib returns information about an active attribute variable in the program object specified by program​. The number of active attributes can be obtained by calling glGetProgram() with the value GL_ACTIVE_ATTRIBUTES​. A value of 0 for index selects the first active attribute variable​. Permissible values for index range from zero to the number of active attribute variables minus one​. A vertex shader may use either built−in attribute variables, user−defined attribute variables, or both​. Built−in attribute variables have a prefix of "gl_" and reference conventional OpenGL vertex attribtes (e​.g​., gl_Vertex, gl_Normal, etc​., see the OpenGL Shading Language specification for a complete list​.) User−defined attribute variables have arbitrary names and obtain their values through numbered generic vertex attributes​. An attribute variable (either built−in or user−defined) is considered active if it is determined during the link operation that it may be accessed during program execution​. Therefore, program should have previously been the target of a call to glLinkProgram(), but it is not necessary for it to have been linked successfully​. The size of the character buffer required to store the longest attribute variable name in program can be obtained by calling glGetProgram() with the value GL_ACTIVE_ATTRIBUTE_MAX_LENGTH​. This value should be used to allocate a buffer of sufficient size to store the returned attribute name​. The size of this character buffer is passed in bufSize, and a pointer to this character buffer is passed in name​. glGetActiveAttrib returns the name of the attribute variable indicated by index, storing it in the character buffer specified by name​. The string returned will be null terminated​. The actual number of characters written into this buffer is returned in length, and this count does not include the null termination character​. If the length of the returned string is not required, a value of NULL can be passed in the length argument​. The type argument specifies a pointer to a variable into which the attribute variable's data type will be written​. The symbolic constants GL_FLOAT, GL_FLOAT_VEC2, GL_FLOAT_VEC3, GL_FLOAT_VEC4, GL_FLOAT_MAT2, GL_FLOAT_MAT3, GL_FLOAT_MAT4, GL_FLOAT_MAT2x3, GL_FLOAT_MAT2x4, GL_FLOAT_MAT3x2, GL_FLOAT_MAT3x4, GL_FLOAT_MAT4x2, GL_FLOAT_MAT4x3, GL_INT, GL_INT_VEC2, GL_INT_VEC3, GL_INT_VEC4, GL_UNSIGNED_INT, GL_UNSIGNED_INT_VEC2, GL_UNSIGNED_INT_VEC3, GL_UNSIGNED_INT_VEC4, GL_DOUBLE, GL_DOUBLE_VEC2, GL_DOUBLE_VEC3, GL_DOUBLE_VEC4, GL_DOUBLE_MAT2, GL_DOUBLE_MAT3, GL_DOUBLE_MAT4, GL_DOUBLE_MAT2x3, GL_DOUBLE_MAT2x4, GL_DOUBLE_MAT3x2, GL_DOUBLE_MAT3x4, GL_DOUBLE_MAT4x2, or GL_DOUBLE_MAT4x3 may be returned​. The size argument will return the size of the attribute, in units of the type returned in type​. The list of active attribute variables may include both built−in attribute variables (which begin with the prefix "gl_") as well as user−defined attribute variable names​. This function will return as much information as it can about the specified active attribute variable​. If no information is available, length will be 0, and name will be an empty string​. This situation could occur if this function is called after a link operation that failed​. If an error occurs, the return values length, size, type, and name will be unmodified​.

ERRORSGL_INVALID_VALUE is generated if program is not a value generated by OpenGL​. GL_INVALID_OPERATION is generated if program is not a program object​. GL_INVALID_VALUE is generated if index is greater than or equal to the number of active attribute variables in program​. GL_INVALID_VALUE is generated if bufSize is less than 0​.

ASSOCIATED GETSglGet() with argument GL_MAX_VERTEX_ATTRIBS​. glGetProgram() with argument GL_ACTIVE_ATTRIBUTES or GL_ACTIVE_ATTRIBUTE_MAX_LENGTH​. glIsProgram()

VERSION SUPPORT OpenGL Version Function / Feature Name 2​.0 none;'>none;'>none;'>none;'>none;'>none;'>none;'>none;'>none;'>none;'>none;'>none;'>none;'> 2​.1 3​.0 3​.1 3​.2 3​.3 4​.0 4​.1 4​.2 4​.3 4​.4 4​.5 glGetActiveAttrib

SEE ALSOglBindAttribLocation(), glLinkProgram(), glVertexAttrib(), glVertexAttribPointer()

COPYRIGHTCopyright © 2003−2005 3Dlabs Inc​. Ltd​. Copyright © 2010−2014 Khronos Group​. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1​.0, 8 June 1999​. http://opencontent​.org/openpub/​.

COPYRIGHT
Copyright © 2003-2005 3Dlabs Inc. Ltd.
Copyright © 2010-2014 Khronos Group
0
Johanes Gumabo
Data Size   :   27,581 byte
man-glGetActiveAttrib.3GBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 197,657
Visitor ID   :     :  
Visitor IP   :   3.145.85.233   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.