Reduce minimum required OpenGL version from 3.3.0 to 2.1.0, and other fixes #3

Merged
xavi merged 3 commits from gl-renderer into main 2025-01-08 00:48:26 +01:00

3 commits

Author SHA1 Message Date
8f230211bb
OsgCar.cpp: Do not create SDCarShader on "none" shaders
All checks were successful
/ build (pull_request) Successful in 13m24s
Even if "none" shaders were selected, the game would still parse
car.frag and execute the shaders, which is not the expected behaviour.
2025-01-07 00:28:47 +01:00
c677c8d9e2
guiscreen.cpp: Reduce minimum required OpenGL version
3.3.0 was required only because one shader, namely car.frag, was
arbitrarily requiring GLSL 3.3.0. However, it was already compatible
with GLSL 1.1.0, [1] so the minimum required OpenGL version can be
safely lowered to 2.1. [2]

[1]: https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.1.10.pdf
[2]: https://en.wikipedia.org/wiki/OpenGL#Version_history
2025-01-07 00:28:46 +01:00
21211a7aa5
guiscreen.cpp: Ensure successful SDL_GL_CreateContext
SDL_GL_CreateContext can fail due to several reasons, such as
GLXBadFBConfig on unsupported OpenGL versions.
2025-01-07 00:28:46 +01:00