1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

LP-29 default light is now a SKY_LIGHT instead of a HEAD_LIGHT

and ambient light is defaulted to 0.6.
This commit is contained in:
Philippe Renon 2016-03-06 18:23:51 +01:00
parent 94b4d68400
commit a4fb576d4b

View File

@ -354,6 +354,10 @@ public:
// setup graphics context and camera
osg::GraphicsContext *gc = createGraphicsContext();
// TODO expose as Qml properties
view->setLightingMode(osgViewer::View::SKY_LIGHT);
view->getLight()->setAmbient(osg::Vec4(0.6f, 0.6f, 0.6f, 1.0f));
osg::Camera *camera = view->getCamera();
camera->setGraphicsContext(gc);
camera->setViewport(0, 0, gc->getTraits()->width, gc->getTraits()->height);