• Advertisement

Archived

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

transparency

This topic is 5465 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
...
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
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

  • Advertisement