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.
This commit is contained in:
Neil Roberts 2009-05-12 15:36:16 +01:00
parent 36cfb60307
commit e9b863eba2
3 changed files with 3 additions and 6 deletions

View File

@ -374,8 +374,7 @@ _clutter_do_pick (ClutterStage *stage,
cogl_disable_fog (); cogl_disable_fog ();
cogl_clear (&white, cogl_clear (&white,
COGL_BUFFER_BIT_COLOR | COGL_BUFFER_BIT_COLOR |
COGL_BUFFER_BIT_DEPTH | COGL_BUFFER_BIT_DEPTH);
COGL_BUFFER_BIT_STENCIL);
/* Disable dithering (if any) when doing the painting in pick mode */ /* Disable dithering (if any) when doing the painting in pick mode */
dither_was_on = glIsEnabled (GL_DITHER); dither_was_on = glIsEnabled (GL_DITHER);

View File

@ -224,8 +224,7 @@ clutter_stage_paint (ClutterActor *self)
priv->color.alpha); priv->color.alpha);
cogl_clear (&stage_color, cogl_clear (&stage_color,
COGL_BUFFER_BIT_COLOR | COGL_BUFFER_BIT_COLOR |
COGL_BUFFER_BIT_DEPTH | COGL_BUFFER_BIT_DEPTH);
COGL_BUFFER_BIT_STENCIL);
if (priv->use_fog) if (priv->use_fog)
{ {

View File

@ -595,8 +595,7 @@ clutter_texture_paint (ClutterActor *self)
cogl_color_set_from_4ub (&transparent_col, 0, 0, 0, 0); cogl_color_set_from_4ub (&transparent_col, 0, 0, 0, 0);
cogl_clear (&transparent_col, cogl_clear (&transparent_col,
COGL_BUFFER_BIT_COLOR | COGL_BUFFER_BIT_COLOR |
COGL_BUFFER_BIT_DEPTH | COGL_BUFFER_BIT_DEPTH);
COGL_BUFFER_BIT_STENCIL);
cogl_disable_fog (); cogl_disable_fog ();
/* Clear the clipping stack so that if the FBO actor is being /* Clear the clipping stack so that if the FBO actor is being