0

I am trying to override the detected opengl implementation version (a fix for Dying Light on Steam). From my understanding of opengl, i should be able to set what version it is reported as via the MESA_GL_VERSION_OVERRIDE variable.

$ glxinfo | grep 'version string'
OpenGL version string: 3.3 (Compatibility Profile) Mesa 19.0.8

$ MESA_GL_VERSION_OVERRIDE=3.3 glxinfo | egrep 'OpenGL version string'
OpenGL version string: 3.3 (Compatibility Profile) Mesa 19.0.8

How can I get gl to report as "3.3" and not the rest of it? I have tried exporting the variable too.

Background: The Dying Light game checks for the version of gl, when I try run it, it crashes:

Detected OpenGL Version: 3.3 (Compatibility Profile) Mesa 19.0.8
Required OpenGL version: 3.3
Please update your display driver.

There's a few posts here and on the steam site that suggest using the variable, but the compat check still fails

6
  • 3
    It already does report as 3.3. "and not the rest of it?"You can't change that, and why would you want to?
    – derhass
    Jan 3, 2020 at 17:22
  • The Dying Light developers are using the gl version call to validate the version of opengl, so to run the game, i want to change the version string via the variable. Detected OpenGL Version: 3.3 (Compatibility Profile) Mesa 19.0.8
    – Brett
    Jan 3, 2020 at 17:29
  • And you can change the reported GL version via that environment variable. So what is the issue here?
    – derhass
    Jan 3, 2020 at 17:34
  • derhass - i have posted the error message. gl is reporting the "compat" string.
    – Brett
    Jan 3, 2020 at 17:35
  • Do you want it to report a core profile? If so try MESA_GL_VERSION_OVERRIDE=3.3FC.
    – G.M.
    Jan 3, 2020 at 17:41

1 Answer 1

0

MESA_GL_VERSION_OVERRIDE=4.6 MESA_GLSL_VERSION_OVERRIDE=460

1
  • 1
    Welcome to Stack Overflow! While this code may solve the question, including an explanation of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. Please edit your answer to add explanations and give an indication of what limitations and assumptions apply.
    – Yunnosch
    Dec 24, 2022 at 21:24

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.