每个窗体都会关联一个状态机
GraphicsWindowWin32::GraphicsWindowWin32( osg::GraphicsContext::Traits* traits )
: _currentCursor(0),
_windowProcedure(0),
_timeOfLastCheckEvents(-1.0),
_screenOriginX(0),
_screenOriginY(0),
_screenWidth(0),
_screenHeight(0),
_windowOriginXToRealize(0),
_windowOriginYToRealize(0),
_windowWidthToRealize(0),
_windowHeightToRealize(0),
_initialized(false),
_valid(false),
_realized(false),
_ownsWindow(true),
_closeWindow(false),
_destroyWindow(false),
_destroying(false),
_mouseCursor(InheritCursor),
_appMouseCursor(LeftArrowCursor),
_applyWorkaroundForMultimonitorMultithreadNVidiaWin32Issues( false )
{
setState( new osg::State );
}