Hi all,

I'm using a SimpleSceneManager (inside a QGLWidget) to manage a scene that 
contains a transparent object. The problem is that I can't obtain a proper 
rendering. I'm working on Linux with the latest OpenSG (rev. 2464).

I'm not so familiar with OpenSG 2.0. I remember that in the 1.8 release was 
necessary to set ZWriteTrans and SortTrans to true inside the RenderAction.

For setting ZWriteTrans and SortTrans I'm using this code:

ract = OSG::RenderAction::create();
OSG::RenderOptionsRefPtr options = OSG::RenderOptions::create();    
options->setZWriteTrans(true);
options->setSortTrans(true);
options->activate(ract);
// ract->setZWriteTrans(true); (?)
sceneManager->setAction(ract);

Then I've added a BlendChunk to the object's material:

OSG::BlendChunkRefPtr blendChunk = OSG::BlendChunk::create();
blendChunk->setSrcFactor(GL_SRC_ALPHA);
blendChunk->setDestFactor(GL_ONE_MINUS_SRC_ALPHA);
chunkMaterial->addChunk(blendChunk);

But still transparency is not working properly. 

What is the right procedure?

Is there any test program that uses these effects?

Thanks

--
Mauro

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to