Changeset 6366
- Timestamp:
- 03/16/07 14:22:05
- Files:
-
- OpenSceneGraph/trunk/include/osg/GraphicsContext (modified) (1 diff)
- OpenSceneGraph/trunk/include/osgViewer/GraphicsWindowCarbon (modified) (4 diffs)
- OpenSceneGraph/trunk/include/osgViewer/GraphicsWindowWin32 (modified) (2 diffs)
- OpenSceneGraph/trunk/include/osgViewer/GraphicsWindowX11 (modified) (3 diffs)
- OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowCarbon.cpp (modified) (1 diff)
- OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowWin32.cpp (modified) (3 diffs)
- OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowX11.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OpenSceneGraph/trunk/include/osg/GraphicsContext
r6337 r6366 126 126 GraphicsContext* sharedContext; 127 127 128 osg::ref_ptr<osg::Referenced> inher tedWindowData;128 osg::ref_ptr<osg::Referenced> inheritedWindowData; 129 129 }; 130 130 OpenSceneGraph/trunk/include/osgViewer/GraphicsWindowCarbon
r6204 r6366 33 33 34 34 GraphicsWindowCarbon(osg::GraphicsContext::Traits* traits): 35 _ownWindow(true), 35 36 _valid(false), 36 37 _initialized(false), … … 39 40 _traits = traits; 40 41 41 init( );42 init(traits ? dynamic_cast<WindowData*>(traits->inheritedWindowData.get()) : 0); 42 43 43 44 if (valid()) … … 99 100 bool handleKeyboardEvent(EventRef theEvent); 100 101 102 /** WindowData is used to pass in the X11 window handle attached the GraphicsContext::Traits structure. */ 103 struct WindowData : public osg::Referenced 104 { 105 WindowData(Window window): 106 _window(window) {} 107 108 Window _window; 109 }; 110 101 111 protected: 102 112 103 void init( );113 void init(WindowData* inheritedWindowData=0); 104 114 105 115 void transformMouseXY(float& x, float& y); … … 112 122 bool _useWindowDecoration; 113 123 124 bool _ownsWindow; 114 125 WindowRef _window; 115 126 AGLContext _context; OpenSceneGraph/trunk/include/osgViewer/GraphicsWindowWin32
r6205 r6366 79 79 virtual LRESULT handleNativeWindowingEvent( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); 80 80 81 /** WindowData is used to pass in the Win32 window handle attached the GraphicsContext::Traits structure.*/ 82 struct WindowData : public osg::Referenced 83 { 84 WindowData(HWND window): 85 _hwnd(window) {} 86 87 HWND _hwnd; 88 }; 89 90 81 91 protected: 82 92 83 void init( );93 void init(WindowData* inheritedWindowData=0); 84 94 85 95 void registerWindowClass(); … … 101 111 HGLRC getWGLContext() { return _hglrc; } 102 112 113 bool _ownsWindow; 103 114 HWND _hwnd; 104 115 HDC _hdc; OpenSceneGraph/trunk/include/osgViewer/GraphicsWindowX11
r6204 r6366 51 51 _traits = traits; 52 52 53 init( );53 init(traits ? dynamic_cast<WindowData*>(traits->inheritedWindowData.get()) : 0); 54 54 55 55 if (valid()) … … 109 109 virtual void useCursor(bool cursorOn); 110 110 111 /** WindowData is used to pass in the X11 window handle attached the GraphicsContext::Traits structure. */ 112 struct WindowData : public osg::Referenced 113 { 114 WindowData(Window window): 115 _window(window) {} 116 117 Window _window; 118 }; 119 111 120 public: 112 121 … … 128 137 129 138 bool createVisualInfo(); 130 void init(); 139 140 void init(WindowData* inheritedWindowData=0); 131 141 132 142 void transformMouseXY(float& x, float& y); OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowCarbon.cpp
r6220 r6366 537 537 } 538 538 539 void GraphicsWindowCarbon::init( )539 void GraphicsWindowCarbon::init(WindowData* inheritedWindowData) 540 540 { 541 541 _closeRequested = false; OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowWin32.cpp
r6205 r6366 981 981 982 982 GraphicsWindowWin32::GraphicsWindowWin32( osg::GraphicsContext::Traits* traits ) 983 : _hwnd(0), 983 : 984 _ownsWindow(true), 985 _hwnd(0), 984 986 _hdc(0), 985 987 _hglrc(0), … … 1001 1003 _traits = traits; 1002 1004 1003 init( );1005 init(traits ? dynamic_cast<WindowData*>(traits->inheritedWindowData.get()) : 0); 1004 1006 1005 1007 if (valid()) … … 1026 1028 } 1027 1029 1028 void GraphicsWindowWin32::init( )1030 void GraphicsWindowWin32::init(WindowData* inheritedWindowData) 1029 1031 { 1030 1032 if (!_initialized) OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowX11.cpp
r6204 r6366 368 368 } 369 369 370 void GraphicsWindowX11::init( )370 void GraphicsWindowX11::init(WindowData* inheritedWindowData) 371 371 { 372 372 if (_initialized) return;
