summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rwxr-xr-xmain.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/main.c b/main.c
index 4572828..3903579 100755
--- a/main.c
+++ b/main.c
@@ -1748,18 +1748,6 @@ struct Arguments args;
uint32_t framesDrawn;
-static bool shouldResize(const struct RenderVulkan *vk, const PuglEvent *e)
-{
- const struct SwapchainVulkan *swapchain = vk->swapchain;
- return (swapchain->extent.width != e->configure.width) ||
- (swapchain->extent.height != e->configure.height);
-}
-
-static PuglStatus onResize(struct RenderVulkan *vk, uint32_t width, uint32_t height)
-{
- CHECK_RVK(vk, rvkCreateSwapchain(vk, width, height));
-}
-
PuglStatus onDisplay(PuglView *view)
{
struct RenderVulkan *vk = puglGetHandle(view);
@@ -1837,6 +1825,19 @@ PuglStatus onDisplay(PuglView *view)
return PUGL_SUCCESS;
}
+static bool shouldResize(const struct RenderVulkan *vk, const PuglEvent *e)
+{
+ const struct SwapchainVulkan *swapchain = vk->swapchain;
+ return (swapchain->extent.width != e->configure.width) ||
+ (swapchain->extent.height != e->configure.height);
+}
+
+static PuglStatus onResize(struct RenderVulkan *vk, uint32_t width, uint32_t height)
+{
+ CHECK_RVK(vk, rvkCreateSwapchain(vk, width, height));
+ return onDisplay(vk->view);
+}
+
PuglStatus onEvent(PuglView *view, const PuglEvent *e)
{
printEvent(e, "Event:\t", args.verbose);