R: [Plib-users] transparency
Brought to you by:
sjbaker
|
From: Paolo L. <p.l...@ci...> - 2002-11-22 09:56:11
|
Mat Davidson wrote:
> Ive tried every-which-way to use loader code to get textures into my
> project and its just not happening. What I really need is a way to get
> textures into my project through plib that have alpha channels. Is
> there a way to do this in plib?
Once loaded a .rgb or .rgba texture with alpha channel in a state, this code
works for me:
void enable_transparency( ssgLeaf *node )
{
ssgSimpleState *state = (ssgSimpleState *)node->getState();
state->enable( GL_BLEND );
state->setTranslucent();
}
For simple blending function I also set:
state->disable( GL_ALPHA_TEST );
Greetings -
Paolo Leoncini
-------------------------------------------------------------------------
Paolo Leoncini phone: +39 (0823) 623134
Visualization & Virtual Reality fax: +39 (0823) 623126
CIRA - Italian Center for Aerospace Researches mailto:p.l...@ci...
Via Maiorise - 81043 Capua (CE) Italy http://www.cira.it>
|