From 717a072b3d6d3550fcc84278e7448bcbc5db8ddf Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Thu, 17 Oct 2024 09:26:16 -0600 Subject: [PATCH] Removed unecessary if --- client/src/main.c | 2 +- client/src/pipeline.c | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/client/src/main.c b/client/src/main.c index 432713b..48f5117 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -247,7 +247,7 @@ VkResult render_thread(GLFWwindow* window, RenderContext* render_context) { FontDescriptor test_font; uint32_t* charmap; - result = load_font(render_context->device, render_context->allocator, ui_context.font_layout, ui_context.font_pool, render_context->transfer_pool, render_context->transfer_queue, library, "test.ttf", 16, VK_FALSE, &charmap, &test_font); + result = load_font(render_context->device, render_context->allocator, ui_context.font_layout, ui_context.font_pool, render_context->transfer_pool, render_context->transfer_queue, library, "test.ttf", 16, VK_TRUE, &charmap, &test_font); if(result != VK_SUCCESS) { return result; } diff --git a/client/src/pipeline.c b/client/src/pipeline.c index 3872738..a35ae42 100644 --- a/client/src/pipeline.c +++ b/client/src/pipeline.c @@ -525,15 +525,9 @@ VkResult load_font(VkDevice device, VmaAllocator allocator, VkDescriptorSetLayou FT_Load_Glyph(face, glyph_index, load_flags); for(uint32_t y = 0; y < face->glyph->bitmap.rows; y++) { for(uint32_t x = 0; x < face->glyph->bitmap.width; x++) { - if(antialias == VK_TRUE) { - uint32_t level = face->glyph->bitmap.buffer[y*face->glyph->bitmap.width+x]; - level = ((level * 0xFFFFFF) / 256) << 8; - images[max_width*max_height*i + max_width*y + x] = 0x000000FF + level; - } else { - if(face->glyph->bitmap.buffer[y*face->glyph->bitmap.width+x] != 0) { - images[max_width*max_height*i + max_width*y + x] = 0xFFFFFFFF; - } - } + uint32_t level = face->glyph->bitmap.buffer[y*face->glyph->bitmap.width+x]; + level = ((level * 0xFFFFFF) / 256) << 8; + images[max_width*max_height*i + max_width*y + x] = 0x000000FF + level; } } }