阅读背景:

osg中设置线宽和点的大小

来源:互联网 
#include <osg/LineWidth>
#include <osg/Point>



osg::ref_ptr<osg::StateSet> stateset = lineGeode->getOrCreateStateSet();
osg::ref_ptr<osg::LineWidth> lineWid = new osg::LineWidth(10.0f);

stateset->setAttribute(lineWid);


//注意设置点的大小前提是几何图元必须是osg::PrimitiveSet::POINTS
	osg::StateSet* stateSet = root->getOrCreateStateSet();
	osg::Point* pointSize = new osg::Point;
	pointSize->setSize(4.0);
	stateSet->setAttribute(pointSize);#include <osg/LineWidth>
#include <osg/Point



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: