split font atlas generator to interface and implementation

This commit is contained in:
ohyzha
2024-08-07 20:05:06 +03:00
parent 634b4431b3
commit 38d97f4c28
6 changed files with 160 additions and 101 deletions

View File

@@ -24,6 +24,7 @@
#include "Controller/FreeCamCameraController.hpp"
#include "Image/ImageLoaderPng.hpp"
#include "Scene/FontAtlasGenerator.hpp"
#include "Scene/MsdfFontAtlasGenerator.hpp"
#include <filesystem>
#ifdef _WIN32
@@ -67,7 +68,7 @@ namespace OpenVulkano
m_drawablesPool.resize(N);
#ifdef MSDFGEN_AVAILABLE
Charset charset = FontAtlasGenerator::LoadAllGlyphs(fontPath);
Charset charset = MsdfFontAtlasGenerator::LoadAllGlyphs(fontPath);
//Charset charset = Charset::ASCII;
//for (unicode_t c = 0x0410; c <= 0x041F; c++)
//{
@@ -133,7 +134,7 @@ namespace OpenVulkano
PerspectiveCamera m_cam;
OpenVulkano::FreeCamCameraController m_camController;
#ifdef MSDFGEN_AVAILABLE
FontAtlasGenerator m_atlasGenerator;
MsdfFontAtlasGenerator m_atlasGenerator;
#endif
std::vector<SimpleDrawable*> m_drawablesPool;
std::vector<Node> m_nodesPool;