[osg-users] Antialising
Voerman, L.
l.voerman at rug.nl
Thu Aug 13 00:42:00 PDT 2015
You still need to enable anti-aliasing for your scenegraph:
if (osg::GraphicsContext* context = camera->getGraphicsContext() {
unsigned int contextID = context->getState()->getContextID();
if (osg::isGLExtensionOrVersionSupported(contextID ,
"GL_ARB_multisample",1.3)){
osg::ref_ptr<osg::StateSet> stateSet =
_sceneGroup->getOrCreateStateSet();
stateSet->setMode(GL_MULTISAMPLE_ARB, osg::StateAttribute::ON);
}
}
Regards, Laurens Voerman.
On Wed, Aug 12, 2015 at 3:36 PM, Felix Goldberg <felix.goldberg at gmail.com>
wrote:
> Hi,
>
> I am using a MATLAB port of OSG (can't yet post urls so google "matlab 3d
> rendering", sorry) and am getting aliased images. So I'm looking for a way
> to modify the code to perform anti-aliasing and I thought I'd done the
> trick by adding the line
>
>
> Code:
> traits->samples=16;
>
>
>
> right after
>
>
> Code:
> osg::ref_ptr<osg::GraphicsContext::Traits> traits = new
> osg::GraphicsContext::Traits;
>
>
>
> inside the function EngineOSG::initCanvas. However, when I compile and run
> I get exactly the same aliased images. What am I doing wrong or neglecting
> to do?
>
> Any help will be very much appreciated.
>
> ...
>
> Thank you!
>
> Cheers,
> Felix
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=64741#64741
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150813/31ff37bd/attachment-0003.htm>
More information about the osg-users
mailing list