code cleanup

This commit is contained in:
ohyzha
2024-08-07 21:52:54 +03:00
parent 38d97f4c28
commit a390470420
6 changed files with 45 additions and 41 deletions

View File

@@ -12,9 +12,11 @@
#include "Scene/FontAtlasGenerator.hpp"
#include "Base/Logger.hpp"
#include "Host/ResourceLoader.hpp"
#include "Image/ImageLoader.hpp"
#include "DataFormat.hpp"
#include "Base/Logger.hpp"
#include <fstream>
#include <utf8.h>
#include "Image/ImageLoader.hpp"
namespace OpenVulkano::Scene
{
@@ -210,4 +212,14 @@ namespace OpenVulkano::Scene
}
SimpleDrawable::Init(m_shader, &m_geometry, &m_material, &m_uniBuffer);
}
void TextDrawable::SetFontAtlasGenerator(FontAtlasGenerator* fontAtlasGenerator)
{
if (!fontAtlasGenerator || fontAtlasGenerator->GetGlyphsInfo().empty())
{
Logger::RENDER->error("FontAtlasGenerator is either nullptr or doesn't contain glyphs info");
return;
}
m_fontAtlasGenerator = fontAtlasGenerator;
}
}