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)} {}