hnisula / ducklib

A library made out of ducks
1 stars 0 forks source link

Check present support when creating Vulkan device #38

Open hnisula opened 2 years ago

hnisula commented 2 years ago

AFAIK, this can only be checked when having created the surface the swap chain wants to use, which adds a few steps to the setup, if necessary. Are there other ways to accomplish this? Could it be accomplished this way but in an intuitive and smooth way?

hnisula commented 2 years ago
QueueFamilyIndices indices = findQueueFamilies(physicalDevice);
uint32_t queueFamilyIndices[] = {indices.graphicsFamily.value(), indices.presentFamily.value()};

Could perhaps be trivially solved through checking these families at creation of device? Then why do the check between device and surface, though?