Gambas Documentation - /comp/gb.opengl.glsl/gl/isshader

/comp/gb.opengl.glsl/gl/isshader

# Gl.IsShader (gb.opengl.glsl)

Static Function IsShader ( Shader As Integer ) As Boolean

Determines if a name corresponds to a shader object.

### Parameters

shader

  Specifies a potential shader object.

### Description

Gl.IsShader returns Gl.TRUE if shader is the name of a shader object previously created with Gl.CreateShader and not yet deleted with Gl.DeleteShader. If shader is zero or a non-zero value that is not the name of a shader object, or if an error occurs, Gl.IsShader * returns Gl.FALSE.

### Notes

No error is generated if shader is not a valid shader object name.

A shader object marked for deletion with Gl.DeleteShader but still attached to a program object is still considered a shader object and Gl.IsShader will return Gl.TRUE.

### Associated Gets

Gl.GetAttachedShaders with a valid program object

Gl.GetShader with arguments shader and a parameter to be queried

Gl.GetShaderInfoLog with argument object

Gl.GetShaderSource with argument object

### See also

- Gl.AttachShader,

- Gl.CompileShader,

- Gl.CreateShader,

- Gl.DeleteShader,

- Gl.DetachShader,

- Gl.LinkProgram,

- Gl.ShaderSource

See original documentation on OpenGL website