glblendfunc

Preserving the GLBlendFunc

I need to preserve the current GlBlendFunc so can restore it after I do some work. It seems that this is not one of the attributes that can be saved with GLPushAttrib, is there some other similar method I can use to preserve the state? ...

OpenGL: Overlay one texture over another and suppress white background

I am a starter of Iphone opengl ES programming. I have two textures, the first one is the background and occupies the full screen. I am printing the second picture on top of the first image but the white background of the second image covers part of the background. I want the background to be visible where the foreground picture has no c...

How to do something like Photoshop's screen Blending with glBlendFunc (OpenGL ES 1.x)?

I have a simple one channel (8bit) bitmap with luminance data only, and I want to blend it with the existing framebufer like Screen blending mode does it in Photoshop. So the source's white pixels (255) should result white, source's 50% gray pixels (128) should result the framebuffer pixel enlighted by 50%, and source's black pixels sho...

iPhone glBlendFunc error

Hi, I'm trying to use the glBlendFunc, but it's failing on the first call, with the error "unacceptable value specified for an enumerated argument". I've looked at the header, it appears that GL_DST_COLOR is 0x0306 (774) and that is causing the error, since (GL_ZERO, GL_ZERO) works. Any idea why this would fail like this on the iPhone?...

How does the OpenGL Blend equation work?

opengl ver: opengl es 1.x platform: iphone The blending equation: (Rs Sr + Rd Dr, Gs Sg + Gd Dg, Bs Sb + Bd Db, As Sa + Ad Da) How does it work? I don't understand if I set both src and des to GL_ONE, and I have src color red (255,0,0) and des color black (0,0,0), the result will be (0,0,0) Can someone explain how the equation work,...