Fix font texture mipmaps and setup a debug name

This commit is contained in:
Lynix 2023-11-28 15:22:10 +01:00
parent fa10201d69
commit 120ba7dcd7
1 changed files with 2 additions and 2 deletions

View File

@ -360,8 +360,8 @@ namespace Nz
texParams.height = height;
texParams.pixelFormat = Nz::PixelFormat::RGBA8;
texParams.type = Nz::ImageType::E2D;
m_fontTexture = renderDevice->InstantiateTexture(texParams);
m_fontTexture->Update(pixels, width, height);
m_fontTexture = renderDevice->InstantiateTexture(texParams, pixels, true);
m_fontTexture->UpdateDebugName("FontTexture");
ImTextureID textureID = m_fontTexture.get();
io.Fonts->TexID = textureID;