From a8b99fb0204b72f9a0c56f86dce47978ef44ef55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 9 Nov 2020 15:20:03 +0100 Subject: [PATCH] Platform: use a branded color. --- src/Magnum/Platform/Test/CMakeLists.txt | 2 +- src/Magnum/Platform/Test/EmscriptenApplicationTest.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Platform/Test/CMakeLists.txt b/src/Magnum/Platform/Test/CMakeLists.txt index 494d2f2ef..da702cfd5 100644 --- a/src/Magnum/Platform/Test/CMakeLists.txt +++ b/src/Magnum/Platform/Test/CMakeLists.txt @@ -64,7 +64,7 @@ if(WITH_EMSCRIPTENAPPLICATION) # TODO: use target_link_options() once we can require CMake 3.13 "-s MODULARIZE -s EXPORT_NAME=createModule" "-s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1") - target_compile_definitions(PlatformMultipleEmscriptenApplicationTest PRIVATE CUSTOM_CLEAR_COLOR=0.2,0,0.2,1) + target_compile_definitions(PlatformMultipleEmscriptenApplicationTest PRIVATE CUSTOM_CLEAR_COLOR=0x3bd267_rgbf) set_target_properties(PlatformMultipleEmscriptenApplicationTest PROPERTIES FOLDER "Magnum/Platform/Test") add_custom_command(TARGET PlatformMultipleEmscriptenApplicationTest POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different diff --git a/src/Magnum/Platform/Test/EmscriptenApplicationTest.cpp b/src/Magnum/Platform/Test/EmscriptenApplicationTest.cpp index 10f99d62a..dea96c037 100644 --- a/src/Magnum/Platform/Test/EmscriptenApplicationTest.cpp +++ b/src/Magnum/Platform/Test/EmscriptenApplicationTest.cpp @@ -36,6 +36,8 @@ namespace Magnum { namespace Platform { namespace Test { +using namespace Math::Literals; + struct EmscriptenApplicationTest: Platform::Application { /* For testing resize events */ explicit EmscriptenApplicationTest(const Arguments& arguments); @@ -43,7 +45,7 @@ struct EmscriptenApplicationTest: Platform::Application { virtual void drawEvent() override { Debug() << "draw event"; #ifdef CUSTOM_CLEAR_COLOR - GL::Renderer::setClearColor({ CUSTOM_CLEAR_COLOR }); + GL::Renderer::setClearColor(CUSTOM_CLEAR_COLOR); #endif GL::defaultFramebuffer.clear(GL::FramebufferClear::Color);