From 7707341e47115e3e6174e976a74ce246a7e52c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 13 Mar 2023 15:47:01 +0100 Subject: [PATCH] Shaders: minor cleanup. --- src/Magnum/Shaders/LineGL.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Magnum/Shaders/LineGL.cpp b/src/Magnum/Shaders/LineGL.cpp index cc867a675..719d0ff59 100644 --- a/src/Magnum/Shaders/LineGL.cpp +++ b/src/Magnum/Shaders/LineGL.cpp @@ -215,11 +215,9 @@ template LineGL::LineGL(CompileState&& state CORRADE_INTERNAL_ASSERT_OUTPUT(checkLink({GL::Shader(state._vert), GL::Shader(state._frag)})); - const GL::Context& context = GL::Context::current(); - #ifndef MAGNUM_TARGET_GLES - const GL::Version version = state._version; - if(!context.isExtensionSupported(version)) + const GL::Context& context = GL::Context::current(); + if(!context.isExtensionSupported(state._version)) #endif { _viewportSizeUniform = uniformLocation("viewportSize"_s); @@ -240,7 +238,7 @@ template LineGL::LineGL(CompileState&& state } #ifndef MAGNUM_TARGET_GLES - if(!context.isExtensionSupported(version)) + if(!context.isExtensionSupported(state._version)) #endif { if(_flags >= Flag::UniformBuffers) { @@ -264,8 +262,6 @@ template LineGL::LineGL(CompileState&& state /* Object ID is zero by default */ } #endif - - static_cast(context); } template LineGL::LineGL(const Configuration& configuration): LineGL{compile(configuration)} {}