Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_SystemX11.cpp
| Show First 20 Lines • Show All 388 Lines • ▼ Show 20 Lines | GHOST_IContext *GHOST_SystemX11::createOffscreenContext(GHOST_GLSettings glSettings) | ||||
| * | * | ||||
| * Final Blender 2.8: | * Final Blender 2.8: | ||||
| * try 4.x core profile | * try 4.x core profile | ||||
| * try 3.3 core profile | * try 3.3 core profile | ||||
| * no fall-backs. */ | * no fall-backs. */ | ||||
| const bool debug_context = (glSettings.flags & GHOST_glDebugContext) != 0; | const bool debug_context = (glSettings.flags & GHOST_glDebugContext) != 0; | ||||
| #if defined(WITH_GL_PROFILE_CORE) | |||||
| { | |||||
| const char *version_major = (char *)glewGetString(GLEW_VERSION_MAJOR); | |||||
| if (version_major != nullptr && version_major[0] == '1') { | |||||
| fprintf(stderr, "Error: GLEW version 2.0 and above is required.\n"); | |||||
| abort(); | |||||
| } | |||||
| } | |||||
| #endif | |||||
| const int profile_mask = | const int profile_mask = | ||||
| #ifdef WITH_GL_EGL | #ifdef WITH_GL_EGL | ||||
| # if defined(WITH_GL_PROFILE_CORE) | # if defined(WITH_GL_PROFILE_CORE) | ||||
| EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT; | EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT; | ||||
| # elif defined(WITH_GL_PROFILE_COMPAT) | # elif defined(WITH_GL_PROFILE_COMPAT) | ||||
| EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT; | EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT; | ||||
| # else | # else | ||||
| # error // must specify either core or compat at build time | # error // must specify either core or compat at build time | ||||
| ▲ Show 20 Lines • Show All 2,341 Lines • Show Last 20 Lines | |||||