Shaders & programsGL 2.0
glDeleteProgram
Deletes a program object.
Part of the family glDelete*
Signature
void glDeleteProgram(GLuint program);
How it works
Frees the program. If it is currently in use it is only flagged and deleted when no longer in use. Put this in your Shader class destructor.
Parameters
programGLuint
Program to delete. 0 is ignored.
Example
example.cpp
1Shader::~Shader() { glDeleteProgram(id); }