diff options
Diffstat (limited to 'src/window.cpp')
| -rw-r--r-- | src/window.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/window.cpp b/src/window.cpp index b93d8ab..c921103 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -3861,13 +3861,14 @@ void RecordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex) { vkCmdSetScissor(commandBuffer, 0, 1, &scissor); // 2d - font glyphs - uint64_t idx_unused; - FontType *fts = FontType_GetFonts(idx_unused); - for (uint32_t u = 0; u < 64; ++u) { - if ((idx_unused & (1llu << u)) != 0) continue; - FontType *ft = &fts[(FontTypeIndex_T)u]; - if (ft->bindings.instance_counter == 0) + pk_iter_t<FontType> ft{}; + pk_bkt_arr *fonts = FontType_GetFonts(); + b = pk_bkt_arr_iter_begin(fonts, &ft); + while(b) { + if (ft->bindings.instance_counter == 0) { + b = pk_bkt_arr_iter_increment(fonts, &ft); continue; + } vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pkePipelines.pipelines.named.font_glyph); vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pkePipelines.pipe_layouts.named.txtr, 0, 1, &ft->gr.vkDescriptorSet, 0, {}); @@ -3879,6 +3880,7 @@ void RecordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex) { vkCmdBindVertexBuffers(commandBuffer, ft->bindings.bd_instance.firstBinding, ft->bindings.bd_instance.bindingCount, &ft->bindings.bd_instance.buffer, ft->bindings.bd_instance.offsets); vkCmdDrawIndexed(commandBuffer, ft->bindings.index_count, ft->bindings.instance_counter, 0, 0, 0); + b = pk_bkt_arr_iter_increment(fonts, &ft); } vkCmdEndRendering(commandBuffer); |
