#include<Windows.h>
#include <osgDB/ReadFile>
#include <osgViewer/Viewer>
#include <osg/Node>
#include <osg/Geode>
#include <osg/Geometry>
#include <osg/Group>
#include <osg/Texture2D>
#include <osg/TexGen>
#include <osg/TexEnv>
#include<osgViewer/ViewerEventHandlers>
//osgGA相关的库
#include<osgGA/StateSetManipulator>
void main()
{
osgViewer::Viewer* viewer = new osgViewer::Viewer;
//添加状态事件,可以相应键盘和鼠标事件,响应L T B W
viewer->addEventHandler(new osgGA::StateSetManipulator(viewer->getCamera()->getOrCreateStateSet()));
//窗口大小变化,响应F
viewer->addEventHandler(new osgViewer::WindowSizeHandler);
//添加路径记录 Z
viewer->addEventHandler(new osgViewer::RecordCamer
osg模型贴图
最新推荐文章于 2022-10-31 19:37:28 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)