'\" t .\" Title: glGetUniform .\" 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 "GLGETUNIFORM" "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" glGetUniformfv, glGetUniformiv \- Returns the value of a uniform variable .SH "C SPECIFICATION" .HP \w'void\ glGetUniformfv('u .BI "void glGetUniformfv(GLuint\ " "program" ", GLint\ " "location" ", GLfloat\ *" "params" ");" .HP \w'void\ glGetUniformiv('u .BI "void glGetUniformiv(GLuint\ " "program" ", GLint\ " "location" ", GLint\ *" "params" ");" .HP \w'void\ glGetUniformuiv('u .BI "void glGetUniformuiv(GLuint\ " "program" ", GLint\ " "location" ", GLuint\ *" "params" ");" .HP \w'void\ glGetUniformdv('u .BI "void glGetUniformdv(GLuint\ " "program" ", GLint\ " "location" ", GLdouble\ *" "params" ");" .HP \w'void\ glGetnUniformfv('u .BI "void glGetnUniformfv(GLuint\ " "program" ", GLint\ " "location" ", GLsizei\ " "bufSize" ", GLfloat\ *" "params" ");" .HP \w'void\ glGetnUniformiv('u .BI "void glGetnUniformiv(GLuint\ " "program" ", GLint\ " "location" ", GLsizei\ " "bufSize" ", GLint\ *" "params" ");" .HP \w'void\ glGetnUniformuiv('u .BI "void glGetnUniformuiv(GLuint\ " "program" ", GLint\ " "location" ", GLsizei\ " "bufSize" ", GLuint\ *" "params" ");" .HP \w'void\ glGetnUniformdv('u .BI "void glGetnUniformdv(GLuint\ " "program" ", GLint\ " "location" ", GLsizei\ " "bufSize" ", GLdouble\ *" "params" ");" .SH "PARAMETERS" .PP \fIprogram\fR .RS 4 Specifies the program object to be queried\&. .RE .PP \fIlocation\fR .RS 4 Specifies the location of the uniform variable to be queried\&. .RE .PP \fIbufSize\fR .RS 4 Specifies the size of the buffer \fIparams\fR\&. .RE .PP \fIparams\fR .RS 4 Returns the value of the specified uniform variable\&. .RE .SH "DESCRIPTION" .PP \fBglGetUniform\fR and \fBglGetnUniform\fR return in \fIparams\fR the value(s) of the specified uniform variable\&. The type of the uniform variable specified by \fIlocation\fR determines the number of values returned\&. If the uniform variable is defined in the shader as a boolean, int, or float, a single value will be returned\&. If it is defined as a vec2, ivec2, or bvec2, two values will be returned\&. If it is defined as a vec3, ivec3, or bvec3, three values will be returned, and so on\&. To query values stored in uniform variables declared as arrays, call \fBglGetUniform\fR for each element of the array\&. To query values stored in uniform variables declared as structures, call \fBglGetUniform\fR for each field in the structure\&. The values for uniform variables declared as a matrix will be returned in column major order\&. .PP The locations assigned to uniform variables are not known until the program object is linked\&. After linking has occurred, the command \fBglGetUniformLocation\fR() can be used to obtain the location of a uniform variable\&. This location value can then be passed to \fBglGetUniform\fR or \fBglGetnUniform\fR in order to query the current value of the uniform variable\&. After a program object has been linked successfully, the index values for uniform variables remain fixed until the next link command occurs\&. The uniform variable values can only be queried after a link if the link was successful\&. .PP The only difference between \fBglGetUniform\fR and \fBglGetnUniform\fR is that \fBglGetnUniform\fR will generate an error if size of the \fIparams\fR buffer,as described by \fIbufSize\fR, is not large enough to hold the result data\&. .SH "NOTES" .PP If an error is generated, no change is made to the contents of \fIparams\fR\&. .SH "ERRORS" .PP \fBGL_INVALID_VALUE\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\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIlocation\fR does not correspond to a valid uniform variable location for the specified program object\&. .PP \fBGL_INVALID_OPERATION\fR is generated by \fBglGetnUniform\fR if the buffer size required to store the requested data is greater than \fIbufSize\fR\&. .SH "ASSOCIATED GETS" .PP \fBglGetActiveUniform\fR() with arguments \fIprogram\fR and the index of an active uniform variable .PP \fBglGetProgram\fR() with arguments \fIprogram\fR and \fBGL_ACTIVE_UNIFORMS\fR or \fBGL_ACTIVE_UNIFORM_MAX_LENGTH\fR .PP \fBglGetUniformLocation\fR() with arguments \fIprogram\fR and the name of a uniform variable .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 l c c c c c c c c c c c c l c c c c c c c c c c c c l c c c c c c c c c c c c l c c c c c c c c c c c c l c c c c c c c c c c c c l c c c c c c c c c c c c l c c c c c c c c c c c c. T{ \fBglGetUniformdv\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} T{ \fBglGetUniformfv\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} T{ \fBglGetUniformiv\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} T{ \fBglGetUniformuiv\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} T{ \fBglGetnUniformdv\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} T{ \fBglGetnUniformfv\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} T{ \fBglGetnUniformiv\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} T{ \fBglGetnUniformuiv\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(), \fBglLinkProgram\fR(), \fBglUniform\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