Merge branch 'master' into blender2.8
[blender.git] / intern / ghost / intern / GHOST_WindowCocoa.mm
index 73c89f9d68d1b7a6800f25249c8340bc57902819..a018bbe15c6e417d7de7b1220c9baeb4faaf00f1 100644 (file)
@@ -1086,82 +1086,23 @@ GHOST_TSuccess GHOST_WindowCocoa::setOrder(GHOST_TWindowOrder order)
 GHOST_Context *GHOST_WindowCocoa::newDrawingContext(GHOST_TDrawingContextType type)
 {
        if (type == GHOST_kDrawingContextTypeOpenGL) {
-#if !defined(WITH_GL_EGL)
 
-#if defined(WITH_GL_PROFILE_CORE)
-               GHOST_Context *context = new GHOST_ContextCGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_openGLView,
-                       GL_CONTEXT_CORE_PROFILE_BIT,
-                       3, 2,
-                       GHOST_OPENGL_CGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_CGL_RESET_NOTIFICATION_STRATEGY);
-#elif defined(WITH_GL_PROFILE_ES20)
                GHOST_Context *context = new GHOST_ContextCGL(
                        m_wantStereoVisual,
                        m_wantNumOfAASamples,
                        m_window,
                        m_openGLView,
-                       CGL_CONTEXT_ES2_PROFILE_BIT_EXT,
-                       2, 0,
-                       GHOST_OPENGL_CGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_CGL_RESET_NOTIFICATION_STRATEGY);
-#elif defined(WITH_GL_PROFILE_COMPAT)
-               GHOST_Context *context = new GHOST_ContextCGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_openGLView,
-                       0, // profile bit
-                       0, 0,
-                       m_debug_context,
-                       GHOST_OPENGL_CGL_RESET_NOTIFICATION_STRATEGY);
-#else
-#  error
-#endif
-
-#else
 
 #if defined(WITH_GL_PROFILE_CORE)
-               GHOST_Context *context = new GHOST_ContextEGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_openGLView,
-                       EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT,
+                       GL_CONTEXT_CORE_PROFILE_BIT,
                        3, 2,
-                       GHOST_OPENGL_EGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY,
-                       EGL_OPENGL_API);
-#elif defined(WITH_GL_PROFILE_ES20)
-               GHOST_Context *context = new GHOST_ContextEGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_openGLView,
-                       0, // profile bit
-                       2, 0,
-                       GHOST_OPENGL_EGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY,
-                       EGL_OPENGL_ES_API);
-#elif defined(WITH_GL_PROFILE_COMPAT)
-               GHOST_Context *context = new GHOST_ContextEGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_openGLView,
-                       0, // profile bit
-                       0, 0,
-                       GHOST_OPENGL_EGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY,
-                       EGL_OPENGL_API);
 #else
-#  error
+                       0, // no profile bit
+                       2, 1,
 #endif
+                       GHOST_OPENGL_CGL_CONTEXT_FLAGS,
+                       GHOST_OPENGL_CGL_RESET_NOTIFICATION_STRATEGY);
 
-#endif
                if (context->initializeDrawingContext())
                        return context;
                else