What should the following code do assuming something was drawn 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);
Should this code just set the alpha to 1 or will it clear the color buffer?
Or in other words, does glColorMask
affect what glClear
does or does it only apply to normal draw operations?
I am asking specifically with regards to OpenGL ES 2.0 so any reference to a spec will be appreciated.
It will clear the alpha channel only.
The pixel ownership test, the scissor test, dithering, and the buffer writemasks affect the operation of glClear
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With