Changeset 9624 for OpenSceneGraph/trunk/src/osgViewer/StatsHandler.cpp
- Timestamp:
- 02/02/09 18:15:40 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgViewer/StatsHandler.cpp
r9601 r9624 41 41 _viewerSceneChildNum(0), 42 42 _numBlocks(8), 43 _blockMultiplier(10000.0) 43 _blockMultiplier(10000.0), 44 _statsWidth(1280.0f), 45 _statsHeight(1024.0f) 44 46 { 45 47 _camera = new osg::Camera; … … 274 276 275 277 _camera->setViewport(0, 0, window->getTraits()->width, window->getTraits()->height); 278 276 279 _camera->setRenderOrder(osg::Camera::POST_RENDER, 10); 277 280 278 _camera->setProjectionMatrix(osg::Matrix::ortho2D(0 ,window->getTraits()->width,0,window->getTraits()->height));281 _camera->setProjectionMatrix(osg::Matrix::ortho2D(0.0,_statsWidth,0.0,_statsHeight)); 279 282 _camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF); 280 283 _camera->setViewMatrix(osg::Matrix::identity()); … … 1009 1012 float characterSize = 20.0f; 1010 1013 1011 osg::Vec3 pos(leftPos, 1000.0f,0.0f);1014 osg::Vec3 pos(leftPos, _statsHeight-24.0f,0.0f); 1012 1015 1013 1016 osg::Vec4 colorFR(1.0f,1.0f,1.0f,1.0f); … … 1096 1099 geode->addDrawable(createBackgroundRectangle( 1097 1100 pos + osg::Vec3(-backgroundMargin, characterSize + backgroundMargin, 0), 1098 _ camera->getViewport()->width()- 2 * backgroundMargin,1101 _statsWidth - 2 * backgroundMargin, 1099 1102 (3 + 4.5 * cameras.size()) * characterSize + 2 * backgroundMargin, 1100 1103 backgroundColor) ); … … 1200 1203 { 1201 1204 pos.y() -= (backgroundSpacing + 2 * backgroundMargin); 1202 float width = _ camera->getViewport()->width()- 4 * backgroundMargin;1205 float width = _statsWidth - 4 * backgroundMargin; 1203 1206 float height = 5 * characterSize; 1204 1207 … … 1243 1246 1244 1247 geode->addDrawable(createBackgroundRectangle( pos + osg::Vec3(-backgroundMargin, characterSize + backgroundMargin, 0), 1245 _ camera->getViewport()->width()- 2 * backgroundMargin,1248 _statsWidth - 2 * backgroundMargin, 1246 1249 characterSize + 2 * backgroundMargin, 1247 1250 backgroundColor));
