factored out texture GPU data loading

improved texture buffer and layer retrieval
using draw commands 1:1 with meshes
This commit is contained in:
devZoGok
2026-07-08 12:08:03 +03:00
parent e448f7003e
commit f457c69d36
11 changed files with 85 additions and 158 deletions
+2 -2
View File
@@ -36,7 +36,6 @@ namespace vb01{
vector<FontAsset::Glyph> glyphs;
Root *root = Root::getSingleton();
u32 *buffer = root->getGuiTextureBuffer();
for(u16 i = firstChar; i < lastChar; i++){
if(FT_Load_Char(face, i, FT_LOAD_RENDER)){
@@ -50,9 +49,10 @@ namespace vb01{
Vector2(face->glyph->bitmap.width, face->glyph->bitmap.rows),
Vector2(face->glyph->bitmap_left, face->glyph->bitmap_top),
face->glyph->advance.x,
-1,
-1
);
root->initTextureDataOnGpu(buffer, glyph.data, glyph.size.x, glyph.size.y, glyph.layerId);
root->initTextureDataOnGpu(glyph.data, glyph.size.x, glyph.size.y, glyph.bufferId, glyph.layerId, false);
glyphs.push_back(glyph);
}