Browse Source

Shaders: minor cleanup.

pull/617/head
Vladimír Vondruš 3 years ago
parent
commit
7707341e47
  1. 10
      src/Magnum/Shaders/LineGL.cpp

10
src/Magnum/Shaders/LineGL.cpp

@ -215,11 +215,9 @@ template<UnsignedInt dimensions> LineGL<dimensions>::LineGL(CompileState&& state
CORRADE_INTERNAL_ASSERT_OUTPUT(checkLink({GL::Shader(state._vert), GL::Shader(state._frag)})); CORRADE_INTERNAL_ASSERT_OUTPUT(checkLink({GL::Shader(state._vert), GL::Shader(state._frag)}));
const GL::Context& context = GL::Context::current();
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
const GL::Version version = state._version; const GL::Context& context = GL::Context::current();
if(!context.isExtensionSupported<GL::Extensions::ARB::explicit_uniform_location>(version)) if(!context.isExtensionSupported<GL::Extensions::ARB::explicit_uniform_location>(state._version))
#endif #endif
{ {
_viewportSizeUniform = uniformLocation("viewportSize"_s); _viewportSizeUniform = uniformLocation("viewportSize"_s);
@ -240,7 +238,7 @@ template<UnsignedInt dimensions> LineGL<dimensions>::LineGL(CompileState&& state
} }
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!context.isExtensionSupported<GL::Extensions::ARB::shading_language_420pack>(version)) if(!context.isExtensionSupported<GL::Extensions::ARB::shading_language_420pack>(state._version))
#endif #endif
{ {
if(_flags >= Flag::UniformBuffers) { if(_flags >= Flag::UniformBuffers) {
@ -264,8 +262,6 @@ template<UnsignedInt dimensions> LineGL<dimensions>::LineGL(CompileState&& state
/* Object ID is zero by default */ /* Object ID is zero by default */
} }
#endif #endif
static_cast<void>(context);
} }
template<UnsignedInt dimensions> LineGL<dimensions>::LineGL(const Configuration& configuration): LineGL{compile(configuration)} {} template<UnsignedInt dimensions> LineGL<dimensions>::LineGL(const Configuration& configuration): LineGL{compile(configuration)} {}

Loading…
Cancel
Save