Browse Source

Shaders: use Context::isVersionSupported() instead of ad-hoc solution.

Also removed redundant branching for ES.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
79c0dc9550
  1. 7
      src/Shaders/MeshVisualizer.cpp

7
src/Shaders/MeshVisualizer.cpp

@ -83,12 +83,13 @@ MeshVisualizer::MeshVisualizer(const Flags flags): flags(flags), transformationP
#endif #endif
{ {
bindAttributeLocation(Position::Location, "position"); bindAttributeLocation(Position::Location, "position");
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(v < Version::GL310) if(!Context::current()->isVersionSupported(Version::GL310))
#else
if(v < Version::GLES300)
#endif #endif
{
bindAttributeLocation(VertexIndex::Location, "vertexIndex"); bindAttributeLocation(VertexIndex::Location, "vertexIndex");
}
} }
CORRADE_INTERNAL_ASSERT_OUTPUT(link()); CORRADE_INTERNAL_ASSERT_OUTPUT(link());

Loading…
Cancel
Save