fix: ImGui issues

This commit is contained in:
Samuliak 2024-08-25 10:09:18 +02:00
parent b105a383aa
commit c905399f1f
4 changed files with 38 additions and 45 deletions

View file

@ -311,12 +311,8 @@ void ImGui_ImplMetal_RenderDrawData(ImDrawData* drawData, id<MTLCommandBuffer> c
bool ImGui_ImplMetal_CreateFontsTexture(id<MTLDevice> device)
{
// HACK: check if the font atlas has been built already
ImGuiIO& io = ImGui::GetIO();
if (io.Fonts->IsBuilt())
return true;
ImGui_ImplMetal_Data* bd = ImGui_ImplMetal_GetBackendData();
ImGuiIO& io = ImGui::GetIO();
// We are retrieving and uploading the font atlas as a 4-channels RGBA texture here.
// In theory we could call GetTexDataAsAlpha8() and upload a 1-channel texture to save on memory access bandwidth.