'\" t .\" Title: glGetProgramResourceLocation .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets v1.79.2 .\" Date: 10/20/2024 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLGETPROGRAMRESOURCE" "3G" "10/20/2024" "[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" glGetProgramResourceLocation \- query the location of a named resource within a program .SH "C SPECIFICATION" .HP \w'GLint\ glGetProgramResourceLocation('u .BI "GLint glGetProgramResourceLocation(GLuint\ " "program" ", GLenum\ " "programInterface" ", const\ char\ *\ " "name" ");" .SH "PARAMETERS" .PP \fIprogram\fR .RS 4 The name of a program object whose resources to query\&. .RE .PP \fIprogramInterface\fR .RS 4 A token identifying the interface within \fIprogram\fR containing the resource named \fIname\fR\&. .RE .PP \fIname\fR .RS 4 The name of the resource to query the location of\&. .RE .SH "DESCRIPTION" .PP \fBglGetProgramResourceLocation\fR returns the location assigned to the variable named \fIname\fR in interface \fIprogramInterface\fR of program object \fIprogram\fR\&. \fIprogram\fR must be the name of a program that has been linked successfully\&. \fIprogramInterface\fR must be one of \fBGL_UNIFORM\fR, \fBGL_PROGRAM_INPUT\fR, \fBGL_PROGRAM_OUTPUT\fR, \fBGL_VERTEX_SUBROUTINE_UNIFORM\fR, \fBGL_TESS_CONTROL_SUBROUTINE_UNIFORM\fR, \fBGL_TESS_EVALUATION_SUBROUTINE_UNIFORM\fR, \fBGL_GEOMETRY_SUBROUTINE_UNIFORM\fR, \fBGL_FRAGMENT_SUBROUTINE_UNIFORM\fR, \fBGL_COMPUTE_SUBROUTINE_UNIFORM\fR, or \fBGL_TRANSFORM_FEEDBACK_BUFFER\fR\&. .PP The value \-1 will be returned if an error occurs, if \fIname\fR does not identify an active variable on \fIprogramInterface\fR, or if \fIname\fR identifies an active variable that does not have a valid location assigned, as described above\&. The locations returned by these commands are the same locations returned when querying the \fBGL_LOCATION\fR and \fBGL_LOCATION_INDEX\fR resource properties\&. .PP A string provided to \fBglGetProgramResourceLocation\fR is considered to match an active variable if: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} the string exactly matches the name of the active variable .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} if the string identifies the base name of an active array, where the string would exactly match the name of the variable if the suffix "[0]" were appended to the string .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} if the string identifies an active element of the array, where the string ends with the concatenation of the "[" character, an integer \fIwith no "+" sign, extra leading zeroes, or whitespace\fR identifying an array element, and the "]" character, the integer is less than the number of active elements of the array variable, and where the string would exactly match the enumerated name of the array if the decimal integer were replaced with zero\&. .RE .PP Any other string is considered not to identify an active variable\&. If the string specifies an element of an array variable, \fBglGetProgramResourceLocation\fR returns the location assigned to that element\&. If it specifies the base name of an array, it identifies the resources associated with the first element of the array\&. .SH "ERRORS" .PP \fBGL_INVALID_VALUE\fR is generated if \fIprogram\fR is not the name of an existing program object\&. .PP \fBGL_INVALID_ENUM\fR is generated if \fIprogramInterface\fR is not one of the accepted interface types\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIprogram\fR has not been linked successfully\&. .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{ \fBglGetProgramResourceLocation\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 \fBglGetProgramResourceName\fR(), \fBglGetProgramResourceIndex\fR(), \fBglGetProgramResource\fR(), \fBglGetProgramResourceLocationIndex\fR()\&. .SH "COPYRIGHT" .PP Copyright \(co 2013\-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]\fBhttps://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2013-2014 Khronos Group .br