From 62a0e84634235f0bb0fa3879d61a593442db4146 Mon Sep 17 00:00:00 2001 From: ohyzha Date: Mon, 5 Aug 2024 10:15:39 +0300 Subject: [PATCH] minor fixes --- 3rdParty/msdf/CMakeLists.txt | 2 ++ openVulkanoCpp/Scene/TextDrawable.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/3rdParty/msdf/CMakeLists.txt b/3rdParty/msdf/CMakeLists.txt index 767c2bf..69bfce0 100644 --- a/3rdParty/msdf/CMakeLists.txt +++ b/3rdParty/msdf/CMakeLists.txt @@ -40,6 +40,8 @@ elseif(APPLE AND NOT IOS) set(TRIPLET arm64-osx CACHE INTERNAL "triplet") elseif(IOS) set(TRIPLET arm64-ios CACHE INTERNAL "triplet") +else() + message(FATAL_ERROR "Unknown OS, can't build msdfgen") endif() execute_process(COMMAND ${VCPKG_EXECUTABLE} install freetype:${TRIPLET} libpng:${TRIPLET}) diff --git a/openVulkanoCpp/Scene/TextDrawable.cpp b/openVulkanoCpp/Scene/TextDrawable.cpp index 613efc2..c756485 100644 --- a/openVulkanoCpp/Scene/TextDrawable.cpp +++ b/openVulkanoCpp/Scene/TextDrawable.cpp @@ -52,6 +52,8 @@ namespace OpenVulkano::Scene { return; } + // just in case if FontAtlasGenerator changed it's atlas + m_material.texture = const_cast(&m_fontAtlasGenerator->GetAtlas()); std::map& symbols = m_fontAtlasGenerator->GetAtlasInfo(); m_geometry.Close(); m_geometry.Init(text.size() * 4, text.size() * 6);