Opaque area of textured quad shows up black

#1

The textured quad I’m drawing shows the opaque parts as black. The transparent parts show up correctly. Trying GL_REPLACE shows the colors correctly. Perhaps there is some kind of problem with lighting? The textures are powers of two in size.

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, 64, 32, 0, GL_RGBA, GL_UNSIGNED_BYTE, image);

public static void render(long win, int rb, int fb) {
        glEnable(GL_TEXTURE_2D);
        glEnable(GL_BLEND);
        glColor3f(1.0f,1.0f,1.0f);
        glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND);
        glBlendColor(1,  1,  1,  1);
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        glBindTexture(GL_TEXTURE_2D, texids[(windowheight==360)?9:10]);
        glBegin(GL_QUADS);

            [...]

        glEnd();
}
#2

I’d recommend reading up on how blend texturing and framebuffer blending work.

Are you sure you want GL_BLEND texturing? Here you’re using GL_BLEND texture env mode, but you don’t appear to be setting the texture env color (which it uses). Consider instead using GL_REPLACE (or using GL_MODULATE, if you want the product of the vertex color (possibly lit) and the texture color).

Also, why are you setting a glBlendColor when you’re not setting a glBlendFunc that makes use of it?