used hgl_align2 function
This commit is contained in:
parent
f0ffb87d5b
commit
693bc33720
2
CMCore
2
CMCore
@ -1 +1 @@
|
||||
Subproject commit 14a417a959d81afa336d08233abee17ad1c51866
|
||||
Subproject commit 9a2368d749699b67065646265110ba089a0264a4
|
@ -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)
|
||||
|
@ -138,7 +138,7 @@ namespace hgl
|
||||
return(true);
|
||||
}
|
||||
|
||||
TextRenderable *TextRender::CreateRenderable(const UTF16String &str)
|
||||
TextRenderable *TextRender::CreateRenderable()
|
||||
{
|
||||
return db->CreateTextRenderable(material);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user