From cf4975f8d70b445fdd1bb3839428faf5cf0b501a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 2 Nov 2022 20:22:58 +0100 Subject: try working with at least opengl 4.3 --- shaders/tile.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'shaders') 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")); -- cgit v1.2.3