diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2010-10-21 11:16:02 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2010-10-21 11:16:02 +0400 |
commit | 3cbb5611d5db8e441adb6552f5abbe34312a473e (patch) | |
tree | 66b5edfc7452a42aefc1b78bba5fd6b46f776656 /intern | |
parent | 9e73da71f51df641cb72cb9f7a5d52f2e8136b06 (diff) |
* Use HWND_DESKTOP as parent for Blender Windows.
* Reorder freeing of OpenGL context code.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 75abc110743..3512f9c4aeb 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -175,7 +175,7 @@ GHOST_WindowWin32::GHOST_WindowWin32( top, // vertical position of window width, // window width height, // window height - 0, // handle to parent or owner window + HWND_DESKTOP, // handle to parent or owner window 0, // handle to menu or child-window identifier ::GetModuleHandle(0), // handle to application instance 0); // pointer to window-creation data @@ -189,7 +189,7 @@ GHOST_WindowWin32::GHOST_WindowWin32( top, // vertical position of window width, // window width height, // window height - 0, // handle to parent or owner window + HWND_DESKTOP, // handle to parent or owner window 0, // handle to menu or child-window identifier ::GetModuleHandle(0), // handle to application instance 0); // pointer to window-creation data @@ -695,7 +695,7 @@ GHOST_TSuccess GHOST_WindowWin32::installDrawingContext(GHOST_TDrawingContextTyp m_hGlRc = ::wglCreateContext(m_hDC); if (m_hGlRc) { if (s_firsthGLRc) { - wglShareLists(s_firsthGLRc, m_hGlRc); + ::wglShareLists(s_firsthGLRc, m_hGlRc); } else { s_firsthGLRc = m_hGlRc; } @@ -761,9 +761,10 @@ GHOST_TSuccess GHOST_WindowWin32::removeDrawingContext() switch (m_drawingContextType) { case GHOST_kDrawingContextTypeOpenGL: if (m_hGlRc) { + bool first = m_hGlRc == s_firsthGLRc; success = ::wglDeleteContext(m_hGlRc) == TRUE ? GHOST_kSuccess : GHOST_kFailure; - if (m_hGlRc == s_firsthGLRc) { - s_firsthGLRc = NULL; + if (first) { + s_firsthGLRc = 0; } m_hGlRc = 0; } |