Hi Per,

If the visual isn't supported then osg::createGraphicsContext(Traits*)
will return NULL, so if get a null back then
you can relax the Traits and try to create the context again.

Robert.

On Sat, May 17, 2008 at 12:50 AM, Per Rosengren <[EMAIL PROTECTED]> wrote:
> I set multi sampling with the following code:
>
> ref_ptr< DisplaySettings > displaySettings = new DisplaySettings;
> displaySettings->setNumMultiSamples(16);
> displaySettings->setMinimumNumAlphaBits(8);
> modelView->setDisplaySettings( displaySettings.get() );
>
> If the graphics card does not support multi sampling, The program exits with
> this error message:
>
> Error: Not able to create requested visual.
>
> How can I make the program skip multi sampling and run without it if it is
> not supported?
>
> /Per
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to