Commit: 98dab49c63a277a32d6c5f6f2bd5516378a3a110
Author: Germano
Date:   Wed Feb 14 14:22:04 2018 -0200
Branches: temp-drawcontext
https://developer.blender.org/rB98dab49c63a277a32d6c5f6f2bd5516378a3a110

GHOST: Remove exception from multiple context on intel cards

This exception was added in commit rB66cee6366587

Apparently the problem only occurs with Intel 9xx series cards.
Since these cards do not support OpenGL 3.2, they will not be compatible with 
blender2.8 anyway.

===================================================================

M       intern/ghost/intern/GHOST_ContextWGL.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_ContextWGL.cpp 
b/intern/ghost/intern/GHOST_ContextWGL.cpp
index cb79ffcf635..6842a029e33 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextWGL.cpp
@@ -43,19 +43,6 @@
 HGLRC GHOST_ContextWGL::s_sharedHGLRC = NULL;
 int   GHOST_ContextWGL::s_sharedCount = 0;
 
-bool GHOST_ContextWGL::s_singleContextMode = false;
-
-
-/* Intel video-cards don't work fine with multiple contexts and
- * have to share the same context for all windows.
- * But if we just share context for all windows it could work incorrect
- * with multiple videocards configuration. Suppose, that Intel videocards
- * can't be in multiple-devices configuration. */
-static bool is_crappy_intel_card()
-{
-       return strstr((const char *)glGetString(GL_VENDOR), "Intel") != NULL;
-}
-
 
 GHOST_ContextWGL::GHOST_ContextWGL(
         bool stereoVisual,
@@ -393,8 +380,6 @@ void 
GHOST_ContextWGL::initContextWGLEW(PIXELFORMATDESCRIPTOR &preferredPFD)
        m_dummyVersion  = _strdup(reinterpret_cast<const char 
*>(glGetString(GL_VERSION)));
 #endif
 
-       s_singleContextMode = is_crappy_intel_card();
-
 finalize:
        WIN32_CHK(::wglMakeCurrent(prevHDC, prevHGLRC));
 
@@ -904,22 +889,19 @@ GHOST_TSuccess 
GHOST_ContextWGL::initializeDrawingContext()
 
                iAttributes.push_back(0);
 
-               if (!s_singleContextMode || s_sharedHGLRC == NULL)
-                       m_hGLRC = ::wglCreateContextAttribsARB(m_hDC, NULL, 
&(iAttributes[0]));
-               else
-                       m_hGLRC = s_sharedHGLRC;
+               m_hGLRC = ::wglCreateContextAttribsARB(m_hDC, NULL, 
&(iAttributes[0]));
        }
 
        if (!WIN32_CHK(m_hGLRC != NULL)) {
                goto error;
        }
 
-       if (s_sharedHGLRC == NULL)
-               s_sharedHGLRC = m_hGLRC;
-
        s_sharedCount++;
 
-       if (!s_singleContextMode && s_sharedHGLRC != m_hGLRC && 
!WIN32_CHK(::wglShareLists(s_sharedHGLRC, m_hGLRC))) {
+       if (s_sharedHGLRC == NULL) {
+               s_sharedHGLRC = m_hGLRC;
+       }
+       else if (!WIN32_CHK(::wglShareLists(s_sharedHGLRC, m_hGLRC))) {
                goto error;
        }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to