Added WindowData structures to GraphicsWindowX11,Win32 and Carbon to help support

GraphicsWindow inheriting their window handles from an external toolkit
This commit is contained in:
Robert Osfield
2007-03-16 13:22:05 +00:00
parent bfdc645a09
commit aa28f60357
7 changed files with 45 additions and 11 deletions

View File

@@ -78,9 +78,19 @@ class GraphicsWindowWin32 : public osgViewer::GraphicsWindow
/** Handle a native (Win32) windowing event as received from the system */
virtual LRESULT handleNativeWindowingEvent( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
/** WindowData is used to pass in the Win32 window handle attached the GraphicsContext::Traits structure.*/
struct WindowData : public osg::Referenced
{
WindowData(HWND window):
_hwnd(window) {}
HWND _hwnd;
};
protected:
void init();
void init(WindowData* inheritedWindowData=0);
void registerWindowClass();
@@ -100,6 +110,7 @@ class GraphicsWindowWin32 : public osgViewer::GraphicsWindow
HGLRC getWGLContext() { return _hglrc; }
bool _ownsWindow;
HWND _hwnd;
HDC _hdc;
HGLRC _hglrc;