Does glColorMask affect glClear

What should the following code do if something was done before the code below?

glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE);
glClearColor(0.0, 0.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);

If this code just sets the alpha value to 1 or will it clear the color buffer?

Or, in other words, does it affect glColorMaskwhat it does glClearor applies only to normal drawing operations?

I am specifically asking about OpenGL ES 2.0, so any reference to the specification would be appreciated.

+5
source share
1 answer

It will clear only the alpha channel.

Pixel ownership test, scissor test, anti-aliasing and buffer letter files affect glClear

+10
source

All Articles