Browse Source

Less strict version string comparison in Context.

Not all drivers return "2.1 Vendor", there is also "2.1.2 NVIDIA" (and
probably more).
pull/68/head
Vladimír Vondruš 12 years ago
parent
commit
dfec071575
  1. 2
      src/Magnum/Context.cpp

2
src/Magnum/Context.cpp

@ -332,7 +332,7 @@ Context::Context() {
/* Allow ES2 context on driver that reports ES3 as supported */
const std::string version = versionString();
#ifndef MAGNUM_TARGET_GLES
if(version.compare(0, 4, "2.1 ") == 0)
if(version.compare(0, 3, "2.1") == 0)
#elif defined(MAGNUM_TARGET_WEBGL)
if(version.find("WebGL 1") != std::string::npos)
#else

Loading…
Cancel
Save