Skip to content

Commit 5b2cd20

Browse files
authored
Added convenience in Vulkan initInfo (#43)
1 parent 34076e0 commit 5b2cd20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend_vulkan.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const gui = @import("gui.zig");
22

3-
pub const VkHandle = usize;
3+
pub const VkHandle = ?*const anyopaque;
44

55
pub const VkPipelineRenderingCreateInfo = extern struct {
66
s_type: u32 = 0,
@@ -25,15 +25,15 @@ pub const ImGui_ImplVulkan_InitInfo = extern struct {
2525
msaa_samples: u32 = 0, // vkSampleCountFlags
2626

2727
// Optional fields
28-
pipeline_cache: VkHandle = 0, // VkPipelineCache
28+
pipeline_cache: VkHandle = null, // VkPipelineCache
2929
subpass: u32 = 0,
3030
descriptor_pool_size: u32 = 0,
3131

3232
use_dynamic_rendering: bool = false,
3333
pipeline_rendering_create_info: VkPipelineRenderingCreateInfo = .{},
3434

3535
allocator: ?*const anyopaque = null,
36-
check_vk_result_fn: ?*const fn (err: u32) void = null,
36+
check_vk_result_fn: ?*const fn (err: u32) callconv(.C) void = null,
3737
min_allocation_size: u64 = 0,
3838
};
3939

@@ -65,7 +65,7 @@ pub fn render(
6565
command_buffer: VkHandle,
6666
) void {
6767
gui.render();
68-
ImGui_ImplVulkan_RenderDrawData(gui.getDrawData(), command_buffer, 0);
68+
ImGui_ImplVulkan_RenderDrawData(gui.getDrawData(), command_buffer, null);
6969
}
7070

7171
pub fn set_min_image_count(min_image_count: u32) void {

0 commit comments

Comments
 (0)