From 064e4b9981a5cbeef4a5a40be8228c9bd8469ec5 Mon Sep 17 00:00:00 2001 From: Martin Pecka Date: Fri, 19 Mar 2021 11:12:13 +0100 Subject: [PATCH] Enable Mesa workaround also on Mesa 21 Signed-off-by: Martin Pecka --- src/rviz/ogre_helpers/render_system.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rviz/ogre_helpers/render_system.cpp b/src/rviz/ogre_helpers/render_system.cpp index dd60b0f258..c23c35a784 100644 --- a/src/rviz/ogre_helpers/render_system.cpp +++ b/src/rviz/ogre_helpers/render_system.cpp @@ -186,7 +186,8 @@ void RenderSystem::detectGlVersion() gl_version_ = major * 100 + minor * 10; std::string gl_version_string = (const char*)glGetString(GL_VERSION); - mesa_workaround = gl_version_string.find("Mesa 20.") != std::string::npos && gl_version_ >= 320; + // The "Mesa 2" string is intended to match "Mesa 20.", "Mesa 21." and so on + mesa_workaround = gl_version_string.find("Mesa 2") != std::string::npos && gl_version_ >= 320; } switch (gl_version_)