# ============================================================================ # vk.ludic — Vk.*: Vulkan for Ludic. # # Every command of Vulkan 1.0-1.4 and of the extensions the render3d Vulkan renderer # is built around is bound in vk_api.ludic (generated by `ludic-dev vkgen` from the # Vulkan registry), with every constant and every struct's size and field offsets. # Vk.(...) calls one: Vk.create_instance(info, null, out). Structs are # plain memory filled by field name: # let ci = bytes(VkInstanceCreateInfo_sizeof) # Vk.zero(ci, VkInstanceCreateInfo_sizeof) # Vk.put_i32(ci, VkInstanceCreateInfo_sType, VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO) # # Numbers: a C float is float bits in an int; uint64_t, VkDeviceSize and # non-dispatchable handles are `long`. A negative long has to come from a `long` # variable - an int literal passed straight to a long parameter is zero-extended. # # The loader is opened at run time by Vk.open() (vk_win.ll / vk_mac.ll), never # linked: 0 means this machine has no Vulkan, and the program carries on without it. # ============================================================================ import "vk_api.ludic"