glDeleteShader Function

Syntax

GL_APICALL void GL_APIENTRY glDeleteShader(
     GLuint shader
);

Arguments

Name Description
in shader Shader object to delete

Return Values

No values are returned.

Description

Deletes a shader object.

Set shader to a shader object generated by glCreateShader. If the shader object specified by shader is attached to one or more program objects, the shader object will wait to be deleted. An object that is "waiting to be deleted" is actually deleted as soon as it is detached from all the program objects to which it is attached.

This function generates the following errors.

GL_INVALID_VALUENonexistent shader object.
GL_INVALID_OPERATIONThe shader argument specified a reserved fragment shader.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL