Display text

This commit is contained in:
2023-12-01 14:31:32 -05:00
parent 90731c1e52
commit cd9f90bcd4
4 changed files with 43 additions and 23 deletions

View File

@@ -4,8 +4,8 @@
namespace JabyEngine {
class FontWriter {
private:
GPU::TexPage::Linked tex_page;
FontBufferInfo prim_buffer;
GPU::TexPage::Linked tex_page;
FontPrimitive* cur_primitive;
void setup(const FontBufferInfo& buffer_info, const SimpleTIM& vram_dst, const GPU::SizeI16& font_size);
@@ -14,8 +14,8 @@ namespace JabyEngine {
static constexpr FontWriter empty() {
FontWriter instance;
instance.tex_page = {0};
instance.prim_buffer = FontBufferInfo::empty();
instance.tex_page = {0};
instance.cur_primitive = nullptr;
return instance;
}
@@ -24,7 +24,7 @@ namespace JabyEngine {
FontWriter::setup(buffer_info, vram_dst, Make::SizeI16(font_info.FontSize.width, font_info.FontSize.height));
}
void write(GPU::PositionI16 pos, const char* str);
void render();
GPU::PositionI16 write(GPU::PositionI16 pos, const char* str);
void render();
};
}