'\" t .\" Title: glShaderSource .\" 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 "GLSHADERSOURCE" "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" glShaderSource \- Replaces the source code in a shader object .SH "C SPECIFICATION" .HP \w'void\ glShaderSource('u .BI "void glShaderSource(GLuint\ " "shader" ", GLsizei\ " "count" ", const\ GLchar\ **" "string" ", const\ GLint\ *" "length" ");" .SH "PARAMETERS" .PP \fIshader\fR .RS 4 Specifies the handle of the shader object whose source code is to be replaced\&. .RE .PP \fIcount\fR .RS 4 Specifies the number of elements in the \fIstring\fR and \fIlength\fR arrays\&. .RE .PP \fIstring\fR .RS 4 Specifies an array of pointers to strings containing the source code to be loaded into the shader\&. .RE .PP \fIlength\fR .RS 4 Specifies an array of string lengths\&. .RE .SH "DESCRIPTION" .PP \fBglShaderSource\fR sets the source code in \fIshader\fR to the source code in the array of strings specified by \fIstring\fR\&. Any source code previously stored in the shader object is completely replaced\&. The number of strings in the array is specified by \fIcount\fR\&. If \fIlength\fR is \fBNULL\fR, each string is assumed to be null terminated\&. If \fIlength\fR is a value other than \fBNULL\fR, it points to an array containing a string length for each of the corresponding elements of \fIstring\fR\&. Each element in the \fIlength\fR array may contain the length of the corresponding string (the null character is not counted as part of the string length) or a value less than 0 to indicate that the string is null terminated\&. The source code strings are not scanned or parsed at this time; they are simply copied into the specified shader object\&. .SH "NOTES" .PP OpenGL copies the shader source code strings when \fBglShaderSource\fR is called, so an application may free its copy of the source code strings immediately after the function returns\&. .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 \fIcount\fR is less than 0\&. .SH "ASSOCIATED GETS" .PP \fBglGetShader\fR() with arguments \fIshader\fR and \fBGL_SHADER_SOURCE_LENGTH\fR .PP \fBglGetShaderSource\fR() with argument \fIshader\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{ \fBglShaderSource\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 \fBglCompileShader\fR(), \fBglCreateShader\fR(), \fBglDeleteShader\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