I was looking for a struct defs for following:
VkPhysicalDevice
VkInstance
VkResult etc.,
I see most likely place is in vulkan/vulkan_core.h.
Still looking.
I was looking for a struct defs for following:
VkPhysicalDevice
VkInstance
VkResult etc.,
I see most likely place is in vulkan/vulkan_core.h.
Still looking.
Those aren’t structs. The first two are Vulkan handles, as specified by the Vulkan specification. VkResult
is just a typedef of an integer.
https://www.khronos.org/registry/vulkan/specs/1.1/html/vkspec.html#VkResult
https://www.khronos.org/registry/vulkan/specs/1.1/html/vkspec.html#VK_DEFINE_HANDLE
https://www.khronos.org/registry/vulkan/specs/1.1/html/vkspec.html#VK_DEFINE_NON_DISPATCHABLE_HANDLE
Thanks I noticed that this macro in the same header file:
typedef struct object##_T* object;
That followed by bunch of defines.
I think that has something to do with ##. I have to recall what it means. I am assuming those bunch of definitions use ## as sort of wildmark to generate all those typedef statements.
##
is macro string concatenation.
so it would yield a pointer type to a fake struct.
It is kind of a hack to achieve some measure of type safety in C.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.