free texture

This commit is contained in:
Mylloon 2023-05-08 15:24:06 +02:00
parent c96ba97110
commit e844a8b94a
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -9,6 +9,7 @@ static const char matrix_proj[] = "proj";
static void init(void); static void init(void);
static void draw(void); static void draw(void);
static void deinit(void);
void credits(int state) { void credits(int state) {
switch (state) { switch (state) {
@ -20,6 +21,10 @@ void credits(int state) {
draw(); draw();
break; break;
case GL4DH_FREE:
deinit();
break;
default: default:
break; break;
} }
@ -86,3 +91,10 @@ static void draw(void) {
glUseProgram(0); glUseProgram(0);
} }
static void deinit(void) {
if (_texId) {
glDeleteTextures(1, &_texId);
_texId = 0;
}
}