View Full Version : How can I use a texture's alpha value for blending?

12-23-2000, 10:32 PM
Sorry for reposting this, but I added some more relevant information that might help to make it a better question.

I am drawing some textures on screen, and I want to use their alpha value. They were loaded as a texture with an alpha (I've visually tested this to be true with glAlphaFunc).

How can I do it? I've tried glBlendFunc with various modes, but it seems to be ignoring the texture alpha. Either it draws it all black or all opaque.

Why it is that glAlphaFunc is working but glBlendFunc isn't? I enabled GL_BLEND also of course.

Does anyone know urls to tutorials showing you how to do alpha blending with textures. There is one on nehe, but that uses multiple textures, and I don't want to do that, I have the alpha value inside the texture as an alpha channel, its neater, and probably faster. At least glAlphaFunc recognises it, so why can't glBlendFunc?

12-26-2000, 06:05 AM
Knowing what blend mode you are trying to use would help. Are you using GL_SRC_ALPHA & GL_ONE_MINUS_SRC_ALPHA?