From 0e82fdbddd7afb09e0aba6d2ce68b8eca04825a6 Mon Sep 17 00:00:00 2001 From: Ben Doherty Date: Mon, 13 Apr 2020 12:56:55 -0700 Subject: [PATCH] Use the correct size for the ImGui glyph atlas (#2386) --- libs/filagui/src/ImGuiHelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/filagui/src/ImGuiHelper.cpp b/libs/filagui/src/ImGuiHelper.cpp index 8cbe095268..76a2177bb2 100644 --- a/libs/filagui/src/ImGuiHelper.cpp +++ b/libs/filagui/src/ImGuiHelper.cpp @@ -76,7 +76,7 @@ void ImGuiHelper::createAtlasTexture(Engine* engine) { static unsigned char* pixels; int width, height; io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height); - size_t size = (size_t) (width * height); + size_t size = (size_t) (width * height * 4); Texture::PixelBufferDescriptor pb( pixels, size, Texture::Format::RGBA, Texture::Type::UBYTE);