Show
Ignore:
Timestamp:
06/23/07 13:21:54 (6 years ago)
Author:
robert
Message:

Added setting of the Camera's projection matrix to fit the windowing aspect ratio.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgviewerFLTK/osgviewerFLTK.cpp

    r6941 r7019  
    103103            { 
    104104                getCamera()->setViewport(new osg::Viewport(0,0,w,h)); 
     105                getCamera()->setProjectionMatrixAsPerspective(30.0f, static_cast<double>(w)/static_cast<double>(h), 1.0f, 10000.0f); 
    105106                getCamera()->setGraphicsContext(getGraphicsWindow()); 
    106107                setThreadingModel(osgViewer::Viewer::SingleThreaded);