Use the correct size for the ImGui glyph atlas (#2386)

This commit is contained in:
Ben Doherty
2020-04-13 12:56:55 -07:00
committed by GitHub
parent f26b761d72
commit 0e82fdbddd

View File

@@ -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);