destroy program in shader destructor
This commit is contained in:
parent
b178891ab3
commit
37442db20e
2 changed files with 10 additions and 1 deletions
|
|
@ -10,4 +10,11 @@ GLint CShader::getUniformLocation(const std::string& unif) {
|
|||
}
|
||||
|
||||
return itpos->second;
|
||||
}
|
||||
|
||||
CShader::~CShader() {
|
||||
// destroy shader
|
||||
if (program != 0) {
|
||||
glDeleteProgram(program);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue