alpha values in textures

Whats the deal with alpha values in textures? It seems I can’t get OpenGL to even recognize that I uploaded the image in RGBA. I’ve checked, and the alpha values are there, and vary between 0 and 255. But when I try to do blending, it doesn’t seem to care about them.
I’ve tried difference combinations of glBlendFunc with GL_SRC_ALPHA and stuff, but it never makes the texture transparent where it should be. It’s either solid, or all somewhat transparent.

Any clue what I’m doing wrong?

Did you enable GL_BLEND at all? Maybe you’re doing the alpha test.

Have you checked that you pass GL_RGBA (or at least something with alpha in it) to glTexImage2D() as the format parameter? If not, you should get a distorted texture, because the first alpha is interpreted as red, the second as green and so on.
Well, the internalFormat parameter also has to be GL_RGBA because otherwise, there is no alpha stored in the texture and blending is done on the whole texture. When you pass GL_RGBA, blending is done for each pixel as specified in the data you pass.
Hope this will help you.

You were right! My internal format was wrong. I was using GL_RGB, I changed it to GL_RGBA, and now it works great.

Thanks for all the help guys!