Original Post
I have been trying to get alpha texture to work how i want all night. I have a bad headache from it as well. The problem is i load a tga(with alpha channel) it will only work as expected when I disable depth test and enable blending. i then enable depth test and disable blending so other stuff will work properly. Then it seemed that the alpha texture would always appear behind everything else. All the examples for alpha channels working they just enable blending. This can't be the right way can it? Here is what i do when i render my rgba textured objects. egit. Put code as a tag instead of source ><
glBlendFunc(GL_SRC_ALPHA,GL_ONE);
glEnable(GL_BLEND);
glDisable(GL_DEPTH_TEST);
glBindTexture(GL_TEXTURE_2D, m_textureObject[1]);
glBegin(GL_QUADS);
glTexCoord2f(1,1);glVertex3f(1.0, 1.0, 0.0);
glTexCoord2f(1,0);glVertex3f(1.0, -1.0, 0.0);
glTexCoord2f(0,0);glVertex3f(-1.0, -1.0, 0.0);
glTexCoord2f(0,1);glVertex3f(-1.0, 1.0, 0.0);
glEnd();
glDisable(GL_BLEND);
glEnable(GL_DEPTH_TEST);