#pragma comment(lib,"OpenThreadsd.lib")
#pragma comment(lib,"osgViewerd.lib")
#pragma comment(lib,"osgDBd.lib")
#pragma comment(lib,"osgd.lib")
#pragma comment(lib,"osgGAd.lib")
#include <osgViewer/Viewer>
#include <osgDB/ReadFile>
#include <osg/Node>
#include <osg/Material>
#include <osg/ShapeDrawable>
#include <osg/StateSet>
#include <osg/Image>
#include <osg/Texture2D>
#include <osgGA/StateSetManipulator>
int main()
{
osg::ref_ptr<osgViewer::Viewer>viewer = new osgViewer::Viewer;
osg::ref_ptr<osg::Geode>geode = new osg::Geode;
osg::ref_ptr<osg::Sphere>sphere = new osg::Sphere(osg::Vec3(0,0,0),2.0);
osg::ref_ptr<osg::ShapeDrawable> shapeDrawable = new osg::ShapeDrawable(sphere);
osg::ref_ptr<osg::Texture2D>texture = new osg::Texture2D();
geode->addDrawable(shapeDrawable);
//设置材质
osg::ref_ptr&l
osg纹理材质设置
最新推荐文章于 2024-01-18 09:18:55 发布