More wrappers, more cleanup

This commit is contained in:
2025-12-04 00:27:10 +01:00
parent be4ae4f1a7
commit d885fbea43
16 changed files with 419 additions and 368 deletions

View File

@@ -6,7 +6,7 @@ const vk = @import("vulkan");
const math = @import("../math.zig");
const Blocks = @import("Blocks.zig");
const CommandBuffer = @import("../engine/CommandBuffer.zig").CommandBuffer;
const CommandBuffer = @import("../engine/CommandBuffer.zig");
const Engine = @import("../engine/Engine.zig");
const Game = @import("../Game.zig");
const GenericBuffer = @import("../engine/GenericBuffer.zig").GenericBuffer;
@@ -235,7 +235,7 @@ pub fn refresh(self: *Chunk, engine: *Engine, blocks: *const Blocks, neighbors:
self.object_count = object_count;
}
pub fn draw(self: *const Chunk, layout: vk.PipelineLayout, command_buffer: CommandBuffer(.graphics, .transient)) void {
pub fn draw(self: *const Chunk, layout: vk.PipelineLayout, command_buffer: CommandBuffer) void {
command_buffer.bindDescriptorSets(.graphics, layout, 1, &.{self.descriptor_set}, &.{});
command_buffer.drawIndexed(.{ .index_count = 6, .instance_count = self.object_count });
}