Skip to content

Commit

Permalink
also, properly delete glarea framebuffers on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisotura committed May 30, 2019
1 parent b9529e8 commit 6f5e45e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libui_sdl/libui/unix/gl.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ uiGLContext *createGLContext(GtkWidget* widget, int maj, int min)
void freeGLContext(uiGLContext* glctx)
{
if (glctx == NULL) return;

gdk_gl_context_make_current(glctx->gctx);
_glDeleteRenderbuffers(4, &glctx->renderbuffer[0][0]);
_glDeleteFramebuffers(2, &glctx->framebuffer[0]);

gdk_gl_context_clear_current();
g_object_unref(glctx->gctx);
uiFree(glctx);
Expand Down

0 comments on commit 6f5e45e

Please sign in to comment.