cogl/clip-stack: Explicitely initialize the stencil mask
We need the stencil buffer to consist of binary values of 0 and 1 because we're doing additions and subtractions on the buffer, so even though this is the default, explicitely set the stencil mask to 0x1. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1096
This commit is contained in:
parent
72054332c5
commit
1e0b015ce8
@ -98,6 +98,7 @@ add_stencil_clip_rectangle (CoglFramebuffer *framebuffer,
|
||||
else
|
||||
{
|
||||
GE( ctx, glEnable (GL_STENCIL_TEST) );
|
||||
GE( ctx, glStencilMask (0x1) );
|
||||
|
||||
/* Initially disallow everything */
|
||||
GE( ctx, glClearStencil (0) );
|
||||
@ -155,8 +156,6 @@ add_stencil_clip_region (CoglFramebuffer *framebuffer,
|
||||
- framebuffer->viewport_y,
|
||||
0);
|
||||
|
||||
GE( ctx, glEnable (GL_STENCIL_TEST) );
|
||||
|
||||
GE( ctx, glColorMask (FALSE, FALSE, FALSE, FALSE) );
|
||||
GE( ctx, glDepthMask (FALSE) );
|
||||
|
||||
@ -167,6 +166,9 @@ add_stencil_clip_region (CoglFramebuffer *framebuffer,
|
||||
}
|
||||
else
|
||||
{
|
||||
GE( ctx, glEnable (GL_STENCIL_TEST) );
|
||||
GE( ctx, glStencilMask (0x1) );
|
||||
|
||||
/* Initially disallow everything */
|
||||
GE( ctx, glClearStencil (0) );
|
||||
GE( ctx, glClear (GL_STENCIL_BUFFER_BIT) );
|
||||
|
Loading…
Reference in New Issue
Block a user