'\" t .\" Title: glGetProgramResourceIndex .\" 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 "GLGETPROGRAMRESOURCE" "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" glGetProgramResourceIndex \- query the index of a named resource within a program .SH "C SPECIFICATION" .HP \w'GLuint\ glGetProgramResourceIndex('u .BI "GLuint glGetProgramResourceIndex(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 index of\&. .RE .SH "DESCRIPTION" .PP \fBglGetProgramResourceIndex\fR returns the unsigned integer index assigned to a resource named \fIname\fR in the interface type \fIprogramInterface\fR of program object \fIprogram\fR\&. .PP \fIprogram\fR must be the name of an existing program object\&. \fIprogramInterface\fR is the name of the interface within \fIprogram\fR which contains the resource named \fIname\fRand must be one of the following values: .PP \fBGL_UNIFORM\fR .RS 4 The query is targeted at the set of active uniforms within \fIprogram\fR\&. .RE .PP \fBGL_UNIFORM_BLOCK\fR .RS 4 The query is targeted at the set of active uniform blocks within \fIprogram\fR\&. .RE .PP \fBGL_PROGRAM_INPUT\fR .RS 4 The query is targeted at the set of active input variables used by the first shader stage of \fIprogram\fR\&. If \fIprogram\fR contains multiple shader stages then input variables from any stage other than the first will not be enumerated\&. .RE .PP \fBGL_PROGRAM_OUTPUT\fR .RS 4 The query is targeted at the set of active output variables produced by the last shader stage of \fIprogram\fR\&. If \fIprogram\fR contains multiple shader stages then output variables from any stage other than the last will not be enumerated\&. .RE .PP \fBGL_VERTEX_SUBROUTINE\fR, \fBGL_TESS_CONTROL_SUBROUTINE\fR, \fBGL_TESS_EVALUATION_SUBROUTINE\fR, \fBGL_GEOMETRY_SUBROUTINE\fR, \fBGL_FRAGMENT_SUBROUTINE\fR, \fBGL_COMPUTE_SUBROUTINE\fR .RS 4 The query is targeted at the set of active subroutines for the vertex, tessellation control, tessellation evaluation, geometry, fragment and compute shader stages of \fIprogram\fR, respectively\&. .RE .PP \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 .RS 4 The query is targeted at the set of active subroutine uniform variables used by the vertex, tessellation control, tessellation evaluation, geometry, fragment and compute shader stages of \fIprogram\fR, respectively\&. .RE .PP \fBGL_TRANSFORM_FEEDBACK_VARYING\fR .RS 4 The query is targeted at the set of output variables from the last non\-fragment stage of \fIprogram\fR that would be captured if transform feedback were active\&. .RE .PP \fBGL_TRANSFORM_FEEDBACK_BUFFER\fR .RS 4 The query is targeted at the set of active buffer binding points to which output variables in the \fBGL_TRANSFORM_FEEDBACK_VARYING\fR interface are written\&. .RE .PP \fBGL_BUFFER_VARIABLE\fR .RS 4 The query is targeted at the set of active buffer variables used by \fIprogram\fR\&. .RE .PP \fBGL_SHADER_STORAGE_BLOCK\fR .RS 4 The query is targeted at the set of active shader storage blocks used by \fIprogram\fR\&. .RE .PP If \fIname\fR exactly matches the name string of one of the active resources for \fIprogramInterface\fR, the index of the matched resource is returned\&. Additionally, if \fIname\fR would exactly match the name string of an active resource if "[0]" were appended to \fIname\fR, the index of the matched resource is returned\&. Otherwise, \fIname\fR is considered not to be the name of an active resource, and \fBGL_INVALID_INDEX\fR is returned\&. .PP For the interface \fBGL_TRANSFORM_FEEDBACK_VARYING\fR, the value \fBGL_INVALID_INDEX\fR should be returned when querying the index assigned to the special names gl_NextBuffer, gl_SkipComponents1, gl_SkipComponents2, gl_SkipComponents3, or gl_SkipComponents4\&. .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated if \fIprogramInterface\fR is not one of the accepted interface types\&. .PP \fBGL_INVALID_ENUM\fR is generated if \fIprogramInterface\fR is \fBGL_ATOMIC_COUNTER_BUFFER\fR or \fBGL_TRANSFORM_FEEDBACK_BUFFER\fR, since active atomic counter and transform feedback buffer resources are not assigned name strings\&. .PP Although not an error, \fBGL_INVALID_INDEX\fR is returned if \fIname\fR is not the name of a resource within the interface identified by \fIprogramInterface\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{ \fBglGetProgramResourceIndex\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(), \fBglGetProgramResource\fR(), \fBglGetProgramResourceLocation\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]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2013-2014 Khronos Group .br