How Are `gltexenv`, `glcolor4x` And `glblendfunc` Related In Opengl Es 1.0?
Solution 1:
glTexEnv() sets the texture environment mode. GL_REPLACE tells the renderer to skip the current color (for example, from glColor4()) and instead tells the renderer to use your texture's colors for every corresponding pixel. If you, instead of GL_REPLACE, use GL_MODULATE, then your glColor4() call will be included together with the texture's colors when the renderer sets a pixel's color.
Your glColor4() call shouldn't be doing anything (when using GL_REPLACE) that can be seen on your object.
About your glBlendFunc() arguments:
GL_ONE is using the current color that comes from your incoming primitive, which we call source. GL_ONE_MINUS_SRC_ALPHA is multiplying the destination (which is the currently stored pixel in the frame buffer) by (1 - source alpha value).
Normally, when you're not using textures, you achieve a transparent effect from color primitives when the glColor4() contains an alpha value where 1 equals fully opaque and 0 fully transparent.
Post a Comment for "How Are `gltexenv`, `glcolor4x` And `glblendfunc` Related In Opengl Es 1.0?"