Error out on Windows if driver does not support OpenGL 2.1 with an error
authorAntony Riakiotakis <kalast@gmail.com>
Sun, 22 Nov 2015 19:53:57 +0000 (20:53 +0100)
committerAntony Riakiotakis <kalast@gmail.com>
Sun, 22 Nov 2015 19:53:57 +0000 (20:53 +0100)
messagebox.

intern/ghost/GHOST_Types.h
intern/ghost/intern/GHOST_ContextWGL.cpp
intern/ghost/intern/GHOST_ContextWGL.h
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_WindowWin32.cpp
intern/ghost/intern/GHOST_WindowWin32.h
release/scripts/startup/bl_ui/space_userpref.py
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/intern/rna_userdef.c
source/blender/windowmanager/intern/wm_window.c
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

index 7a73af3f2490388ebfe7bf1e856be8a45abc25d9..29508a8373390a2593d1ff3d4d544cbfc425ab05 100644 (file)
@@ -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;
 
 
index d2a9eed95d9ed500ddf30a592a55dd5b0d523f40..ee0a1cdc88efd467c12815056b3cca1788d8c2d3 100644 (file)
@@ -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 <User Preferences - Interface - Warn On Deprecated OpenGL>",
-                                          "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 <User Preferences - Interface - Warn On Deprecated OpenGL>",
-                                          "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;
index c457ddab2f7f503782794fce938360b6a3d1252b..3b04a33b66256babe321ecd156cd711026853355 100644 (file)
@@ -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__
index 4f3b1127a1831b0b75272ce3db6fae406b8ac951..d8ec827a946818609f5ff7f62cb861938bf95cda 100644 (file)
@@ -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));
index 54689a96b6635c72d00b3bb8db6c62688fb852e4..54ac9d27bc7b16d0e1350c39bb49db1ffdc74c77 100644 (file)
@@ -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)) {
index 3666fa753f338f097619553cb46378d83825e57f..b508c2f37df3e8d0f130fe335130e16db1c59328 100644 (file)
@@ -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);
index bee9d849badde13138fd82f1a4a82c53a7f7462e..cb8c35176b557e2bc626d78ad7aa6e608edc222c 100644 (file)
@@ -174,7 +174,6 @@ class USERPREF_PT_interface(Panel):
         if sys.platform[:3] == "win":
             col.label("Warnings")
             col.prop(view, "use_quit_dialog")
-            col.prop(view, "use_gl_warn_support")
 
         row.separator()
         row.separator()
index 2662f368c32c02d653acef86aa90227461b63be6..4beeaa8bc3f1647781063b7895c70b0d49729d06 100644 (file)
@@ -683,7 +683,6 @@ typedef enum eUserpref_UI_Flag2 {
        USER_KEEP_SESSION                       = (1 << 0),
        USER_REGION_OVERLAP                     = (1 << 1),
        USER_TRACKPAD_NATURAL           = (1 << 2),
-       USER_OPENGL_NO_WARN_SUPPORT     = (1 << 3)
 } eUserpref_UI_Flag2;
        
 /* Auto-Keying mode */
index 11fb87fe68d34714420b63a0152a4614d2751768..a61f6b909ad2b5006327cd1e41bbde30a4419ce7 100644 (file)
@@ -3445,11 +3445,6 @@ static void rna_def_userdef_view(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Prompt Quit",
                                 "Ask for confirmation when quitting through the window close button");
 
-       prop = RNA_def_property(srna, "use_gl_warn_support", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag2", USER_OPENGL_NO_WARN_SUPPORT);
-       RNA_def_property_ui_text(prop, "Warn On Deprecated OpenGL",
-                                "Pop up a warning when an old OpenGL version is detected");
-
        /* Toolbox click-hold delay */
        prop = RNA_def_property(srna, "open_left_mouse_delay", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "tb_leftmouse");
index 31998df90dd50761581576d475f18440f45c9794..9bb790cd925b13520bca98029b04f70c476d1645 100644 (file)
@@ -404,9 +404,6 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, const char *title, wm
                glSettings.flags |= GHOST_glDebugContext;
        }
 
-       if (!(U.uiflag2 & USER_OPENGL_NO_WARN_SUPPORT))
-               glSettings.flags |= GHOST_glWarnSupport;
-
        wm_get_screensize(&scr_w, &scr_h);
        posy = (scr_h - win->posy - win->sizey);
        
index 137f4cd6bc80904dfab582ec7130eb540cd34e81..eee53b775a974df82efea3b2cc1973e7a61a63b4 100644 (file)
@@ -457,7 +457,6 @@ int main(int argc, char** argv)
        
        initglobals();
 
-       U.gameflags |= USER_DISABLE_VBO;
        // We load our own G.main, so free the one that initglobals() gives us
        BKE_main_free(G.main);
        G.main = NULL;