GUI: Box drawing

This commit is contained in:
2026-05-13 05:40:31 +02:00
parent 79c62141df
commit bce62feb09
24 changed files with 747 additions and 62 deletions

View File

@@ -52,6 +52,7 @@ pub fn init(engine: *Engine) !Swapchain {
},
},
.subpasses = &.{
// Main
.{
.pipeline_bind_point = .graphics,
.color_attachments = &.{
@@ -65,6 +66,16 @@ pub fn init(engine: *Engine) !Swapchain {
.layout = .depth_stencil_attachment_optimal,
},
},
// GUI
.{
.pipeline_bind_point = .graphics,
.color_attachments = &.{
.{
.attachment = 0,
.layout = .color_attachment_optimal,
},
},
},
},
.dependencies = &.{
.{
@@ -89,6 +100,25 @@ pub fn init(engine: *Engine) !Swapchain {
.by_region_bit = true,
},
},
.{
.src_subpass = 0,
.dst_subpass = 1,
.src_stage_mask = .{
.color_attachment_output_bit = true,
},
.dst_stage_mask = .{
.color_attachment_output_bit = true,
},
.src_access_mask = .{
.color_attachment_write_bit = true,
},
.dst_access_mask = .{
.color_attachment_write_bit = true,
},
.dependency_flags = .{
.by_region_bit = true,
},
},
},
});
errdefer engine.destroyRenderPass(render_pass);
@@ -129,6 +159,8 @@ pub fn deinit(self: *Swapchain, engine: *Engine) void {
}
pub fn recreate(self: *Swapchain, engine: *Engine) !void {
try engine.deviceWaitIdle(); // TODO LMAO
const mode = &engine.mode.surface;
const allocator = engine.vk_allocator.allocator;