Re: [osg-users] How to overcome trnasparency blending distortion

2011-12-15 Thread Filip Arlet
Hi,

Did you tried to set Blending Function ?
osg::BlendFunc class, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA is always a good 
starting point.

Cheers,
Filip

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44390#44390





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to overcome trnasparency blending distortion

2011-12-15 Thread Tolga Yilmaz
Hi,
I just understood that the problem is about releasing the object and also other 
primitives that i've added into pyramidGeometry. Because reusing and updating 
the pyramidGeometry(i.e rotating about some axis in a simulation) each time the 
drawing methods were releasing and creating a new one(maybe per each frame) the 
object just seems distorted. So i've just controlled the pointers if they 
created or not and after that added the primiteves without releasing them. If 
anybody has the same problem i can write the wrong and true codes here
... 

Thank you!

Cheers,
Tolga

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44402#44402





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to overcome trnasparency blending distortion

2011-12-14 Thread Tolga Yilmaz
Hi,
when i'm drawing a transparent pyramid it is ok; but while i rotating via  
transformation matrix this pyramid outside this updating makes distortions in 
the pyramid just like the triangle primitives have patterns. I tried other 
blending modes else than GL_BLEND and mede stateattr protected etc. but didnt 
work.  How i can overcome this? The little code that i wrote:

Code:

pyramidGeometry-getOrCreateStateSet()-setMode(GL_BLEND, 
osg::StateAttribute::ON);

pyramidGeometry-getOrCreateStateSet()-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
Map3DFOVObject-addDrawable(pyramidGeometry.release());
FOVTransformMatrix-addChild(Map3DFOVObject.get());


[/code]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44382#44382





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org