I’m just writing a sample openGL program to learn the basic’s, and my question is: what gl functions and (in what order to call 'em) do I need to make the colors of my texture transparent for the following world object? Do I need to turn depth test/buffer off? Oh, and my image is an alpha image (ie. 4 bytes, 1 for each of R, G, B and 1 for the alpha) and I have set all the alpha’a (0 or 255). TIA!
…
post = glGenLists(1);
glNewList(post, GL_COMPILE);
glBindTexture(GL_TEXTURE_2D, texture[0]);
glEnable(GL_TEXTURE_2D);
glBegin(GL_QUADS);
for (int i = 0; i < 2; ++i) // For example.
{
glTexCoord2f(0.0f, 0.0f); glVertex3f(0.0f + i, 0.0f, 1.0f + i);
glTexCoord2f(1.0f, 0.0f); glVertex3f(1.0f + i, 0.0f, 1.0f + i);
glTexCoord2f(1.0f, 1.0f); glVertex3f(1.0f + i, 1.0f, 1.0f + i);
glTexCoord2f(0.0f, 1.0f); glVertex3f(0.0f + i, 1.0f, 1.0f + i);
glTexCoord2f(0.0f, 0.0f); glVertex3f(0.5f + i, 0.0f, 0.5f + i);
glTexCoord2f(1.0f, 0.0f); glVertex3f(0.5f + i, 0.0f, 1.5f + i);
glTexCoord2f(1.0f, 1.0f); glVertex3f(0.5f + i, 1.0f, 1.5f + i);
glTexCoord2f(0.0f, 1.0f); glVertex3f(0.5f + i, 1.0f, 0.5f + i);
}
glEnd();
glDisable(GL_TEXTURE_2D);
glEndList();
…