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.
This commit is contained in:
parent
414c1c0e77
commit
51278bab5d
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue