Light | Dark



glIsShader — Determines if a name corresponds to a shader object

C Specification

GLboolean glIsShader(GLuint  shader);



Specifies a potential shader object.


glIsShader returns GL_TRUE if shader is the name of a shader object previously created with glCreateShader and not yet deleted with glDeleteShader. If shader is zero or a non-zero value that is not the name of a shader object, or if an error occurs, glIsShader returns GL_FALSE.


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

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

A shader object marked for deletion with glDeleteShader but still attached to a program object is still considered a shader object and glIsShader will return GL_TRUE.


GL_INVALID_OPERATION is generated if glIsShader is executed between the execution of glBegin and the corresponding execution of glEnd.

Associated Gets

glGetAttachedShaders with a valid program object

glGetShader with arguments shader and a parameter to be queried

glGetShaderInfoLog with argument object

glGetShaderSource with argument object

Think you can improve this page? Edit this page on GitHub.