GLGETSHADERSOURCE(3gl)GLGETSHADERSOURCE(3gl)NAMEglGetShaderSourceARB - Returns the source code string for a shader
object.
C SPECIFICATION
void glGetShaderSourceARB( GLhandleARB shader,
GLsizei maxLength,
GLsizei *length,
GLcharARB *source)
PARAMETERS
object Specifies the handle of shader object to be queried.
maxLength Specifies the size of the character buffer for storing the
returned
shader
source.
length Returns the length of the character string written into source.
shader Points to a string containing the shader source log.
DESCRIPTIONglGetShaderSourceARB returns the concatenated source strings for the
specified shader object. The string source is null terminated. The
actual number of characters written into source is returned in length,
excluding the null termination. If length is NULL then the GL ignores
this parameter. The maximum number of characters written into source is
passed in by maxLength. The total length of the concatendated source
strings for the shader can be queried by calling glGetObjectParameter‐
vARB with GL_OBJECT_SHADER_SOURCE_LENGTH_ARB.
ERRORS
GL_INVALID_OPERATION is generated if shader is not of type
GL_SHADER_OBJECT_ARB.
GL_INVALID_VALUE is generated if maxLength is less than 0.
GL_INVALID_OPERATION is generated if object is not of type GL_PRO‐
GRAM_OBJECT_ARB or GL_SHADER_OBJECT_ARB.
GL_INVALID_OPERATION is generated if glGetShaderSourceARB is executed
between the execution of glBegin and the corresponding execution of
glEnd.
ASSOCIATED GETS
glGetObjectParameterARB with argument GL_OBJECT_SHADER_SOURCE_ARB
SEE ALSO
glCreateShaderObjectARB, glGetObjectParameterARB, glShaderSourceARB
11 Mar 04 GLGETSHADERSOURCE(3gl)