used hgl_align2 function

This commit is contained in:
hyzboy 2022-02-18 12:01:42 +08:00
parent f0ffb87d5b
commit 693bc33720
3 changed files with 4 additions and 4 deletions

2
CMCore

@ -1 +1 @@
Subproject commit 14a417a959d81afa336d08233abee17ad1c51866
Subproject commit 9a2368d749699b67065646265110ba089a0264a4

View File

@ -11,13 +11,13 @@ TileFont *GPUDevice::CreateTileFont(FontSource *fs,int limit_count)
{
if(!fs)return(nullptr);
int height=((fs->GetCharHeight()+2+3)>>2)<<2; //上下左右各空一个象素并保证可以被4整除
const uint32_t height=hgl_align2(fs->GetCharHeight()+2,4); //上下左右各空一个象素并保证可以被4整除
if(limit_count<=0)
{
const VkExtent2D &ext=GetSwapchainSize();
limit_count=(ext.width/height)*(ext.height/height); //按全屏幕放满不一样的字符为上限
limit_count=hgl_align2(ext.width,height)*hgl_align(ext.height,height); //按全屏幕放满不一样的字符为上限
}
if(!fs)

View File

@ -138,7 +138,7 @@ namespace hgl
return(true);
}
TextRenderable *TextRender::CreateRenderable(const UTF16String &str)
TextRenderable *TextRender::CreateRenderable()
{
return db->CreateTextRenderable(material);
}