Thank you guys! So I am still having the same problem but I am fairly certain that I am using an EGLConfig that has an alpha channel now! Which is one step closer. GlBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA) īut it seems the blendfunc(GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA) does not work because I cannot blend the destination alpha with android without requesting an alpha buffer when I make the context. Finally, we want a blendfunc that makes the foreground visible only in changes the alpha values in the framebuffer) Now "draw" the mask (again, this doesn't produce a visible result, it just GlBlendFuncSeparate(GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ZERO) then the corresponding framebuffer pixel's alpha will be set to 1. In other words, if a pixel is white in the mask, but rather replaces the framebuffer alpha values with values based Next, we want a blendfunc that doesn't change the color of any pixels, Draw entire background without masking Use a simple blendfunc for drawing the background The Method I am using is as follows: glEnable(GL_BLEND) I am trying to use a black and white texture to mask a foreground texture so that certain parts of the foreground texture do not appear and the background texture is blended into the foreground texture. I am working with the OpenGL ES 2.0 Platform on Android and I am having difficulty using the destination alpha blending functions because I dont think I am requesting an alpha buffer when I create the GL context.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |