mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 22:58:31 +02:00
mesa: call glColorMask(1,1,1,1) before glClear()
Without this, second and subsequent redraws rendered incorrectly. Plus comments.
This commit is contained in:
parent
9de9e1fe8c
commit
14150bc856
1 changed files with 4 additions and 0 deletions
|
|
@ -70,8 +70,11 @@ static void Key(unsigned char key, int x, int y)
|
|||
|
||||
static void Draw(void)
|
||||
{
|
||||
glColorMask(1,1,1,1);
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
/* right triangle: green */
|
||||
glBegin(GL_TRIANGLES);
|
||||
glColor3f(0,1,0);
|
||||
glVertex3f( 0.9, -0.9, -30.0);
|
||||
|
|
@ -81,6 +84,7 @@ static void Draw(void)
|
|||
|
||||
glColorMask(1,0,1,0);
|
||||
|
||||
/* left triangle: white&mask: purple middle region: white */
|
||||
glBegin(GL_TRIANGLES);
|
||||
glColor3f(1,1,1);
|
||||
glVertex3f(-0.9, -0.9, -30.0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue