GLGETSHADERSOURCE(3G) | OpenGL 3.3 | GLGETSHADERSOURCE(3G) |
glGetShaderSource - Returns the source code string from a shader object
void glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
shader
bufSize
length
source
glGetShaderSource returns the concatenation of the source code strings from the shader object specified by shader. The source code strings for a shader object are the result of a previous call to glShaderSource(). The string returned by the function will be null terminated.
glGetShaderSource returns in source as much of the source code string as it can, up to a maximum of bufSize characters. The number of characters actually returned, excluding the null termination character, is specified by length. If the length of the returned string is not required, a value of NULL can be passed in the length argument. The size of the buffer required to store the returned source code string can be obtained by calling glGetShader() with the value GL_SHADER_SOURCE_LENGTH.
GL_INVALID_VALUE is generated if shader is not a value generated by OpenGL.
GL_INVALID_OPERATION is generated if shader is not a shader object.
GL_INVALID_VALUE is generated if bufSize is less than 0.
glGetShader() with argument GL_SHADER_SOURCE_LENGTH
glIsShader()
glCreateShader(), glShaderSource()
Copyright © 2003-2005 3Dlabs Inc. Ltd. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
03/08/2011 | OpenGL 3.3 |