summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-03-04 13:44:30 -0500
committerJonathan Bradley <jcb@pikum.xyz>2025-03-04 14:04:17 -0500
commit78ca2865441df428228d158796c346e1df75d302 (patch)
treeebcbea508c88162c99fd3fa217aae79cc9440217 /src/window.cpp
parent3ca179e53bb4840a88c95e26b7eb11b36e1830dd (diff)
pke: ui draws on screen as expected
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 6c27238..ea1deb5 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -2907,9 +2907,9 @@ void RecordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex) {
vkCmdSetScissor(commandBuffer, 0, 1, &scissor);
// 2d overlay grbinds
- if (false)
+ pke_ui_graphics_bindings *ui_gr = pke_ui_get_graphics_bindings();
+ if (ui_gr != nullptr && ui_gr->instance_counter > 0)
{
- pke_ui_graphics_bindings *ui_gr = pke_ui_get_graphics_bindings();
vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pkePipelines.pipelines.named.ui_base);
vkCmdBindIndexBuffer(commandBuffer, ui_gr->bd_index.buffer, ui_gr->bd_index.offsets[0], VK_INDEX_TYPE_UINT16);
vkCmdBindVertexBuffers(commandBuffer, ui_gr->bd_vertex.firstBinding, ui_gr->bd_vertex.bindingCount, &ui_gr->bd_vertex.buffer, ui_gr->bd_vertex.offsets);
@@ -3166,7 +3166,7 @@ void DetermineMonitor() {
}
void RecreateSwapchain() {
- pkeRuntime.graphics.resize_index += 1;
+ pkeSettings.rt.was_framebuffer_resized = true;
int width, height = 0;
glfwGetFramebufferSize(window, &width, &height);
while (width == 0 || height == 0) {