transparency

Started by
5 comments, last by pIpEs ClaNGoR 21 years, 1 month ago
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!!!
---------------------------The pipes clangor all the time.
Advertisement
Are you remembering to disable blending before you render the other quads?
i.e. glDisable(GL_BLEND);
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!!!
---------------------------The pipes clangor all the time.
code snippet will help us help u...
- To learn, we share... Give some to take some -
...
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!!!
---------------------------The pipes clangor all the time.
Call glEnd() before you disable blending and enable depth testing. Those two functions wont work between glBegin() & glEnd().
holy sh*t!! cool thax. I had glEnd(); after! HA!

[edited by - pIpEs ClaNGoR on March 7, 2003 3:52:18 PM]
---------------------------The pipes clangor all the time.

This topic is closed to new replies.

Advertisement