aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2019-05-30 23:16:56 +0200
committerStapleButter <thetotalworm@gmail.com>2019-05-30 23:16:56 +0200
commit6f5e45ef2cb451249bf160141fccc0f2a0262357 (patch)
treebcffbd01f04d2f8b12233f42ffae57ca083859b0 /src/libui_sdl
parentb9529e83619f1e2b725ea86508b546d72e072a0c (diff)
also, properly delete glarea framebuffers on exit
Diffstat (limited to 'src/libui_sdl')
-rw-r--r--src/libui_sdl/libui/unix/gl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libui_sdl/libui/unix/gl.c b/src/libui_sdl/libui/unix/gl.c
index 4a180ef..e1665ee 100644
--- a/src/libui_sdl/libui/unix/gl.c
+++ b/src/libui_sdl/libui/unix/gl.c
@@ -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);