diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-05-18 23:58:33 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-05-19 01:30:23 +0300 |
commit | 51278bab5ded412fa1a38c2564cc3fda71e3129b (patch) | |
tree | c3bd4d4568e0bb8de73c5eaf8a966eb33b74a525 | |
parent | 414c1c0e77e9a87faf77b4c40c5cd5f4aacbc4fa (diff) |
remove GPU_legacy_support query
In the move to OpenGL 3.3 core profile, we drop support for compatibility profile and older versions.
OpenSubdiv was the only user; I'll update OSD next.
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c | 2 | ||||
-rw-r--r-- | source/blender/gpu/GPU_extensions.h | 1 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 43 |
3 files changed, 1 insertions, 45 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c index d18a461add5..ab89a920089 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c +++ b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c @@ -993,7 +993,7 @@ void ccgSubSurf__sync_subdivUvs(CCGSubSurf *ss, bool subdiv_uvs) void BKE_subsurf_osd_init(void) { - openSubdiv_init(GPU_legacy_support()); + openSubdiv_init(false); BLI_spin_init(&delete_spin); } diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index 4f14474bb5f..d36b0ea15be 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -38,7 +38,6 @@ extern "C" { /* GPU extensions support */ -bool GPU_legacy_support(void); bool GPU_full_non_power_of_two_support(void); bool GPU_bicubic_bump_support(void); diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 2a2e73c6ba8..fb6c2ef9b6e 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -266,49 +266,6 @@ void gpu_extensions_exit(void) GPU_invalid_tex_free(); } -bool GPU_legacy_support(void) -{ -#ifdef WITH_LEGACY_OPENGL - /* return whether or not current GL context is compatible with legacy OpenGL */ - /* (will be removed after switching to core profile) */ - - static bool checked = false; - static bool support = true; - - if (!checked) { - if (GLEW_VERSION_3_2) { - GLint profile; - glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &profile); - - if (G.debug & G_DEBUG_GPU) { - printf("GL_CONTEXT_PROFILE_MASK = %#x (%s profile)\n", (unsigned int)profile, - (profile & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) ? "compatibility" : - (profile & GL_CONTEXT_CORE_PROFILE_BIT) ? "core" : "unknown"); - } - - if (profile == 0) { - /* workaround for nVidia's Linux driver */ - support = GLEW_ARB_compatibility; - } - else { - support = profile & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT; - } - } - else if (GLEW_VERSION_3_1) { - support = GLEW_ARB_compatibility; - } - - /* any OpenGL version <= 3.0 is legacy, so support remains true */ - - checked = true; - } - - return support; -#else - return false; -#endif -} - bool GPU_full_non_power_of_two_support(void) { /* always supported on full GL but still relevant for OpenGL ES 2.0 where |