diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-02-04 19:17:59 -0500 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-02-04 19:17:59 -0500 |
| commit | 61e179f9580c985cb5ca80ea732fc7572d31c489 (patch) | |
| tree | 122ff15c6d94ce5aebff4ff6f1fc6d13317abe16 /src/font.hpp | |
| parent | a3fb454f9935960dc2d367455f891d8fedfb9016 (diff) | |
pke: chkpt: text rendering, no errors but blank
Diffstat (limited to 'src/font.hpp')
| -rw-r--r-- | src/font.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/font.hpp b/src/font.hpp index 494c365..116ac06 100644 --- a/src/font.hpp +++ b/src/font.hpp @@ -6,8 +6,6 @@ #include "pk.h" #include <glm/vec4.hpp> -#include <ostream> -#include <istream> /* Vert: (two triangles) @@ -47,7 +45,9 @@ struct FontType : public Entity_Base { VkImageView textureImageView = VK_NULL_HANDLE; VkDescriptorPool vkDescriptorPool = VK_NULL_HANDLE; VkDescriptorSet *vkDescriptorSets = nullptr; + FontGlyphChar *glyphs; FontRender *renders = nullptr; + uint32_t n_glyphs; FontRenderIndex n_render = FontRenderIndex{0}; FontRenderIndex h_render = FontRenderIndex{0}; FontTypeIndex index_ft = FontTypeIndex{0}; @@ -64,10 +64,11 @@ struct FontType : public Entity_Base { void FontType_Init(); void FontType_Teardown(); +void FontType_Tick(); void FontType_Serialize(std::ofstream &stream, FontType *ft); void FontType_Deserialize(std::ifstream &stream); FontType* FontType_GetFonts(FontTypeIndex &count); -FontTypeIndex FontType_RegisterFont(pk_cstr title, AssetHandle fontTexture, AssetHandle glyphs); +FontTypeIndex FontType_RegisterFont(pk_cstr title, AssetHandle fontTextureHandle, AssetHandle glyphsHandle); void FontType_Unload(FontTypeIndex idx); FontRender FontType_AddStringRender(FontTypeIndex idx_ft, pk_cstr cstr); void FontType_RemoveStringRender(FontRender fr); |
