Initial commit

This commit is contained in:
Mason Remaley 2024-07-29 01:17:25 -07:00
commit 48a86027ba
16 changed files with 80801 additions and 0 deletions

View file

@ -0,0 +1,8 @@
// It's unclear to me where the generator gets this define (maybe it's directly from the original
// cpp header?), so we generate it manually.
pub fn col32(r: u32, g: u32, b: u32, a: u32) u32 {
return a << IM_COL32_A_SHIFT |
b << IM_COL32_B_SHIFT |
g << IM_COL32_G_SHIFT |
r << IM_COL32_R_SHIFT;
}

View file

View file

@ -0,0 +1,2 @@
};
}

View file

@ -0,0 +1,68 @@
const Options = struct {
PFNvkVoidFunction: type,
VkAllocationCallbacks: type,
VkClearValue: type,
VkColorSpaceKHR: type,
VkCommandBuffer: type,
VkCommandPool: type,
VkDescriptorPool: type,
VkDescriptorSet: type,
VkDevice: type,
VkDeviceSize: type,
VkFence: type,
VkFramebuffer: type,
VkImage: type,
VkImageLayout: type,
VkImageView: type,
VkInstance: type,
VkPhysicalDevice: type,
VkPipeline: type,
VkPipelineCache: type,
VkPipelineRenderingCreateInfoKHR: type,
VkPresentModeKHR: type,
VkQueue: type,
VkRenderPass: type,
VkResult: type,
VkSampleCountFlagBits: type,
VkSampler: type,
VkSemaphore: type,
VkSurfaceFormatKHR: type,
VkSurfaceKHR: type,
VkSwapchainKHR: type,
VkFormat: type,
};
pub fn get(options: Options) type {
const VkFormat = options.VkFormat;
const PFNvkVoidFunction = options.PFNvkVoidFunction;
const VkAllocationCallbacks = options.VkAllocationCallbacks;
const VkClearValue = options.VkClearValue;
const VkColorSpaceKHR = options.VkColorSpaceKHR;
const VkCommandBuffer = options.VkCommandBuffer;
const VkCommandPool = options.VkCommandPool;
const VkDescriptorPool = options.VkDescriptorPool;
const VkDescriptorSet = options.VkDescriptorSet;
const VkDevice = options.VkDevice;
const VkDeviceSize = options.VkDeviceSize;
const VkFence = options.VkFence;
const VkFramebuffer = options.VkFramebuffer;
const VkImage = options.VkImage;
const VkImageLayout = options.VkImageLayout;
const VkImageView = options.VkImageView;
const VkInstance = options.VkInstance;
const VkPhysicalDevice = options.VkPhysicalDevice;
const VkPipeline = options.VkInstance;
const VkPipelineCache = options.VkPipelineCache;
const VkPipelineRenderingCreateInfoKHR = options.VkPipelineRenderingCreateInfoKHR;
const VkPresentModeKHR = options.VkPresentModeKHR;
const VkQueue = options.VkQueue;
const VkRenderPass = options.VkRenderPass;
const VkResult = options.VkResult;
const VkSampleCountFlagBits = options.VkSampleCountFlagBits;
const VkSampler = options.VkSampler;
const VkSemaphore = options.VkSemaphore;
const VkSurfaceFormatKHR = options.VkSurfaceFormatKHR;
const VkSurfaceKHR = options.VkSurfaceKHR;
const VkSwapchainKHR = options.VkSwapchainKHR;
return struct {