I have just review osgviewerQT and have tracked down the aspect ratio
issue to the example not explictly setting the projection matrix for
the created windows aspect ratio, the constructor now reads:

       ViewerQT(QWidget * parent = 0, const char * name = 0, const
QGLWidget * shareWidget = 0, WindowFlags f = 0):
           AdapterWidget( parent, name, shareWidget, f )
       {
           getCamera()->setViewport(new osg::Viewport(0,0,width(),height()));
           getCamera()->setProjectionMatrixAsPerspective(30.0f,
static_cast<double>(width())/static_cast<double>(height()), 1.0f,
10000.0f);
           getCamera()->setGraphicsContext(getGraphicsWindow());

           setThreadingModel(osgViewer::Viewer::SingleThreaded);

           connect(&_timer, SIGNAL(timeout()), this, SLOT(updateGL()));
           _timer.start(10);
       }

Note, the setProjectionMatrixAsPerspective call.  This change in now
checked into SVN.  The modified example is also attached.

Robert.

Attachment: osgviewerQT.cpp
Description: binary/octet-stream

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to