glShaderSource

Replaces the source code in a shader object

Signature

glShaderSource( GLuint ( shader ) , GLsizei ( count ) , const GLchar **( string ) , const GLint *( length ) )-> void
glShaderSource( shaderObj , string )
glShaderSource( GLhandle(shaderObj),[bytes(string),...]) -> None

Parameters

VariablesDescription
shader
Specifies the handle of the shader object whose source code is to be replaced.
count
Specifies the number of elements in the string and length arrays.
string
Specifies an array of pointers to strings containing the source code to be loaded into the shader.
length
Specifies an array of string lengths.

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glShaderSource
{LGPL} PyMT pymt/graphx/shader.py Lines: 12, 53
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 36
{GPL3} OpenGL-Programmable 09-gles2.py Lines: 37
{GPL3} OpenGL-Programmable 10-gl3.2core.py Lines: 36
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 36
{GPL3} OpenGL-Programmable 05-shader.py Lines: 36
{GPL3} OpenGL-Programmable 07-attrib.py Lines: 36