From d141f781ec5588359539b20508655fed6948fd0b Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 13 May 2008 10:42:36 +0000 Subject: [PATCH] 2008-05-13 Emmanuele Bassi * clutter/glx/clutter-stage-glx.c: (clutter_stage_glx_unrealize): Move the shaders release from here... * clutter/glx/clutter-backend-glx.c: (clutter_backend_glx_dispose): ... to here. Shaders should be released when the GL context is being destroyed, and that only happens when the backend is being disposed, now that we support multiple stages. --- ChangeLog | 11 +++++++++++ clutter/glx/clutter-backend-glx.c | 3 +++ clutter/glx/clutter-stage-glx.c | 3 --- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d0a07a9b..e5af9ee55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-05-13 Emmanuele Bassi + + * clutter/glx/clutter-stage-glx.c: + (clutter_stage_glx_unrealize): Move the shaders release from here... + + * clutter/glx/clutter-backend-glx.c: + (clutter_backend_glx_dispose): ... to here. Shaders should be + released when the GL context is being destroyed, and that only + happens when the backend is being disposed, now that we support + multiple stages. + 2008-05-13 Emmanuele Bassi * clutter/clutter-backend.c: diff --git a/clutter/glx/clutter-backend-glx.c b/clutter/glx/clutter-backend-glx.c index 34a0da408..0369716ee 100644 --- a/clutter/glx/clutter-backend-glx.c +++ b/clutter/glx/clutter-backend-glx.c @@ -176,6 +176,9 @@ clutter_backend_glx_dispose (GObject *gobject) ClutterBackendGLX *backend_glx = CLUTTER_BACKEND_GLX (gobject); ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (gobject); + /* Unrealize all shaders, since the GL context is going away */ + _clutter_shader_release_all (); + if (backend_glx->gl_context) { glXDestroyContext (backend_x11->xdpy, backend_glx->gl_context); diff --git a/clutter/glx/clutter-stage-glx.c b/clutter/glx/clutter-stage-glx.c index f4a0920c0..b7bb9a10a 100644 --- a/clutter/glx/clutter-stage-glx.c +++ b/clutter/glx/clutter-stage-glx.c @@ -74,9 +74,6 @@ clutter_stage_glx_unrealize (ClutterActor *actor) clutter_x11_trap_x_errors (); - /* Unrealize all shaders, since the GL context is going away */ - _clutter_shader_release_all (); - if (G_UNLIKELY (was_offscreen)) { if (stage_glx->glxpixmap)