From db1f0e36163037c94857626be8ca20dd9ae5b168 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Sun, 22 Nov 2015 20:53:57 +0100 Subject: Error out on Windows if driver does not support OpenGL 2.1 with an error messagebox. --- intern/ghost/GHOST_Types.h | 3 +-- intern/ghost/intern/GHOST_ContextWGL.cpp | 41 ++++++++++++++----------------- intern/ghost/intern/GHOST_ContextWGL.h | 3 --- intern/ghost/intern/GHOST_SystemWin32.cpp | 1 - intern/ghost/intern/GHOST_WindowWin32.cpp | 9 +------ intern/ghost/intern/GHOST_WindowWin32.h | 1 - 6 files changed, 21 insertions(+), 37 deletions(-) (limited to 'intern/ghost') diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 7a73af3f249..29508a83733 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -57,8 +57,7 @@ typedef struct { typedef enum { GHOST_glStereoVisual = (1 << 0), - GHOST_glWarnSupport = (1 << 1), - GHOST_glDebugContext = (1 << 2), + GHOST_glDebugContext = (1 << 1) } GHOST_GLFlags; diff --git a/intern/ghost/intern/GHOST_ContextWGL.cpp b/intern/ghost/intern/GHOST_ContextWGL.cpp index d2a9eed95d9..ee0a1cdc88e 100644 --- a/intern/ghost/intern/GHOST_ContextWGL.cpp +++ b/intern/ghost/intern/GHOST_ContextWGL.cpp @@ -48,7 +48,6 @@ HGLRC GHOST_ContextWGL::s_sharedHGLRC = NULL; int GHOST_ContextWGL::s_sharedCount = 0; bool GHOST_ContextWGL::s_singleContextMode = false; -bool GHOST_ContextWGL::s_warn_old = false; /* Intel video-cards don't work fine with multiple contexts and @@ -918,27 +917,25 @@ GHOST_TSuccess GHOST_ContextWGL::initializeDrawingContext() reportContextString("Version", m_dummyVersion, version); #endif - if (!s_warn_old) { - if ((strcmp(vendor, "Microsoft Corporation") == 0 || - strcmp(renderer, "GDI Generic") == 0) && version[0] == '1' && version[2] == '1') - { - MessageBox(m_hWnd, "Your system does not use 3D hardware acceleration.\n" - "Such systems can cause stability problems in Blender and they are unsupported.\n\n" - "This may be caused by:\n" - "* A missing or faulty graphics driver installation.\n" - " Blender needs a graphics card driver to work correctly.\n" - "* Accessing Blender through a remote connection.\n" - "* Using Blender through a virtual machine.\n\n" - "Disable this message in ", - "Blender - Can't detect 3D hardware accelerated Driver!", MB_OK | MB_ICONWARNING); - } - else if (version[0] == '1' && version[2] < '4') { - MessageBox(m_hWnd, "The OpenGL version provided by your graphics driver version is too low\n" - "Blender requires version 1.4 and may not work correctly\n\n" - "Disable this message in ", - "Blender - Unsupported Graphics Driver!", MB_OK | MB_ICONWARNING); - } - s_warn_old = true; + if ((strcmp(vendor, "Microsoft Corporation") == 0 || + strcmp(renderer, "GDI Generic") == 0) && version[0] == '1' && version[2] == '1') + { + MessageBox(m_hWnd, "Your system does not use 3D hardware acceleration.\n" + "Blender requires a graphics driver with OpenGL 2.1 support.\n\n" + "This may be caused by:\n" + "* A missing or faulty graphics driver installation.\n" + " Blender needs a graphics card driver to work correctly.\n" + "* Accessing Blender through a remote connection.\n" + "* Using Blender through a virtual machine.\n\n", + "The program will now close\n" + "Blender - Can't detect 3D hardware accelerated Driver!", MB_OK | MB_ICONERROR); + exit(0); + } + else if (version[0] < '2' || (version[0] == '2' && version[2] < '1')) { + MessageBox(m_hWnd, "Blender requires a graphics driver with OpenGL 2.1 support\n" + "The program will now close\n", + "Blender - Unsupported Graphics Driver!", MB_OK | MB_ICONERROR); + exit(0); } return GHOST_kSuccess; diff --git a/intern/ghost/intern/GHOST_ContextWGL.h b/intern/ghost/intern/GHOST_ContextWGL.h index c457ddab2f7..3b04a33b662 100644 --- a/intern/ghost/intern/GHOST_ContextWGL.h +++ b/intern/ghost/intern/GHOST_ContextWGL.h @@ -118,8 +118,6 @@ public: */ GHOST_TSuccess getSwapInterval(int &intervalOut); - static void unSetWarningOld(){s_warn_old = true;} - protected: inline void activateWGLEW() const { #ifdef WITH_GLEW_MX @@ -184,7 +182,6 @@ private: static int s_sharedCount; static bool s_singleContextMode; - static bool s_warn_old; }; #endif // __GHOST_CONTEXTWGL_H__ diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 4f3b1127a18..d8ec827a946 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -241,7 +241,6 @@ GHOST_IWindow *GHOST_SystemWin32::createWindow( state, type, ((glSettings.flags & GHOST_glStereoVisual) != 0), - ((glSettings.flags & GHOST_glWarnSupport) != 0), glSettings.numOfAASamples, parentWindow, ((glSettings.flags & GHOST_glDebugContext) != 0)); diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 54689a96b66..54ac9d27bc7 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -70,7 +70,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, GHOST_TUns32 height, GHOST_TWindowState state, GHOST_TDrawingContextType type, - bool wantStereoVisual, bool warnOld, + bool wantStereoVisual, GHOST_TUns16 wantNumOfAASamples, GHOST_TEmbedderWindowID parentwindowhwnd, bool is_debug) @@ -98,13 +98,6 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); -#if !defined(WITH_GL_EGL) - if (!warnOld) - GHOST_ContextWGL::unSetWarningOld(); -#else - (void)(warnOld); -#endif - if (!GetVersionEx((OSVERSIONINFO *)&versionInfo)) { versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); if (GetVersionEx((OSVERSIONINFO *)&versionInfo)) { diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h index 3666fa753f3..b508c2f37df 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.h +++ b/intern/ghost/intern/GHOST_WindowWin32.h @@ -89,7 +89,6 @@ public: GHOST_TWindowState state, GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone, bool wantStereoVisual = false, - bool warnOld = false, GHOST_TUns16 wantNumOfAASamples = 0, GHOST_TEmbedderWindowID parentWindowHwnd = 0, bool is_debug = false); -- cgit v1.2.3