Archived

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

Nibbles

blending only certain things

Recommended Posts

hey, waz wondering how to blend only certain polygons. tried : glDisable(GL_BLEND); glEnable(GL_DEPTH_TEST); draw_solidstuff(); glDisable(GL_DEPTH_TEST); glEnable(GL_BLEND); draw_transparentstuff(); but it doesn''t seem to work.. everying gets blended someway or another. Thanks, Scott "If you try and don''t succeed, destroy all evidence that you tried."

Share this post


Link to post
Share on other sites
you got to set an alpha ...thing which is like the transparency or something.... not really sure try using glColor4f(r,g,b,a);
a is the alpha or transparency... i think...

Share this post


Link to post
Share on other sites
Why are you disabling GL_DEPTH_TEST before drawing translucent stuff? If your translucent stuff is behind solid stuff, it will draw through the solid object because depth test is off.
Try not disabling the depth test, see if that works

Feel free to email me.

Share this post


Link to post
Share on other sites
hehe, the same mistake most people do I guess, read the tutorial on blending, see the glDisable(GL_DEPTH_TEST); and thinks that its something important for blending , I had a hard time blending aswell, before I realised that glDisable(GL_DEPTH_TEST); shouldn''t be used all the time

newbie2001

Share this post


Link to post
Share on other sites
damn i''m dumb, as if i didn''t try that

That made it work very easily

thanks,
Scott

"If you try and don''t succeed, destroy all evidence that you tried."

Share this post


Link to post
Share on other sites