Browse Source

Sanity check for OpenGL version in Context.

I though this check was present since forever, but isn't. Maybe it's
hidden somewhere else.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
153e5c784a
  1. 8
      src/Context.cpp

8
src/Context.cpp

@ -292,6 +292,14 @@ Context::Context() {
#endif
_version = static_cast<Version>(_majorVersion*100+_minorVersion*10);
#ifndef MAGNUM_TARGET_GLES
CORRADE_ASSERT(isVersionSupported(Version::GL210), "Context: unsupported OpenGL version" << Int(_version), );
#elif defined(MAGNUM_TARGET_GLES2)
CORRADE_ASSERT(isVersionSupported(Version::GLES200), "Context: unsupported OpenGL ES version" << Int(_version), );
#else
CORRADE_ASSERT(isVersionSupported(Version::GLES300), "Context: unsupported OpenGL ES version" << Int(_version), );
#endif
/* Context flags are supported since GL 3.0 */
#ifndef MAGNUM_TARGET_GLES
/**

Loading…
Cancel
Save