small fixes
This commit is contained in:
@@ -38,6 +38,8 @@ namespace OpenVulkano
|
||||
using namespace Math;
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
//#define CREATE_NEW_ATLAS 1
|
||||
|
||||
class TextExampleAppImpl final : public TextExampleApp
|
||||
{
|
||||
public:
|
||||
@@ -68,12 +70,12 @@ namespace OpenVulkano
|
||||
m_nodesPool.resize(N * 2);
|
||||
m_drawablesPool.resize(N * 2);
|
||||
|
||||
#ifdef MSDFGEN_AVAILABLE
|
||||
#if defined(MSDFGEN_AVAILABLE) && defined(CREATE_NEW_ATLAS)
|
||||
msdf_atlas::Charset charset = SdfFontAtlasGenerator::LoadAllGlyphs(fontPath);
|
||||
m_atlasGenerator.GenerateAtlas(fontPath, charset);
|
||||
m_msdfAtlasGenerator.GenerateAtlas(fontPath, charset);
|
||||
#else
|
||||
auto sdfMetadataInfo = resourceLoader.GetResource("sdf_atlas_packed");
|
||||
auto sdfMetadataInfo = resourceLoader.GetResource("sdf_atlas_packed.png");
|
||||
auto msdfMetadataInfo = resourceLoader.GetResource("msdf_atlas_packed.png");
|
||||
#endif
|
||||
|
||||
@@ -81,7 +83,7 @@ namespace OpenVulkano
|
||||
{
|
||||
int textIdx = i % texts.size();
|
||||
TextDrawable* t = nullptr;
|
||||
#ifdef MSDFGEN_AVAILABLE
|
||||
#if defined(MSDFGEN_AVAILABLE) && defined(CREATE_NEW_ATLAS)
|
||||
if (i < texts.size())
|
||||
{
|
||||
t = new TextDrawable(&m_atlasGenerator, texts[textIdx].second);
|
||||
|
||||
Reference in New Issue
Block a user