Removed the variables which were duplicated in osgGLUT::Viewer and

osgGLUT::Window, standardising on the Window ones, and therefore removing
an unitialized variable that had been introduced.  This caused a crash
under WindowsXP due to send invalid values to glutReshapeWindow.
This commit is contained in:
Robert Osfield 2001-12-31 23:21:16 +00:00
parent bd0f334329
commit c518d69013
2 changed files with 4 additions and 7 deletions

View File

@ -124,15 +124,12 @@ class OSGGLUT_EXPORT Viewer : public Window, osgUtil::GUIActionAdapter
bool _viewFrustumCullingActive;
bool _smallFeatureCullingActive;
int mx, my, mbutton;
int polymode;
int texture;
int backface;
int lighting;
int flat_shade;
int _two_sided_lighting;
bool fullscreen;
int _saved_wx, _saved_wy, _saved_ww,_saved_wh;
float frRate; // gwm Jul 2001 added convolved ('averaged') frame rate
int _printStats; // gwm Jul 2001 change from bool
struct { // gwm Jul 2001, added for display of statistics

View File

@ -704,8 +704,8 @@ void Viewer::mouseMotion(int x, int y)
// osg::notify(osg::INFO) << "Handled mouseMotion "<<ea->_buttonMask<<" x="<<ea->_mx<<" y="<<ea->_my<< std::endl;
}
mx = x;
my = y;
_mx = x;
_my = y;
}
@ -942,8 +942,8 @@ void Viewer::keyboard(unsigned char key, int x, int y)
break;
case 'f' :
fullscreen = !fullscreen;
if (fullscreen)
_fullscreen = !_fullscreen;
if (_fullscreen)
{
_saved_ww = _ww;
_saved_wh = _wh;