Skip to content

Commit

Permalink
Merge pull request #1009 from absolutelynothelix/fix-gl-deinit-leak
Browse files Browse the repository at this point in the history
  • Loading branch information
yshui committed Jun 13, 2023
2 parents 5b6f6ec + 8245de2 commit 6b80280
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/backend/gl/gl_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
4 changes: 0 additions & 4 deletions src/backend/gl/gl_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 6b80280

Please sign in to comment.