Commit: db1f0e36163037c94857626be8ca20dd9ae5b168 Author: Antony Riakiotakis Date: Sun Nov 22 20:53:57 2015 +0100 Branches: master https://developer.blender.org/rBdb1f0e36163037c94857626be8ca20dd9ae5b168
Error out on Windows if driver does not support OpenGL 2.1 with an error messagebox. =================================================================== M intern/ghost/GHOST_Types.h M intern/ghost/intern/GHOST_ContextWGL.cpp M intern/ghost/intern/GHOST_ContextWGL.h M intern/ghost/intern/GHOST_SystemWin32.cpp M intern/ghost/intern/GHOST_WindowWin32.cpp M intern/ghost/intern/GHOST_WindowWin32.h M release/scripts/startup/bl_ui/space_userpref.py M source/blender/makesdna/DNA_userdef_types.h M source/blender/makesrna/intern/rna_userdef.c M source/blender/windowmanager/intern/wm_window.c M source/gameengine/GamePlayer/ghost/GPG_ghost.cpp =================================================================== diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 7a73af3..29508a8 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 d2a9eed..ee0a1cd 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 <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; diff --git a/intern/ghost/intern/GHOST_ContextWGL.h b/intern/ghost/intern/GHOST_ContextWGL.h index c457dda..3b04a33 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 4f3b112..d8ec827 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 54689a9..54ac9d2 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 3666fa7..b508c2f 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); diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index bee9d84..cb8c351 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -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() diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 2662f36..4beeaa8 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -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 */ diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 11fb87f..a61f6b9 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -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"); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 31998df..9bb790c 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -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); diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index 137f4cd..eee53b7 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -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; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs