Browse Source

Platform: fix EmscriptenApplication context creation on WebGL 2.

Insufficient testing, sorry. This got broken after MAGNUM_TARGET_GLES3
deprecation in 87c7eea1e2, but the stupid
variable name was there before already, and it just worked for some
reason, but when the condition got flipped, setting *minor* version to 2
didn't do the right thing anymore. And of course, typical Emscripten,
it didn't complain at all in either case.

Took me an embarrassingly long time to spot what was wrong.
pull/638/head
Vladimír Vondruš 2 years ago
parent
commit
75c25da6e5
  1. 2
      src/Magnum/Platform/EmscriptenApplication.cpp

2
src/Magnum/Platform/EmscriptenApplication.cpp

@ -376,7 +376,7 @@ bool EmscriptenApplication::tryCreate(const Configuration& configuration, const
#ifdef MAGNUM_TARGET_GLES2 /* WebGL 1 */
attrs.majorVersion = 1;
#else /* WebGL 2 */
attrs.minorVersion = 2;
attrs.majorVersion = 2;
#endif
std::ostream* verbose = _verboseLog ? Debug::output() : nullptr;

Loading…
Cancel
Save