Skip to main content
GameDev.net gamedev.net
🔒 Locked

glBlendFunc

Started by valles Sep 29, 2009 at 1:13 AM 1 replies 1.3k views
Original Post
valles
valles
I'm using opengl ES and have a texture "binarygrid" loaded as:

glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, 256, 256, 0, GL_ALPHA, GL_UNSIGNED_BYTE, binaryGrid);
Which should fill a texture of r,g,b,a with 0,0,0,a.

glBlendFunc(GL_ZERO,GL_DST_COLOR);
With the above setting, glBlendFunc is drawing 0,0,0,a as a,a,a,a which is exactly what I want. I'm wondering if this is a bug, or have I actually stumbled on a solution. - Valles at www.redadept.com
Hodgman
Hodgman
Off the top of my head,
glBlendFunc(GL_ZERO,GL_DST_COLOR);
Is equivalent to:
FrameBuffer = Texture * 0 + FrameBuffer * FrameBuffer
i.e.
FrameBuffer = FrameBuffer^2

Which means your texture should be getting ignored by GL...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.