diff --git a/CMCore b/CMCore index 14a417a9..9a2368d7 160000 --- a/CMCore +++ b/CMCore @@ -1 +1 @@ -Subproject commit 14a417a959d81afa336d08233abee17ad1c51866 +Subproject commit 9a2368d749699b67065646265110ba089a0264a4 diff --git a/src/SceneGraph/Vulkan/VKTileFont.cpp b/src/SceneGraph/Vulkan/VKTileFont.cpp index e7d60ba5..64d681cc 100644 --- a/src/SceneGraph/Vulkan/VKTileFont.cpp +++ b/src/SceneGraph/Vulkan/VKTileFont.cpp @@ -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) diff --git a/src/SceneGraph/font/TextRender.cpp b/src/SceneGraph/font/TextRender.cpp index 017dd512..5d2d520e 100644 --- a/src/SceneGraph/font/TextRender.cpp +++ b/src/SceneGraph/font/TextRender.cpp @@ -138,7 +138,7 @@ namespace hgl return(true); } - TextRenderable *TextRender::CreateRenderable(const UTF16String &str) + TextRenderable *TextRender::CreateRenderable() { return db->CreateTextRenderable(material); }