glBlendFunc problem

I understand from many tutorials that GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA is the best blend function.
(which makes perfect sense, 1a-1a = 0a)

Anyway, all blend functions seem to work as their documentation says they should except that one. When I use that one it doesn’t use the alpha channel.(replaces it with black)

Is there any common reason for this problem?

This is mainly for particles & HUD elements.

Originally posted by darkrappey:

Anyway, all blend functions seem to work as their documentation says they should except that one. When I use that one it doesn’t use the alpha channel.(replaces it with black)

Are you sure that your shader or texture environment setup generates nonzero alpha? This blending mode is used very often so the driver error is unlikely.

I generate textures in this fashion:

Are you sure that your shader or texture environment setup generates nonzero alpha?

When I use the other blend functions the alpha of texture definitely effects how the particles are rendering (just not in the way I would like it to).

I also just enabled fog again and it seems to mess up the alpha buy making it white at a distance… could this be related or a hole other problem?

In the 32 bit texture variant you are calling the gluBuild2DMipmaps for three components instead of four so the alpha value is lost and replaced with opaque one.

d’Oh, my bad. I didn’t even look at the function specification to notice that. Shame on me lol.

Works now as far as I can tell.

-thanks once again Komat