Archived

This topic is now archived and is closed to further replies.

pIpEs ClaNGoR

transparency

Recommended Posts

pIpEs ClaNGoR    122
I want to make this one quad transparent and the rest of everything else solid. But no matter where I enable blinding everything is transparent. How can I make this one thing transparent? --------------------------- One day I will rule the world! HAHAHAHAHA!!!

Share this post


Link to post
Share on other sites
pIpEs ClaNGoR    122
yeah, I enable it before the poly I want to make see-through and disable after it but insted of that one everything is transparent!

---------------------------
One day I will rule the world! HAHAHAHAHA!!!

Share this post


Link to post
Share on other sites
pIpEs ClaNGoR    122
...
okay I have just made all the polygons that I wanted nontransparent
...

glEnable(GL_BLEND);
glDisable(GL_DEPTH_TEST);

glBindTexture(GL_TEXTURE_2D, texture[1]);
glBegin(GL_QUADS);

glTexCoord2f(0.0f, 1.0f); glVertex3f(0.0f, 0.0f, 0.0f);
glTexCoord2f(0.0f, 0.0f); glVertex3f(0.0f, 1.0f, 0.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, 1.0f, 0.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 0.0f, 0.0f);

glDisable(GL_BLEND);
glEnable(GL_DEPTH_TEST);

nowthat I have just used glEnable(GL_BLEND); everything is now transparent insted of that one square.

---------------------------
One day I will rule the world! HAHAHAHAHA!!!

Share this post


Link to post
Share on other sites
xiros    122
Call glEnd() before you disable blending and enable depth testing. Those two functions wont work between glBegin() & glEnd().

Share this post


Link to post
Share on other sites