Show
Ignore:
Timestamp:
06/23/07 13:21:54 (7 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/src/osgViewer/Viewer.cpp

    r7017 r7019  
    826826    osgViewer::GraphicsWindowEmbedded* gw = new osgViewer::GraphicsWindowEmbedded(x,y,width,height); 
    827827    getCamera()->setViewport(new osg::Viewport(0,0,width,height)); 
     828    getCamera()->setProjectionMatrixAsPerspective(30.0f, static_cast<double>(width)/static_cast<double>(height), 1.0f, 10000.0f); 
    828829    getCamera()->setGraphicsContext(gw); 
    829830    return gw;