GUI quad rendering

improved font and image readers
different mesh VAOs for spatial and GUI quads
This commit is contained in:
devZoGok
2026-07-06 13:01:31 +03:00
parent 3193c61036
commit e448f7003e
15 changed files with 406 additions and 269 deletions
+5 -2
View File
@@ -20,8 +20,11 @@ namespace vb01{
int width, height, numChannels, layerId;
u8 *data = stbi_load(path.c_str(), &width, &height, &numChannels, 0);
if(loadToGpu)
Root::getSingleton()->initTextureDataOnGpu(Root::getSingleton()->getMeshTextureBuffer(), data, width, height, layerId);
if(loadToGpu){
Root *root = Root::getSingleton();
u32 *texBuffer = (sceneImage ? root->getMeshTextureBuffer() : root->getGuiTextureBuffer());
root->initTextureDataOnGpu(texBuffer, data, width, height, layerId);
}
return new ImageAsset(path, data, width, height, numChannels, layerId);
}