[osg-users] OSG with QGLWidget and Anti Aliasing

Dominic Stalder dominic.stalder at bluewin.ch
Wed Nov 11 02:23:34 PST 2009


Sorry, searched on the wrong framework. I could solve the problem in Qt 
itself:

QGLFormat fmt;
QGLFormat::setDefaultFormat(fmt);
fmt.setSamples(4);
fmt.setSampleBuffers(true);

qglwidget->setFormat(fmt);


> Hi there
>
> I am absolutly new to the OSG stuff (and it's the first time I attend in 
> a mailing list) and trying to get my OSG work in a Qt environment. I 
> made my own OSG/Qt class, which inherits from QGLWidget and 
> osgViewer::Viewer. Most of the OSG stuff works, but I can't enable the 
> anti aliasing or the multi sampling.
>
> I tried the following two configurations:
>
> 1.
> ref_ptr< DisplaySettings > displaySettings = new DisplaySettings;
> displaySettings->setNumMultiSamples(16);
> modelView->setDisplaySettings( displaySettings.get() );
>
> 2.
> osg::DisplaySettings::instance()->setNumMultiSamples(8);
>
> But this didn't work. Does anybody had the same problems or have some 
> ideas to solve this problem. I attached my class and header files.
>
> If I'm doing something wrong concerning the "mailing list rules", just 
> let me know.
>
> Thanks a lot and regards
> Dominic
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list