mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 03:29:48 +01:00
destroy program in shader destructor
This commit is contained in:
parent
b178891ab3
commit
37442db20e
2 changed files with 10 additions and 1 deletions
|
@ -11,3 +11,10 @@ GLint CShader::getUniformLocation(const std::string& unif) {
|
||||||
|
|
||||||
return itpos->second;
|
return itpos->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CShader::~CShader() {
|
||||||
|
// destroy shader
|
||||||
|
if (program != 0) {
|
||||||
|
glDeleteProgram(program);
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,7 +5,9 @@
|
||||||
|
|
||||||
class CShader {
|
class CShader {
|
||||||
public:
|
public:
|
||||||
GLuint program;
|
~CShader();
|
||||||
|
|
||||||
|
GLuint program = 0;
|
||||||
GLint proj;
|
GLint proj;
|
||||||
GLint color;
|
GLint color;
|
||||||
GLint tex;
|
GLint tex;
|
||||||
|
|
Loading…
Reference in a new issue