summaryrefslogtreecommitdiff
path: root/gtk/gtkglarea.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2014-10-30 20:00:45 +0100
committerAlexander Larsson <alexl@redhat.com>2014-10-30 21:04:29 +0100
commitf66060c422decddb13f623ed0f4716e6b0925796 (patch)
treebd259e2d7c23c810e29c78ce655e9c224639b932 /gtk/gtkglarea.c
parent37d0159a8497d229852a865ecc92a330dddd311e (diff)
downloadgtk+-f66060c422decddb13f623ed0f4716e6b0925796.tar.gz
GdkGLArea: fix has_alpha changes at runtime
We need to completely reallocate the buffers if we switch has_alpha, because we may switch from render buffers to texture.
Diffstat (limited to 'gtk/gtkglarea.c')
-rw-r--r--gtk/gtkglarea.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
index 0c8788a1d5..c7583d64f4 100644
--- a/gtk/gtkglarea.c
+++ b/gtk/gtkglarea.c
@@ -367,6 +367,8 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area, int width, int height)
else
glRenderbufferStorageEXT (GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, width, height);
}
+
+ priv->needs_render = TRUE;
}
static void
@@ -562,7 +564,6 @@ gtk_gl_area_size_allocate (GtkWidget *widget,
priv->needs_resize = TRUE;
}
- priv->needs_render = TRUE;
gtk_gl_area_maybe_allocate_buffers (area);
}
@@ -957,7 +958,7 @@ gtk_gl_area_set_has_alpha (GtkGLArea *area,
g_object_notify (G_OBJECT (area), "has-alpha");
- gtk_gl_area_maybe_allocate_buffers (area);
+ gtk_gl_area_delete_buffers (area);
}
}