mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Made max amount of thumbnail generated per frame for performance
This commit is contained in:
@@ -326,7 +326,11 @@ namespace Nuake
|
||||
const auto fileType = file->GetFileType();
|
||||
if (fileType == FileType::Material)
|
||||
{
|
||||
textureImage = ThumbnailManager::Get().GetThumbnail(file->GetRelativePath());
|
||||
auto image = ThumbnailManager::Get().GetThumbnail(file->GetRelativePath());
|
||||
if (image)
|
||||
{
|
||||
textureImage = image;
|
||||
}
|
||||
}
|
||||
else if (fileType == FileType::Image)
|
||||
{
|
||||
@@ -355,7 +359,11 @@ namespace Nuake
|
||||
}
|
||||
else if (fileType == FileType::Prefab)
|
||||
{
|
||||
textureImage = ThumbnailManager::Get().GetThumbnail(file->GetRelativePath());
|
||||
auto image = ThumbnailManager::Get().GetThumbnail(file->GetRelativePath());
|
||||
if (image)
|
||||
{
|
||||
textureImage = image;
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::SetCursorPos(prevCursor);
|
||||
@@ -918,6 +926,8 @@ namespace Nuake
|
||||
ImGui::EndChild();
|
||||
}
|
||||
|
||||
ThumbnailManager::Get().OnEndFrame();
|
||||
|
||||
ImGui::EndChild();
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
Reference in New Issue
Block a user