|
我是刚接触osg的新人,在学习肖鹏的OSG编程指南,但按照里面写的主程序代码编完后,release运行就显示
求大神们帮帮忙!
以下为本人的代码。
int main()
{
osg::ref_ptr<osgViewer::Viewer> viewer=new osgViewer::Viewer();
osg::ref_ptr<osg::Group> root=new osg::Group();
osg::ref_ptr<osg::Image> image=osgDB::readImageFile("Images/tree().rgba");
osg::ref_ptr<osg:ositionAttitudeTransform> pat=new osg::PositionAttitudeTransform();
pat->setScale(osg::Vec3(5.0f,5.0f,5.0f));
pat->addChild(createBillBoardTree(image.get()));
root->addChild(pat.get());
root->addChild(osgDB::readNodeFile("cow.osg"));
osgUtil::Optimizer optimizer;
optimizer.optimize(root.get());
viewer->setSceneData(root.get());
viewer->realize();
viewer->run();
} |
|