From 75c25da6e5c065e785f411bd47feb007458ccae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 14 Mar 2024 19:10:21 +0100 Subject: [PATCH] Platform: fix EmscriptenApplication context creation on WebGL 2. Insufficient testing, sorry. This got broken after MAGNUM_TARGET_GLES3 deprecation in 87c7eea1e256c7ef1c53f1d0e2ec8b3e34bc3ae1, 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. --- src/Magnum/Platform/EmscriptenApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/Platform/EmscriptenApplication.cpp b/src/Magnum/Platform/EmscriptenApplication.cpp index 9901e12cb..8ece3d0aa 100644 --- a/src/Magnum/Platform/EmscriptenApplication.cpp +++ b/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;