'\" t .\" Title: glBindFragDataLocation .\" 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 "GLBINDFRAGDATALOCATI" "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" glBindFragDataLocation \- bind a user\-defined varying out variable to a fragment shader color number .SH "C SPECIFICATION" .HP \w'void\ glBindFragDataLocation('u .BI "void glBindFragDataLocation(GLuint\ " "program" ", GLuint\ " "colorNumber" ", const\ char\ *\ " "name" ");" .SH "PARAMETERS" .PP \fIprogram\fR .RS 4 The name of the program containing varying out variable whose binding to modify .RE .PP \fIcolorNumber\fR .RS 4 The color number to bind the user\-defined varying out variable to .RE .PP \fIname\fR .RS 4 The name of the user\-defined varying out variable whose binding to modify .RE .SH "DESCRIPTION" .PP \fBglBindFragDataLocation\fR explicitly specifies the binding of the user\-defined varying out variable \fIname\fR to fragment shader color number \fIcolorNumber\fR for program \fIprogram\fR\&. If \fIname\fR was bound previously, its assigned binding is replaced with \fIcolorNumber\fR\&. \fIname\fR must be a null\-terminated string\&. \fIcolorNumber\fR must be less than \fBGL_MAX_DRAW_BUFFERS\fR\&. .PP The bindings specified by \fBglBindFragDataLocation\fR have no effect until \fIprogram\fR is next linked\&. Bindings may be specified at any time after \fIprogram\fR has been created\&. Specifically, they may be specified before shader objects are attached to the program\&. Therefore, any name may be specified in \fIname\fR, including a name that is never used as a varying out variable in any fragment shader object\&. Names beginning with \fBgl_\fR are reserved by the GL\&. .PP In addition to the errors generated by \fBglBindFragDataLocation\fR, the program \fIprogram\fR will fail to link if: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The number of active outputs is greater than the value \fBGL_MAX_DRAW_BUFFERS\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} More than one varying out variable is bound to the same color number\&. .RE .sp .SH "NOTES" .PP Varying out varyings may have indexed locations assigned explicitly in the shader text using a location layout qualifier\&. If a shader statically assigns a location to a varying out variable in the shader text, that location is used and any location assigned with \fBglBindFragDataLocation\fR is ignored\&. .SH "ERRORS" .PP \fBGL_INVALID_VALUE\fR is generated if \fIcolorNumber\fR is greater than or equal to \fBGL_MAX_DRAW_BUFFERS\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIname\fR starts with the reserved \fBgl_\fR prefix\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fBprogram\fR is not the name of a program object\&. .SH "ASSOCIATED GETS" .PP \fBglGetFragDataLocation\fR() with a valid program object and the the name of a user\-defined varying out variable .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{ \fBglBindFragDataLocation\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 \fBglCreateProgram\fR(), \fBglGetFragDataLocation\fR() .SH "COPYRIGHT" .PP 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 2010-2014 Khronos Group .br