Moved the exit on escape into Window, and added a virtual free method on both
Window an Viewer to clean up the windows, this is now called before exit is finally called, ensure that more more memroy is clean up prior to exit.
This commit is contained in:
@@ -96,6 +96,8 @@ class OSGGLUT_EXPORT Viewer : public Window, public osgUtil::GUIActionAdapter
|
||||
|
||||
protected:
|
||||
|
||||
virtual void clear();
|
||||
|
||||
virtual void display();
|
||||
virtual void reshape(GLint w, GLint h);
|
||||
virtual void mouseMotion(int x, int y);
|
||||
@@ -142,6 +144,7 @@ class OSGGLUT_EXPORT Viewer : public Window, public osgUtil::GUIActionAdapter
|
||||
} times[3]; // store up to 3 frames worth of times
|
||||
bool _useDisplayLists;
|
||||
|
||||
|
||||
osg::Timer _timer;
|
||||
osg::Timer_t _tickRatePerSecond;
|
||||
osg::Timer_t _initialTick;
|
||||
|
||||
Reference in New Issue
Block a user