Hey everyone!!! Ok quick backstory, I am using vulkan with swift and ran into an issue passing an array of strings from swift into the struct VkInstanceCreateInfo. So I got a stupid question about how to create a pointer to an array of
enabledLayerCount null-terminated UTF-8 strings. Basically, I have an array of strings in swift that contains validation layers that are needed for vulkan to log things to the console.
var enabledLayers = ["VK_LAYER_LUNARG_standard_validation"]
As of right now, only one layer exists but more will be added later for better debugging. I need to convert this Array of strings to this type for the C API:
The vulkan spec states the following about the type that needs to be passed in:
ppEnabledLayerNames is a pointer to an array of enabledLayerCount null-terminated UTF-8 strings containing the names of layers to enable for the created instance. See the Layers section for further details.
How would I go about creating this C array of UTF-8 Strings from swift code to pass into the vulkan C APIs Function? Again thank you all so much for your time!
The C Type of the parameter is:
const char* const*