implement multiline text rendering
This commit is contained in:
@@ -48,8 +48,8 @@ namespace OpenVulkano::Scene
|
||||
{
|
||||
public:
|
||||
static Shader& GetDefaultShader();
|
||||
static std::map<uint32_t, GlyphInfo> ReadAtlasMetadataFile(const std::string& atlasMetadataFile);
|
||||
static std::map<uint32_t, GlyphInfo> ReadAtlasMetadata(const Array<char>& atlasMetadata);
|
||||
TextDrawable(const std::string& atlasMetadataFile, Texture* atlasTex, const TextConfig& config = TextConfig());
|
||||
TextDrawable(const Array<char>& atlasMetadata, Texture* atlasTex, const TextConfig& config = TextConfig());
|
||||
TextDrawable(const std::map<uint32_t, GlyphInfo>& glyphData, Texture* atlasTex, const TextConfig& config = TextConfig());
|
||||
#ifdef MSDFGEN_AVAILABLE
|
||||
TextDrawable(FontAtlasGenerator* fontAtlasGenerator, const TextConfig& config = TextConfig());
|
||||
@@ -62,7 +62,7 @@ namespace OpenVulkano::Scene
|
||||
#ifdef MSDFGEN_AVAILABLE
|
||||
void SetFontAtlasGenerator(FontAtlasGenerator* fontAtlasGenerator)
|
||||
{
|
||||
if (!fontAtlasGenerator || fontAtlasGenerator->GetAtlasInfo().empty())
|
||||
if (!fontAtlasGenerator || fontAtlasGenerator->GetGlyphsInfo().empty())
|
||||
{
|
||||
Logger::RENDER->error("FontAtlasGenerator is either nullptr or doesn't contain glyphs info");
|
||||
return;
|
||||
@@ -76,6 +76,7 @@ namespace OpenVulkano::Scene
|
||||
Material m_material;
|
||||
UniformBuffer m_uniBuffer;
|
||||
std::map<uint32_t, GlyphInfo> m_glyphs;
|
||||
AtlasMetadata m_meta;
|
||||
#ifdef MSDFGEN_AVAILABLE
|
||||
FontAtlasGenerator* m_fontAtlasGenerator = nullptr;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user