osg::DisplaySettings::instance()->setNumMultiSamples();
在osg+mfc下成功实现抗锯齿,在程序初始化的时候,即在osg控制类中,我的是OSG_MFC.cpp(头文件中#include <osg/Multisample>)中的 void cOSG::InitCameraConfig(void){}; 函数中加上:
traits->samples=;
osg::Multisample* pms=new osg::Multisample;
pms->setSampleCoverage(,true);
mRoot->getOrCreateStateSet()->setAttributeAndModes(pms,osg::StateAttribute::ON);