Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-03 18:43:09 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-03 18:43:09 +0300
commit3c411f5ba1d46b34a7812d9d6101481338a19aec (patch)
treea81d5ab0e68a31d09d51151c5f56b764ee59492c /intern
parent407272d158aba8111946b5fa440d5ff784ab02cb (diff)
Fix T58250: crash starting Blender on X11 without OpenGL 3.3.
Instead display an error message and exit.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_ContextGLX.cpp15
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp2
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp2
3 files changed, 12 insertions, 7 deletions
diff --git a/intern/ghost/intern/GHOST_ContextGLX.cpp b/intern/ghost/intern/GHOST_ContextGLX.cpp
index 815189b9098..8f418e4ab23 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.cpp
+++ b/intern/ghost/intern/GHOST_ContextGLX.cpp
@@ -298,7 +298,7 @@ const bool GLXEW_ARB_create_context_robustness =
}
else {
/* Don't create legacy context */
- fprintf(stderr, "Warning! GLX_ARB_create_context not available.\n");
+ fprintf(stderr, "Error! GLX_ARB_create_context not available.\n");
}
GHOST_TSuccess success;
@@ -328,10 +328,7 @@ const bool GLXEW_ARB_create_context_robustness =
version = glGetString(GL_VERSION);
if (!version || version[0] < '3' || ((version[0] == '3') && (version[2] < '3'))) {
- fprintf(stderr, "Error! Blender requires OpenGL 3.3 to run. Try updating your drivers.\n");
- fflush(stderr);
- /* ugly, but we get crashes unless a whole bunch of systems are patched. */
- exit(0);
+ success = GHOST_kFailure;
}
else
success = GHOST_kSuccess;
@@ -341,6 +338,14 @@ const bool GLXEW_ARB_create_context_robustness =
success = GHOST_kFailure;
}
+ if (success == GHOST_kFailure) {
+ fprintf(stderr, "Error! Unsupported graphics driver.\n");
+ fprintf(stderr, "Blender requires a graphics driver with at least OpenGL 3.3 support.\n");
+ fprintf(stderr, "The program will now close.\n");
+ fflush(stderr);
+ /* ugly, but we get crashes unless a whole bunch of systems are patched. */
+ exit(1);
+ }
GHOST_X11_ERROR_HANDLERS_RESTORE(handler_store);
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index bcf7d4e587a..00852c1ad05 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -361,7 +361,7 @@ GHOST_IContext *GHOST_SystemWin32::createOffscreenContext()
NULL,
"Blender requires a graphics driver with at least OpenGL 3.3 support.\n\n"
"The program will now close.",
- "Blender - Unsupported Graphics Driver!",
+ "Blender - Unsupported Graphics Driver",
MB_OK | MB_ICONERROR);
delete context;
exit();
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 8cd943d35df..34b813cead3 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -673,7 +673,7 @@ GHOST_Context *GHOST_WindowWin32::newDrawingContext(GHOST_TDrawingContextType ty
m_hWnd,
"Blender requires a graphics driver with at least OpenGL 3.3 support.\n\n"
"The program will now close.",
- "Blender - Unsupported Graphics Driver!",
+ "Blender - Unsupported Graphics Driver",
MB_OK | MB_ICONERROR);
delete context;
exit(0);