Gl.GetShaderiv (gb.opengl.glsl)

Static Function GetShaderiv ( Shader As Integer, Pname As Integer ) As Integer[]

Parameters

shader

Specifies the shader object to be queried.
pname

Specifies the object parameter. Accepted symbolic names are Gl.SHADER_TYPE, Gl.DELETE_STATUS, Gl.COMPILE_STATUS, Gl.INFO_LOG_LENGTH, Gl.SHADER_SOURCE_LENGTH.
params

Returns the requested object parameter.

Description

Gl.GetShader returns in params the value of a parameter for a specific shader object. The following parameters are defined:
Gl.SHADER_TYPE

params returns Gl.VERTEX_SHADER if shader is a vertex shader object, Gl.GEOMETRY_SHADER if shader is a geometry shader object, and Gl.FRAGMENT_SHADER if shader is a fragment shader object.
Gl.DELETE_STATUS

params returns Gl.TRUE if shader is currently flagged for deletion, and Gl.FALSE otherwise.
Gl.COMPILE_STATUS

params returns Gl.TRUE if the last compile operation on shader was successful, and Gl.FALSE otherwise.
Gl.INFO_LOG_LENGTH

params returns the number of characters in the information log for shader including the null termination character (i.e., the size of the character buffer required to store the information log). If shader has no information log, a value of 0 is returned.
Gl.SHADER_SOURCE_LENGTH

params returns the length of the concatenation of the source strings that make up the shader source for the shader, including the null termination character. (i.e., the size of the character buffer required to store the shader source). If no source code exists, 0 is returned.

Notes

If an error is generated, no change is made to the contents of params.

Errors

Gl.INVALID_VALUE is generated if shader is not a value generated by OpenGL.

Gl.INVALID_OPERATION is generated if shader does not refer to a shader object.

Gl.INVALID_ENUM is generated if pname is not an accepted value.

Associated Gets

Gl.GetShaderInfoLog with argument shader

Gl.GetShaderSource with argument shader

Gl.IsShader

See also

See original documentation on OpenGL website