Commit 2c348dbb authored by Niklas Haas's avatar Niklas Haas

demos/sdl2: add new swapchain API usage example

Technically needed for wayland. Not that SDL2 supports it anyway.
parent ad242535
Pipeline #4177 passed with stages
in 2 minutes and 47 seconds
......@@ -192,6 +192,15 @@ static void init_vulkan()
fprintf(stderr, "Failed creating vulkan swapchain!");
exit(2);
}
int w = WINDOW_WIDTH, h = WINDOW_HEIGHT;
if (!pl_swapchain_resize(swapchain, &w, &h)) {
fprintf(stderr, "Failed resizing vulkan swapchain!");
exit(2);
}
if (w != WINDOW_WIDTH || h != WINDOW_HEIGHT)
printf("Note: window dimensions differ (got %dx%d)\n", w, h);
}
static bool upload_plane(const char *filename, const struct pl_tex **tex,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment