summaryrefslogtreecommitdiffhomepage
path: root/shaders/tile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/tile.cpp')
-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};