From 1834d9e879af860c551c9ee69acabc4ceafbbbb4 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 30 Jul 2015 18:50:53 +0200 Subject: [PATCH] Fix incorrect assumption that Mesa GL 3.0 driver doesn't implement non-core functionality --- .../glstuff/glGraphicsStateGuardian_src.cxx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index e61a53487a..5cd4a547f8 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -522,17 +522,15 @@ reset() { query_glsl_version(); #ifndef OPENGLES - bool core_profile; - if (_gl_version_major < 3 || has_extension("GL_ARB_compatibility")) { - core_profile = false; - } else { - core_profile = true; - } + bool core_profile = is_at_least_gl_version(3, 2) && + !has_extension("GL_ARB_compatibility"); - if (core_profile) { - GLCAT.debug() << "Using core profile\n"; - } else { - GLCAT.debug() << "Using compatibility profile\n"; + if (GLCAT.is_debug()) { + if (core_profile) { + GLCAT.debug() << "Using core profile\n"; + } else { + GLCAT.debug() << "Using compatibility profile\n"; + } } #elif defined(OPENGLES_1) static const bool core_profile = false;