Renamed FontDescriptor to Font

main
noah metz 2024-10-18 10:16:04 -06:00
parent 22d3b62b12
commit d04f7769ee
3 changed files with 6 additions and 28 deletions

@ -76,7 +76,7 @@ typedef struct SymbolInfoStruct {
uint32_t advance;
} SymbolInfo;
typedef struct FontDescriptorStruct {
typedef struct FontStruct {
VmaAllocation symbol_memory;
VmaAllocation uniform_memory;
VmaAllocation image_memory;
@ -86,7 +86,7 @@ typedef struct FontDescriptorStruct {
VkImageView view;
VkSampler sampler;
VkDescriptorSet set;
} FontDescriptor;
} Font;
typedef struct TextPointersMemoryStruct {
VmaAllocation pointers_memory;
@ -111,7 +111,7 @@ typedef struct UILayerStruct {
VkDeviceAddress string_pointers;
uint32_t string_count;
uint32_t chars_count;
FontDescriptor font;
Font font;
} UILayer;
typedef struct UIContextStruct {
@ -129,28 +129,6 @@ typedef struct UIContextStruct {
ComputePipeline ui_compute_text;
} UIContext;
typedef struct UIFontStruct {
} UIFont;
typedef struct UITextStruct {
} UIText;
typedef struct UICharacterStruct {
} UICharacter;
typedef struct UIElementStruct {
uint32_t type;
uint32_t offset;
} UIElement;
typedef struct UIContainerStruct {
VkDeviceAddress elements;
} UIContainer;
typedef struct UIStruct {
} UI;
VkResult init_pipelines(
VkDevice device,
VmaAllocator allocator,
@ -171,7 +149,7 @@ VkResult load_font(
uint32_t size,
VkBool32 antialias,
uint32_t** charmap,
FontDescriptor* descriptor);
Font* descriptor);
VkResult create_text_pointers(
uint32_t max_strings,

@ -24,7 +24,7 @@ VkResult render_thread(GLFWwindow* window, RenderContext* render_context) {
return VK_ERROR_UNKNOWN;
}
FontDescriptor test_font;
Font 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_TRUE, &charmap, &test_font);
if(result != VK_SUCCESS) {

@ -556,7 +556,7 @@ VkResult create_text_pointers(
return VK_SUCCESS;
}
VkResult load_font(VkDevice device, VmaAllocator allocator, VkDescriptorSetLayout layout, VkDescriptorPool pool,VkCommandPool transfer_pool, Queue transfer_queue, FT_Library library, const char* ttf_file, uint32_t size, VkBool32 antialias, uint32_t** charmap, FontDescriptor* descriptor) {
VkResult load_font(VkDevice device, VmaAllocator allocator, VkDescriptorSetLayout layout, VkDescriptorPool pool,VkCommandPool transfer_pool, Queue transfer_queue, FT_Library library, const char* ttf_file, uint32_t size, VkBool32 antialias, uint32_t** charmap, Font* descriptor) {
FT_Face face;
int error;