Merge pull request #1009 from absolutelynothelix/fix-gl-deinit-leak

This commit is contained in:
Yuxuan Shui
2023-06-13 15:07:27 +01:00
committed by GitHub
2 changed files with 3 additions and 4 deletions

View File

@@ -976,6 +976,9 @@ void gl_deinit(struct gl_data *gd) {
gd->default_shader = NULL;
}
glDeleteTextures(1, &gd->default_mask_texture);
glDeleteTextures(1, &gd->back_texture);
gl_check_err();
}

View File

@@ -188,10 +188,6 @@ void gl_present(backend_t *base, const region_t *);
bool gl_read_pixel(backend_t *base, void *image_data, int x, int y, struct color *output);
enum device_status gl_device_status(backend_t *base);
static inline void gl_delete_texture(GLuint texture) {
glDeleteTextures(1, &texture);
}
/**
* Get a textual representation of an OpenGL error.
*/