OSG
依山居
这个作者很懒,什么都没留下…
展开
-
OSG 包含osgText报错
C2086: 'int WINGDIAPI' : redefinition errors in Open Scene Graph?The solution is: [Obtained from this website]You need to add WIN32 to the defines in your project. In Visual Studio, right-click on you...转载 2018-03-22 19:14:52 · 292 阅读 · 0 评论 -
osg 视口找不到模型
osg仿真之后,找不到模型。目前,我已知的原因可能有两个:1.模型路径不对 model = osgDB::readNodeFile("cow.osg");这个是默认的路径,我的在C:\OSG\data。如果文件在其他路径内,需要添加工作路径。如:model = osgDB::readNodeFile("C:/Users/hp/Desktop/test_model.OSGB");2.屏幕分辨率存在缩...原创 2018-04-02 18:54:28 · 1535 阅读 · 1 评论 -
osg 创建窗口 traits 和 viewPort的关系
1.traits设置的是窗口的特性。其中x,y表示的是所建立的窗口左上角,在屏幕上的位置.原点在屏幕的左上角,向右为x正方向,想下为y正方向。osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits; traits->x = 300; traits->y = ...原创 2018-04-02 20:27:57 · 1726 阅读 · 0 评论