File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,11 +153,13 @@ namespace vsg
153153
154154 bool _close = false ;
155155
156- ref_ptr<FrameStamp> _frameStamp;
157156
158157 Windows _windows;
159158
159+ bool _firstFrame = true ;
160160 clock::time_point _start_point;
161+ ref_ptr<FrameStamp> _frameStamp;
162+
161163 UIEvents _events;
162164 EventHandlers _eventHandlers;
163165
Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ Viewer::Viewer() :
3131 updateOperations(UpdateOperations::create()),
3232 animationManager(AnimationManager::create()),
3333 status(vsg::ActivityStatus::create()),
34- _start_point(clock::now())
34+ _firstFrame(true ),
35+ _start_point(clock::now()),
36+ _frameStamp(FrameStamp::create(_start_point, 0 , 0.0 ))
3537{
3638 CPU_INSTRUMENTATION_L1_NC (instrumentation, " Viewer costructor" , COLOR_VIEWER );
3739}
@@ -169,9 +171,9 @@ bool Viewer::advanceToNextFrame(double simulationTime)
169171
170172 // create FrameStamp for frame
171173 auto time = vsg::clock::now ();
172- if (!_frameStamp )
174+ if (_firstFrame )
173175 {
174- _start_point = time ;
176+ _firstFrame = false ;
175177
176178 if (simulationTime == UseTimeSinceStartPoint) simulationTime = 0.0 ;
177179
You can’t perform that action at this time.
0 commit comments