'\" t .\" Title: glGetAttribLocation .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 01/03/2018 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLGETATTRIBLOCATION" "3G" "01/03/2018" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glGetAttribLocation \- Returns the location of an attribute variable .SH "C SPECIFICATION" .HP \w'GLint\ glGetAttribLocation('u .BI "GLint glGetAttribLocation(GLuint\ " "program" ", const\ GLchar\ *" "name" ");" .SH "PARAMETERS" .PP \fIprogram\fR .RS 4 Specifies the program object to be queried\&. .RE .PP \fIname\fR .RS 4 Points to a null terminated string containing the name of the attribute variable whose location is to be queried\&. .RE .SH "DESCRIPTION" .PP \fBglGetAttribLocation\fR queries the previously linked program object specified by \fIprogram\fR for the attribute variable specified by \fIname\fR and returns the index of the generic vertex attribute that is bound to that attribute variable\&. If \fIname\fR is a matrix attribute variable, the index of the first column of the matrix is returned\&. If the named attribute variable is not an active attribute in the specified program object or if \fIname\fR starts with the reserved prefix "gl_", a value of \-1 is returned\&. .PP The association between an attribute variable name and a generic attribute index can be specified at any time by calling \fBglBindAttribLocation\fR()\&. Attribute bindings do not go into effect until \fBglLinkProgram\fR() 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\&. \fBglGetAttribLocation\fR returns the binding that actually went into effect the last time \fBglLinkProgram\fR() was called for the specified program object\&. Attribute bindings that have been specified since the last link operation are not returned by \fBglGetAttribLocation\fR\&. .SH "ERRORS" .PP \fBGL_INVALID_OPERATION\fR is generated if \fIprogram\fR is not a value generated by OpenGL\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIprogram\fR is not a program object\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIprogram\fR has not been successfully linked\&. .SH "ASSOCIATED GETS" .PP \fBglGetActiveAttrib\fR() with argument \fIprogram\fR and the index of an active attribute .PP \fBglIsProgram\fR() .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .T& l c c c c c c c c c c c c. T{ \fBglGetAttribLocation\fR T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} .TE .sp 1 .SH "SEE ALSO" .PP \fBglBindAttribLocation\fR(), \fBglLinkProgram\fR(), \fBglVertexAttrib\fR(), \fBglVertexAttribPointer\fR() .SH "COPYRIGHT" .PP Copyright \(co 2003\-2005 3Dlabs Inc\&. Ltd\&. Copyright \(co 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\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2003-2005 3Dlabs Inc. Ltd. .br Copyright \(co 2010-2014 Khronos Group .br