Thank you, Nathan. It solves my problem.<br><br><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Tuesday, March 23, 2021 at 12:14:59 PM UTC-6 nmiel...@gmail.com wrote:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr">Paul,<div><br></div><div>Looking at the OSG Viewer.cpp code, the run() function contains this code:</div><div>    if (!getCameraManipulator() && getCamera()->getAllowEventFocus())<br></div>    {<br>        setCameraManipulator(new osgGA::TrackballManipulator());<br>    }<div><br></div><div>Therefore, by adding this line before viewer.frame() is called makes the spheres appear as you expected:</div><div>    viewer.setCameraManipulator(new osgGA::TrackballManipulator());</div><div><br></div><div>-Nathan</div><div><br></div></div><br><div class="gmail_quote"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 21, 2021 at 5:31 PM 'Paul Jurczak' via OpenSceneGraph Users <<a href data-email-masked rel="nofollow">osg-...@googlegroups.com</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm just starting with OSG. I would like this (or similar) code: <div><br></div><div><div><div><div>    int main() {</div><div>      osgViewer::Viewer viewer;</div><div>      osg::Geode*       geode = new osg::Geode();</div><div>    </div><div>      viewer.setSceneData(geode);</div><div>      geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0, 0, 0), 1)));</div><div>    </div><div>      viewer.frame();</div><div>      this_thread::sleep_for(seconds(2));</div><div>    </div><div>      geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(2, 0, 0), 1)));</div><div>      </div><div>      return viewer.run();</div><div>    }</div></div></div></div><div><br></div><div>to display the first sphere and after 2s the second sphere, but it displays a blank screen for 2s instead and 2 spheres afterwards. What do I have to change?<br></div>

<p></p></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

-- <br>
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href data-email-masked rel="nofollow">osg-users+...@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/8d8ad5ea-8080-401c-b1c2-26345345c84en%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/osg-users/8d8ad5ea-8080-401c-b1c2-26345345c84en%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1616630775990000&usg=AFQjCNFw1r-18SlK64Q0VUSUaLuLKxT0eQ">https://groups.google.com/d/msgid/osg-users/8d8ad5ea-8080-401c-b1c2-26345345c84en%40googlegroups.com</a>.<br>
</blockquote></div>
</blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/e5dab9a2-111f-47bc-81a7-e7ef949e3d20n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/e5dab9a2-111f-47bc-81a7-e7ef949e3d20n%40googlegroups.com</a>.<br />