summaryrefslogtreecommitdiffhomepage
path: root/shaders
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-02 20:29:34 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-02 20:29:34 +0100
commit8f808180ca159b6bb006cb6cae217fbecdf75e9d (patch)
tree853fa4d75be67512e881d722569af26aeb3443a0 /shaders
parentcf4975f8d70b445fdd1bb3839428faf5cf0b501a (diff)
gl version check
Diffstat (limited to 'shaders')
-rw-r--r--shaders/tile.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/shaders/tile.cpp b/shaders/tile.cpp
index a8d423ed..4fb7fe1b 100644
--- a/shaders/tile.cpp
+++ b/shaders/tile.cpp
@@ -11,10 +11,11 @@ namespace floormat {
tile_shader::tile_shader()
{
using V = GL::Version;
- const auto version = GL::Context::current().supportedVersion({ V::GL460, V::GL450, V::GL440, });
+ constexpr V min_version = GL::Version::GL430;
+ const auto version = GL::Context::current().supportedVersion({ V::GL460, V::GL450, V::GL440, V::GL430, });
- if (version < GL::Version::GL430)
- fm_abort("floormat requires OpenGL version 430, only %d is supported", (int)version);
+ if (version < min_version)
+ fm_abort("floormat requires OpenGL version %d, only %d is supported", (int)min_version, (int)version);
GL::Shader vert{version, GL::Shader::Type::Vertex};
GL::Shader frag{version, GL::Shader::Type::Fragment};