'\" t .\" Title: glGetShaderSource .\" 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 "GLGETSHADERSOURCE" "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" glGetShaderSource \- Returns the source code string from a shader object .SH "C SPECIFICATION" .HP \w'void\ glGetShaderSource('u .BI "void glGetShaderSource(GLuint\ " "shader" ", GLsizei\ " "bufSize" ", GLsizei\ *" "length" ", GLchar\ *" "source" ");" .SH "PARAMETERS" .PP \fIshader\fR .RS 4 Specifies the shader object to be queried\&. .RE .PP \fIbufSize\fR .RS 4 Specifies the size of the character buffer for storing the returned source code string\&. .RE .PP \fIlength\fR .RS 4 Returns the length of the string returned in \fIsource\fR (excluding the null terminator)\&. .RE .PP \fIsource\fR .RS 4 Specifies an array of characters that is used to return the source code string\&. .RE .SH "DESCRIPTION" .PP \fBglGetShaderSource\fR returns the concatenation of the source code strings from the shader object specified by \fIshader\fR\&. The source code strings for a shader object are the result of a previous call to \fBglShaderSource\fR()\&. The string returned by the function will be null terminated\&. .PP \fBglGetShaderSource\fR returns in \fIsource\fR as much of the source code string as it can, up to a maximum of \fIbufSize\fR characters\&. The number of characters actually returned, excluding the null termination character, is specified by \fIlength\fR\&. If the length of the returned string is not required, a value of \fBNULL\fR can be passed in the \fIlength\fR argument\&. The size of the buffer required to store the returned source code string can be obtained by calling \fBglGetShader\fR() with the value \fBGL_SHADER_SOURCE_LENGTH\fR\&. .SH "ERRORS" .PP \fBGL_INVALID_VALUE\fR is generated if \fIshader\fR is not a value generated by OpenGL\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIshader\fR is not a shader object\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIbufSize\fR is less than 0\&. .SH "ASSOCIATED GETS" .PP \fBglGetShader\fR() with argument \fBGL_SHADER_SOURCE_LENGTH\fR .PP \fBglIsShader\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{ \fBglGetShaderSource\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 \fBglCreateShader\fR(), \fBglShaderSource\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