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())
> {
>
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
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
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)));
4 matches
Mail list logo