Changeset 20143

Show
Ignore:
Timestamp:
05/06/07 12:35:18 (2 years ago)
Author:
patrick
Message:

Fixed animation with OSG 1.9/2.0.

Submitted by: Doug McCorkle? < mccdo at iastate dot edu >

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/vrjuggler/vrj/Draw/OSG/OsgApp.h

    r20137 r20143  
    4141#include <vrj/Display/CameraProjection.h> 
    4242 
     43#include <osg/Version> 
    4344#include <osg/Vec3> 
    4445#include <osg/Matrix> 
     
    344345      // Update the frame stamp with information from this frame. 
    345346      mFrameStamp->setFrameNumber(mFrameNumber); 
    346       mFrameStamp->setReferenceTime(mHead->getTimeStamp().secd()); 
    347  
     347 
     348      const double head_time(mHead->getTimeStamp().secd()); 
     349      mFrameStamp->setReferenceTime(head_time); 
     350#if OSG_VERSION_MAJOR >= 1 && OSG_VERSION_MINOR > 2 
     351      mFrameStamp->setSimulationTime(head_time); 
     352#endif 
     353       
    348354      // Set up the time and frame number so time-dependent things (animations, 
    349355      // particle system) function correctly.