OpenGL: bump Linux to GL 3.3 compat profile

fall back to 3.0 if needed (during development)

Part of T49012
This commit is contained in:
Mike Erwin
2016-10-14 23:42:45 -04:00
parent 4f4c7808e4
commit 29b47924dd
2 changed files with 8 additions and 8 deletions

View File

@@ -325,13 +325,13 @@ const bool GLXEW_ARB_create_context_robustness =
version = glGetString(GL_VERSION);
#if 0 // enable this when Blender switches to 3.2 core profile
if (!version || version[0] < '3' || ((version[0] == '3') && (version[2] < '2'))) {
fprintf(stderr, "Error! Blender requires OpenGL 3.2 to run. Try updating your drivers.\n");
#if 0 // enable this when Blender switches to 3.3 core profile
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");
#else
// with Mesa, the closest thing to 3.2 compatibility profile is 3.0
// with Mesa, the closest thing to 3.3 compatibility profile is 3.0
if (!version || version[0] < '3') {
fprintf(stderr, "Error! Blender requires OpenGL 3.0 (soon 3.2) to run. Try updating your drivers.\n");
fprintf(stderr, "Error! Blender requires OpenGL 3.0 (soon 3.3) to run. Try updating your drivers.\n");
#endif
fflush(stderr);
/* ugly, but we get crashes unless a whole bunch of systems are patched. */

View File

@@ -1308,11 +1308,11 @@ GHOST_Context *GHOST_WindowX11::newDrawingContext(GHOST_TDrawingContextType type
if (type == GHOST_kDrawingContextTypeOpenGL) {
// During development:
// try 3.2 compatibility profile
// try 3.3 compatibility profile
// fall back to 3.0 if needed
//
// Final Blender 2.8:
// try 3.2 core profile
// try 3.3 core profile
// no fallbacks
const int profile_mask =
@@ -1332,7 +1332,7 @@ GHOST_Context *GHOST_WindowX11::newDrawingContext(GHOST_TDrawingContextType type
m_visualInfo,
(GLXFBConfig)m_fbconfig,
profile_mask,
3, 2,
3, 3,
GHOST_OPENGL_GLX_CONTEXT_FLAGS | (m_is_debug_context ? GLX_CONTEXT_DEBUG_BIT_ARB : 0),
GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY);