Revision: 32622
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32622
Author:   jesterking
Date:     2010-10-21 09:16:02 +0200 (Thu, 21 Oct 2010)

Log Message:
-----------
* Use HWND_DESKTOP as parent for Blender Windows.
* Reorder freeing of OpenGL context code.

Modified Paths:
--------------
    trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp     2010-10-21 
07:14:31 UTC (rev 32621)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp     2010-10-21 
07:16:02 UTC (rev 32622)
@@ -175,7 +175,7 @@
                        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 @@
                        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 @@
                        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 @@
        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;
                }


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to