glGetShaderSource

glGetShaderSource: man2/glGetShaderSource.xml

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.

glGetShaderSource is available only if the GL version is 2.0 or greater.

@OpenGL_Version(OGLIntroducedIn.V2P0)
fn_glGetShaderSource glGetShaderSource;

See Also

glCreateShader, glShaderSource

Meta