OpenSceneGraph-3.6.2 : http://www.openscenegraph.org/index.php/download-section/stable-releases/
3rdParty_VS2017_v141_x64_V11_small.7z : http://www.openscenegraph.org/index.php/download-section/dependencies/
OpenSceneGraph-Data-3.4.0.zip : http://www.openscenegraph.org/index.php/download-section/data/php
可能發生的錯誤:html
1.更改CmakeList.txt
set (CMAKE_PREFIX_PATH "osg源代碼路徑")
數據庫2.3rdParty第三方庫只編譯32位便可工具
3.VS2010安裝目錄下的VC->bin中的cvtres.exe,把它重命名,例如個人作法是cvtres[backup].exe。具體緣由自行百度COFF和LNK1123。post
OSG主要包含4個庫:OSG核心庫(Core Library) OSG工具庫(NodeKit) OSG插件庫 OSG內省庫(osgIntrospection)動畫
osg庫:基本數據類,負責提供基本場景圖類,構建場景圖形節點(節點類 狀態類 繪製類 向量和矩陣類),一些包含程序特定功能類(命令行解析和錯誤調試信息等)插件
OSG:先導篇 內存管理命令行
#include <osg/Node>
#include <osg/Geode>
#include <osg/Group>
#include <osg/Material>
#include <osg/Depth>
#include <osg/Projection>
#include <osg/MatrixTransform>
#include <osg/Camera>
#include <osg/io_utils>
#include <osg/BlendColor>
#include <osg/BlendFunc>
#include <osg/Point>
#include <osg/ComputeBoundsVisitor>
#include <osg/LineWidth>
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgDB/FileUtils>
#include <osgDB/FileNameUtils>
#include <osgFX/Scribe>
#include <osgGA/GUIEventHandler>
#include <osgGA/TrackballManipulator>
#include <osgManipulator/Dragger>
#include <osgManipulator/TranslateAxisDragger>
osgManipulator.lib
osgManipulatord.lib
#include <osgText/Text>
#include <osgUtil/Optimizer>
#include <osgUtil/LineSegmentIntersector> //線段相交類
#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>