Skip to content

Commit

Permalink
Enforce GLSL 1.4 on more Mesa systems (#1588)
Browse files Browse the repository at this point in the history
Mesa-based rendering issues showed up e.g. on AMD GPU as well. The new approach should handle any Mesa 20-based system.
  • Loading branch information
rhaschke authored Feb 11, 2021
1 parent 59e84bd commit 882ee38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rviz/ogre_helpers/render_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ void RenderSystem::detectGlVersion()
int major = caps->getDriverVersion().major;
int minor = caps->getDriverVersion().minor;
gl_version_ = major * 100 + minor * 10;
mesa_workaround = caps->getDeviceName().find("Mesa ") != std::string::npos && gl_version_ >= 320;

std::string gl_version_string = (const char*)glGetString(GL_VERSION);
mesa_workaround = gl_version_string.find("Mesa 20.") != std::string::npos && gl_version_ >= 320;
}

switch (gl_version_)
Expand Down

0 comments on commit 882ee38

Please sign in to comment.