summaryrefslogtreecommitdiffhomepage
path: root/shaders
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-02 20:22:58 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-02 20:25:43 +0100
commitcf4975f8d70b445fdd1bb3839428faf5cf0b501a (patch)
treee3d6aed6a2e359ad9fa52e511077c8cb1e5029c1 /shaders
parent1f035ad5ee0b1f56492158266f95e168bd21ccf2 (diff)
try working with at least opengl 4.3
Diffstat (limited to 'shaders')
-rw-r--r--shaders/tile.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/shaders/tile.cpp b/shaders/tile.cpp
index 2a7f50f1..a8d423ed 100644
--- a/shaders/tile.cpp
+++ b/shaders/tile.cpp
@@ -10,10 +10,14 @@ namespace floormat {
tile_shader::tile_shader()
{
- MAGNUM_ASSERT_GL_VERSION_SUPPORTED(GL::Version::GL460);
+ using V = GL::Version;
+ const auto version = GL::Context::current().supportedVersion({ V::GL460, V::GL450, V::GL440, });
- GL::Shader vert{GL::Version::GL460, GL::Shader::Type::Vertex};
- GL::Shader frag{GL::Version::GL460, GL::Shader::Type::Fragment};
+ if (version < GL::Version::GL430)
+ fm_abort("floormat requires OpenGL version 430, only %d is supported", (int)version);
+
+ GL::Shader vert{version, GL::Shader::Type::Vertex};
+ GL::Shader frag{version, GL::Shader::Type::Fragment};
vert.addSource(loader.shader("shaders/tile.vert"));
frag.addSource(loader.shader("shaders/tile.frag"));