From 8f6f340e8c090c14c55f338c9d32aa7f0d95fcbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 21 Feb 2014 01:39:59 +0100 Subject: [PATCH] Hardened checks for OpenGL ES version. There is no ES 2.5 or 3.01 and this way we can properly check for garbage returned by `glGet(GL_VERSION_M*OR)` (e.g. version 2674.-2O8539 would pass here). --- src/Magnum/Context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Context.cpp b/src/Magnum/Context.cpp index 5bd900695..d3aa25122 100644 --- a/src/Magnum/Context.cpp +++ b/src/Magnum/Context.cpp @@ -346,9 +346,9 @@ Context::Context() { #ifndef MAGNUM_TARGET_GLES if(!isVersionSupported(Version::GL210)) #elif defined(MAGNUM_TARGET_GLES2) - if(!isVersionSupported(Version::GLES200)) + if(_version != Version::GLES200) #else - if(!isVersionSupported(Version::GLES300)) + if(_version != Version::GLES300) #endif { #ifndef MAGNUM_TARGET_GLES