From e9b863eba28564dd0b19f982610e5afe93ac17eb Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Tue, 12 May 2009 15:36:16 +0100 Subject: [PATCH] Don't clear the stencil buffer before painting and picking The stencil buffer is always cleared the first time a clip is used that needs it and the stencil test is disabled otherwise so there is no need to clear before a paint. --- clutter/clutter-main.c | 3 +-- clutter/clutter-stage.c | 3 +-- clutter/clutter-texture.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index aec1dd2aa..af46230fd 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -374,8 +374,7 @@ _clutter_do_pick (ClutterStage *stage, cogl_disable_fog (); cogl_clear (&white, COGL_BUFFER_BIT_COLOR | - COGL_BUFFER_BIT_DEPTH | - COGL_BUFFER_BIT_STENCIL); + COGL_BUFFER_BIT_DEPTH); /* Disable dithering (if any) when doing the painting in pick mode */ dither_was_on = glIsEnabled (GL_DITHER); diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 0833dee63..a4c0fcc1f 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -224,8 +224,7 @@ clutter_stage_paint (ClutterActor *self) priv->color.alpha); cogl_clear (&stage_color, COGL_BUFFER_BIT_COLOR | - COGL_BUFFER_BIT_DEPTH | - COGL_BUFFER_BIT_STENCIL); + COGL_BUFFER_BIT_DEPTH); if (priv->use_fog) { diff --git a/clutter/clutter-texture.c b/clutter/clutter-texture.c index b44d57d8a..cce419482 100644 --- a/clutter/clutter-texture.c +++ b/clutter/clutter-texture.c @@ -595,8 +595,7 @@ clutter_texture_paint (ClutterActor *self) cogl_color_set_from_4ub (&transparent_col, 0, 0, 0, 0); cogl_clear (&transparent_col, COGL_BUFFER_BIT_COLOR | - COGL_BUFFER_BIT_DEPTH | - COGL_BUFFER_BIT_STENCIL); + COGL_BUFFER_BIT_DEPTH); cogl_disable_fog (); /* Clear the clipping stack so that if the FBO actor is being