adding image view

This commit is contained in:
2025-11-24 22:42:03 +01:00
parent 54e33e03ab
commit a106722bc4
11 changed files with 138 additions and 14 deletions

View File

@@ -15,6 +15,7 @@ const CommandPool = @import("CommandPool.zig");
const DeviceMemory = @import("DeviceMemory.zig");
const Fence = @import("Fence.zig");
const Image = @import("Image.zig");
const ImageView = @import("ImageView.zig");
const Self = @This();
pub const ObjectType: vk.ObjectType = .device;
@@ -37,6 +38,7 @@ pub const DispatchTable = struct {
createCommandPool: *const fn (*Self, std.mem.Allocator, *const vk.CommandPoolCreateInfo) VkError!*CommandPool,
createFence: *const fn (*Self, std.mem.Allocator, *const vk.FenceCreateInfo) VkError!*Fence,
createImage: *const fn (*Self, std.mem.Allocator, *const vk.ImageCreateInfo) VkError!*Image,
createImageView: *const fn (*Self, std.mem.Allocator, *const vk.ImageViewCreateInfo) VkError!*ImageView,
destroy: *const fn (*Self, std.mem.Allocator) VkError!void,
};
@@ -105,3 +107,7 @@ pub inline fn createCommandPool(self: *Self, allocator: std.mem.Allocator, info:
pub inline fn createImage(self: *Self, allocator: std.mem.Allocator, info: *const vk.ImageCreateInfo) VkError!*Image {
return self.dispatch_table.createImage(self, allocator, info);
}
pub inline fn createImageView(self: *Self, allocator: std.mem.Allocator, info: *const vk.ImageViewCreateInfo) VkError!*ImageView {
return self.dispatch_table.createImageView(self, allocator, info);
}