Fix for T58250 fix: Blender failing to start with OpenGL context < 4.5.

This commit is contained in:
Brecht Van Lommel
2019-01-03 18:28:46 +01:00
parent b5372e3e37
commit aa175e0033
2 changed files with 8 additions and 10 deletions

View File

@@ -330,23 +330,15 @@ const bool GLXEW_ARB_create_context_robustness =
if (!version || version[0] < '3' || ((version[0] == '3') && (version[2] < '3'))) {
success = GHOST_kFailure;
}
else
else {
success = GHOST_kSuccess;
}
}
else {
/* freeing well clean up the context initialized above */
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);
return success;

View File

@@ -1376,6 +1376,12 @@ GHOST_Context *GHOST_WindowX11::newDrawingContext(GHOST_TDrawingContextType type
else
delete context;
/* Ugly, but we get crashes unless a whole bunch of systems are patched. */
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);
exit(1);
}
return NULL;