I am trying to blend a small texture (PNG file; 16x25, but I properly scale that for OpenGL in my program) in my scene. The image itself contains pixels that are transparent. However, when I use the traditional blending scheme as I have used for the rest of my textures (that is, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), OpenGL seems to blend away the entire texture. I’m using OpenGL 2.0 and SDL.
I set up my projection via:
glOrtho(0, 640, 480, 0, -1, 1);
The modelview matrix doesn’t have any transformations/rotations applied to it. Furthermore, I have disabled depth testing as this is just a 2D game.
I don’t understand what’s wrong, considering all of my other textures blend just fine. I tried some more testing, and even with a blank scene, the texture disappears when drawn with blending enabled. However, without blending, the texture is drawn, including the useless black pixels around it that should have been blended as transparency.
I’m not sure if I was too clear, and if so, I can provide more information. Any ideas?