I'm looking at SurfaceFlinger, i.e. the the code that is doing the composition in Android, and I have trouble understanding some of the OpenGL ES 1.0 calls as I've only programmed ES 2.0 code.
Here goes the piece of code that interests me:
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glColor4x(0x10000, 0x10000, 0x10000, 0x10000);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
What it is supposed to be doing is blending a texture into the buffer.
Why does one need the glTextEnvx
and glColor4x
calls? Isn't glBlendFunc
enough for achieving blending?
I know my question is naive, but I still don't understand what is glTexEnvx
for even after reading the docs.