Re: [Plib-users] Semi-transparent plane
Brought to you by:
sjbaker
From: Martin H. <how...@os...> - 2001-01-18 01:29:47
|
Steve Baker jotted down the following: > Martin Howard wrote: >> So, please, excuse a dumb beginner, but am I on the right track with >> callbacks? How do I control drawing order? > > You don't need to do that. SSG does it for you...just sit back and enjoy > the ride! Quick summary: ssgSimpleState does indeed work for materials other than solid white, or textures. I downloaded the source for TuxKart and TuxAQFH. They both use material.cxx and material.h to define materials. Translucent objects do: state->setTranlucent(); state->enable(GL_ALPHA_TEST); state->setAlphaClamp(alpha_ref); state->enable(GL_BLEND); I do the same in my code now, but I either get a plane which is opaque, or not rendered at all, depending upon the value of the vertex colours to 'alpha_ref' (alpha <= alpha_ref doesn't render). If I don't call setAlphaClamp() at all, then I get an opaque plane. Also, I'm no longer fiddling around with glBlendFunc() or glDepthMask(), but leaving them at whatever defaults SSG sets them to. Drawing order appears to be correct, but I still don't get any translucency. Anyone got any other ideas? M. -- Martin Howard | "Why do I think that MacOS is better than Visiting Scholar, CSEL, OSU | Windows? Well, you can put sideburns and email: how...@os... | shades on a 50-year old guy...but that still www: http://mvhoward.i.am/ | don't make him Elvis" -- Unknown +-------------------------------------------- |