|
|
@ -66,7 +66,11 @@ RenderWidget::RenderWidget(QWidget *parent, Qt::WindowFlags f)
|
|
|
|
mView->getCamera()->setGraphicsContext(window);
|
|
|
|
mView->getCamera()->setGraphicsContext(window);
|
|
|
|
mView->getCamera()->setClearColor( osg::Vec4(0.2, 0.2, 0.6, 1.0) );
|
|
|
|
mView->getCamera()->setClearColor( osg::Vec4(0.2, 0.2, 0.6, 1.0) );
|
|
|
|
mView->getCamera()->setViewport( new osg::Viewport(0, 0, traits->width, traits->height) );
|
|
|
|
mView->getCamera()->setViewport( new osg::Viewport(0, 0, traits->width, traits->height) );
|
|
|
|
mView->getCamera()->setProjectionMatrixAsPerspective(30.0f, static_cast<double>(traits->width)/static_cast<double>(traits->height), 1.0f, 10000.0f );
|
|
|
|
|
|
|
|
|
|
|
|
mView->getCamera()->setProjectionMatrixAsPerspective(
|
|
|
|
|
|
|
|
CSMPrefs::get()["Rendering"]["camera-fov"].toDouble(),
|
|
|
|
|
|
|
|
static_cast<double>(traits->width)/static_cast<double>(traits->height),
|
|
|
|
|
|
|
|
1.0f, 10000.0f);
|
|
|
|
|
|
|
|
|
|
|
|
SceneUtil::LightManager* lightMgr = new SceneUtil::LightManager;
|
|
|
|
SceneUtil::LightManager* lightMgr = new SceneUtil::LightManager;
|
|
|
|
lightMgr->setStartLight(1);
|
|
|
|
lightMgr->setStartLight(1);
|
|
|
|