Re: [osg-users] Step by step addDrawable and visualize current scene graph

2021-03-23 Thread Paul Jurczak
Thank you, Nathan. It solves my problem. On Tuesday, March 23, 2021 at 12:14:59 PM UTC-6 nmiel...@gmail.com wrote: > Paul, > > Looking at the OSG Viewer.cpp code, the run() function contains this code: > if (!getCameraManipulator() && getCamera()->getAllowEventFocus()) > { >

Re: [osg-users] Step by step addDrawable and visualize current scene graph

2021-03-23 Thread Nathan Mielcarek
Paul, Looking at the OSG Viewer.cpp code, the run() function contains this code: if (!getCameraManipulator() && getCamera()->getAllowEventFocus()) { setCameraManipulator(new osgGA::TrackballManipulator()); } Therefore, by adding this line before viewer.frame() is called makes

Re: [osg-users] Step by step addDrawable and visualize current scene graph

2021-03-22 Thread Alberto Luaces
Hi Paul, I guess you might have to viewer.realize() before the first call to .frame(). If that is not the case, please inspect inside the .run() method that does basically the same in just one call. -- Alberto ___ osg-users mailing list

[osg-users] Step by step addDrawable and visualize current scene graph

2021-03-21 Thread 'Paul Jurczak' via OpenSceneGraph Users
I'm just starting with OSG. I would like this (or similar) code: int main() { osgViewer::Viewer viewer; osg::Geode* geode = new osg::Geode(); viewer.setSceneData(geode); geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0, 0, 0), 1)));