[mutter] cogl/clip-stack: Set color and depth mask when drawing rectangle clips
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cogl/clip-stack: Set color and depth mask when drawing rectangle clips
- Date: Sat, 29 Feb 2020 19:42:59 +0000 (UTC)
commit 46e38ff61a7357d87f17c063eae51d84c4b322a7
Author: Jonas Dreßler <verdre v0yd nl>
Date: Wed Feb 26 17:44:18 2020 +0100
cogl/clip-stack: Set color and depth mask when drawing rectangle clips
Just like with the other functions drawing to the stencil buffer, we
should make sure the depth and color masks are set to FALSE during
drawing.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1096
cogl/cogl/driver/gl/cogl-clip-stack-gl.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/cogl/cogl/driver/gl/cogl-clip-stack-gl.c b/cogl/cogl/driver/gl/cogl-clip-stack-gl.c
index 4946f8690..24a714f6c 100644
--- a/cogl/cogl/driver/gl/cogl-clip-stack-gl.c
+++ b/cogl/cogl/driver/gl/cogl-clip-stack-gl.c
@@ -73,6 +73,9 @@ add_stencil_clip_rectangle (CoglFramebuffer *framebuffer,
ctx->current_projection_entry = projection_stack->last_entry;
ctx->current_modelview_entry = modelview_entry;
+ GE( ctx, glColorMask (FALSE, FALSE, FALSE, FALSE) );
+ GE( ctx, glDepthMask (FALSE) );
+
if (merge)
{
/* Add one to every pixel of the stencil buffer in the
@@ -116,6 +119,8 @@ add_stencil_clip_rectangle (CoglFramebuffer *framebuffer,
ctx->current_modelview_entry = old_modelview_entry;
/* Restore the stencil mode */
+ GE( ctx, glDepthMask (TRUE) );
+ GE( ctx, glColorMask (TRUE, TRUE, TRUE, TRUE) );
GE( ctx, glStencilFunc (GL_EQUAL, 0x1, 0x1) );
GE( ctx, glStencilOp (GL_KEEP, GL_KEEP, GL_KEEP) );
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]