I've tried GL_MULTISAMPLE_ARB, but the effect is not so obvious, since I don't 
even know and control how much samples the graphics card has been taking.

Is there any DIY way to control this, can fragment shader do this?

thanks

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephan Huber
Sent: 2006年10月9日 20:44
To: osg users
Subject: Re: [osg-users] How to set up multisampling

Ivan Bolčina schrieb:
> Hi.

> I would like to enable multisampling on certain nodes. How to do it?


You can smooth certain nodes via GL_LINE_SMOOTH, GL_POLYGON_SMOOTH:
node->getOrCreateStateSet()->setMode(GL_LINE_SMOOTH, 
osg::StateAttribute::ON);// or ::OFF

node->getOrCreateStateSet()->setMode(GL_POLYGON_SMOOTH, 
osg::StateAttribute::ON);// or ::OFF

If you enabled FSAA then you can control the multisampling of nodes via 
the GL_MULTISAMPLE_ARB-attribute:

node->getOrCreateStateSet()->setMode(GL_MULTISAMPLE_ARB, 
osg::StateAttribute::ON); // or ::OFF

GL_MULTISAMPLE_ARB is not supported on every hardware/platform, YMMV.

There seems to be another extension controlling multisampling:
GL_MULTISAMPLE_SGIS, but I have no knowledge about that.


hope that helps,
Stephan
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to