Skip to content

Commit

Permalink
globe: fix osgearth 2.5 support (followup 6327558)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Mar 9, 2016
1 parent 6be8d06 commit de06cd7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/plugins/globe/globe_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,10 +964,17 @@ void GlobePlugin::setSkyParameters( bool enabled, const QDateTime& dateTime, boo
#else
Q_UNUSED( autoAmbience );
#endif
#if OSGEARTH_VERSION_GREATER_OR_EQUAL( 2, 7, 0 )
mSkyNode->setDateTime( DateTime( dateTime.date().year()
, dateTime.date().month()
, dateTime.date().day()
, dateTime.time().hour() + dateTime.time().minute() / 60.0 ) );
#else
mSkyNode->setDateTime( dateTime.date().year()
, dateTime.date().month()
, dateTime.date().day()
, dateTime.time().hour() + dateTime.time().minute() / 60.0 );
#endif
//sky->setSunPosition( osg::Vec3(0,-1,0) );
mSkyNode->attach( mOsgViewer );
mRootNode->addChild( mSkyNode );
Expand Down

0 comments on commit de06cd7

Please sign in to comment.