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/

Reply via email to