Try this code sample :

int main(int argc, char** argv) {
    osgViewer::Viewer viewer;
    osg::DisplaySettings::instance()->setNumMultiSamples(8);

    viewer.setSceneData(buildMyScene());
    return viewer.run();
}

Per Rosengren a écrit :
> I have tried to enable multi sampling, but it has no effect. This is how I try
> to activate it:
>
>
> modelView = new osgViewer::View;
>
> modelView->setUpViewInWindow
>               (400, //x
>                0, //y
>                640, //width
>                480); //height
>
> modelView->getCamera()->getOrCreateStateSet();
>
> stateSet->setAttributeAndModes(new osg::Multisample, osg::StateAttribute::ON);
>
> stateSet->setMode(GL_MULTISAMPLE, osg::StateAttribute::ON |
> osg::StateAttribute::OVERRIDE);
>
>
> I attach my output from glxinfo. It shows what extensions my nvidia card 
> supports.
>   
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


-- 
Lamoliatte Stephane
Ingenieur R&D

R.S.A. Cosmos
Z.I. de la Vaure - B.P.40
42290 Sorbiers, France
Tél : +33 (0)4 77 53 30 48
Fax : +33 (0)4 77 53 38 61

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to