mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-01 20:51:58 -07:00
destroy program in shader destructor
This commit is contained in:
@@ -10,4 +10,11 @@ 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;
|
||||||
|
Reference in New Issue
Block a user