From 79c0dc95506ed4868156b9c112d64c8dae87a1cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 4 Jun 2013 20:52:04 +0200 Subject: [PATCH 1/2] Shaders: use Context::isVersionSupported() instead of ad-hoc solution. Also removed redundant branching for ES. --- src/Shaders/MeshVisualizer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Shaders/MeshVisualizer.cpp b/src/Shaders/MeshVisualizer.cpp index f2e3f5a84..5b656ffdb 100644 --- a/src/Shaders/MeshVisualizer.cpp +++ b/src/Shaders/MeshVisualizer.cpp @@ -83,12 +83,13 @@ MeshVisualizer::MeshVisualizer(const Flags flags): flags(flags), transformationP #endif { bindAttributeLocation(Position::Location, "position"); + #ifndef MAGNUM_TARGET_GLES - if(v < Version::GL310) - #else - if(v < Version::GLES300) + if(!Context::current()->isVersionSupported(Version::GL310)) #endif + { bindAttributeLocation(VertexIndex::Location, "vertexIndex"); + } } CORRADE_INTERNAL_ASSERT_OUTPUT(link()); From f78ac39ab63c8db2bbd62a45ee2c61f6ca6c8850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 4 Jun 2013 20:52:50 +0200 Subject: [PATCH 2/2] Shapes: overlooked `typename`. Spotted by good ol' GCC 4.4. Newer compilers don't bother with that verbosity at all. --- src/Shapes/shapeImplementation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Shapes/shapeImplementation.h b/src/Shapes/shapeImplementation.h index d90f889e5..0731cfad0 100644 --- a/src/Shapes/shapeImplementation.h +++ b/src/Shapes/shapeImplementation.h @@ -108,7 +108,7 @@ template struct TypeOf> { } }; template<> struct TypeOf { - constexpr static typename ShapeDimensionTraits<3>::Type type() { + constexpr static ShapeDimensionTraits<3>::Type type() { return ShapeDimensionTraits<3>::Type::Plane; } };