[Bf-blender-cvs] [51278bab5de] blender2.8: remove GPU_legacy_support query
Mike Erwin
noreply at git.blender.org
Fri May 19 00:31:43 CEST 2017
Commit: 51278bab5ded412fa1a38c2564cc3fda71e3129b
Author: Mike Erwin
Date: Thu May 18 16:58:33 2017 -0400
Branches: blender2.8
https://developer.blender.org/rB51278bab5ded412fa1a38c2564cc3fda71e3129b
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.
===================================================================
M source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c
M source/blender/gpu/GPU_extensions.h
M source/blender/gpu/intern/gpu_extensions.c
===================================================================
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
More information about the Bf-blender-cvs
mailing list