From 9733988686f8ad81028f46873c5d7a9125317be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 24 Aug 2017 13:59:35 +0200 Subject: [PATCH] Platform: fix severe aliasing artifacts with defaults on Emscripten. The default for Sdl2Application canvas size was 800x600, but the canvas was sized to 640x480 by the default CSS style. Sorry about this. --- doc/changelog.dox | 3 +++ src/Magnum/Platform/Sdl2Application.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index a8b99d2ac..a38236784 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -441,6 +441,9 @@ namespace Magnum { @extension{ARB,direct_state_access} code path, causing crashes on Mesa - Properly export @ref Framebuffer::DrawAttachment to avoid linker failures on Windows +- On Emscripten, @ref Platform::Sdl2Application was by default rendering a + 800x600 canvas to an area of 640x480 pixels, causing severe aliasing. + Canvas is now by default sized to 640x480 to match the default CSS style. - @ref Platform::WindowlessWglApplication is fixed to allow the GL context to be created and destroyed multiple times during application run - @ref SceneGraph::Camera now works properly with @ref Double underlying type diff --git a/src/Magnum/Platform/Sdl2Application.cpp b/src/Magnum/Platform/Sdl2Application.cpp index b0b8cd20b..f626117f1 100644 --- a/src/Magnum/Platform/Sdl2Application.cpp +++ b/src/Magnum/Platform/Sdl2Application.cpp @@ -529,7 +529,9 @@ Sdl2Application::Configuration::Configuration(): #if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_IOS) _title("Magnum SDL2 Application"), #endif - #ifndef CORRADE_TARGET_IOS + #ifdef CORRADE_TARGET_EMSCRIPTEN + _size{640, 480}, + #elif !defined(CORRADE_TARGET_IOS) _size{800, 600}, #else _size{}, /* SDL2 detects someting for us */