码迷,mamicode.com
首页 > 其他好文 > 详细

优化之ui字体图集大小

时间:2019-09-26 21:20:13      阅读:89      评论:0      收藏:0      [点我收藏+]

标签:gate   ext   editor   ISE   tor   ntp   dde   adr   ndt   

ui图集大小

FSlateRHIResourceManager::FSlateRHIResourceManager()
    : bExpiredResourcesNeedCleanup(false)
    , BadResourceTexture(nullptr)
    , DeleteResourcesCommand(
        TEXT("Slate.DeleteResources"),
        *LOCTEXT("CommandText_DeleteResources", "Flushes and deletes all resources created by Slate‘s RHI Resource Manager.").ToString(),
        FConsoleCommandDelegate::CreateRaw(this, &FSlateRHIResourceManager::DeleteBrushResourcesCommand))
{
    FCoreDelegates::OnPreExit.AddRaw(this, &FSlateRHIResourceManager::OnAppExit);
    FCoreUObjectDelegates::GetPostGarbageCollect().AddRaw(this, &FSlateRHIResourceManager::OnPostGarbageCollect);

    MaxAltasedTextureSize = FIntPoint(256, 256);
    if (GIsEditor)
    {
        AtlasSize = 2048;
    }
    else
    {
        AtlasSize = 1024;
        if (GConfig)
        {
            int32 RequestedSize = 1024;
            GConfig->GetInt(TEXT("SlateRenderer"), TEXT("TextureAtlasSize"), RequestedSize, GEngineIni);
            AtlasSize = FMath::Clamp<uint32>(RequestedSize, 0, 2048);

            int32 MaxAtlasedTextureWidth = 256;
            int32 MaxAtlasedTextureHeight = 256;
            GConfig->GetInt(TEXT("SlateRenderer"), TEXT("MaxAtlasedTextureWidth"), MaxAtlasedTextureWidth, GEngineIni);
            GConfig->GetInt(TEXT("SlateRenderer"), TEXT("MaxAtlasedTextureHeight"), MaxAtlasedTextureHeight, GEngineIni);

 

优化之ui字体图集大小

标签:gate   ext   editor   ISE   tor   ntp   dde   adr   ndt   

原文地址:https://www.cnblogs.com/Shaojunping/p/11594234.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!