Skip to content

finite_render_create_physical_device

The finite_render_create_physical_device function selects and stores a compatible physical device for the given render context.

TypeDecription
FiniteRender *renderThe render context to store the selected physical device.
#include <finite/log.h>
#include <finite/render.h>
char *extensions[] = {
VK_KHR_SURFACE_EXTENSION_NAME,
VK_EXT_DEBUG_UTILS_EXTENSION_NAME,
VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME
};
char *layers[] = {
"VK_LAYER_KHRONOS_validation"
};
FiniteRender *render = finite_render_init(shell, extensions, layers, 3, 1);
finite_render_create_physical_device(render);

Call this after initializing the render context. It will choose a compatible device from the available hardware.