Add dynamic uniform buffers
This commit is contained in:
parent
b1bbd65aaa
commit
6f4f600fda
4 changed files with 206 additions and 69 deletions
|
@ -1,12 +1,17 @@
|
|||
const std = @import("std");
|
||||
const vk = @import("vulkan");
|
||||
const zm = @import("zmath");
|
||||
|
||||
const Utilities = @import("utilities.zig");
|
||||
const Vertex = Utilities.Vertex;
|
||||
const Device = @import("vulkan_renderer.zig").Device;
|
||||
const Instance = @import("vulkan_renderer.zig").Instance;
|
||||
const UboModel = @import("vulkan_renderer.zig").UboModel;
|
||||
|
||||
const Self = @This();
|
||||
|
||||
ubo_model: UboModel,
|
||||
|
||||
vertex_count: u32,
|
||||
vertex_buffer: vk.Buffer,
|
||||
vertex_buffer_memory: vk.DeviceMemory,
|
||||
|
@ -44,6 +49,8 @@ pub fn new(
|
|||
try self.createVertexBuffer(transfer_queue, transfer_command_pool, vertices);
|
||||
try self.createIndexBuffer(transfer_queue, transfer_command_pool, indices);
|
||||
|
||||
self.ubo_model = .{ .model = zm.identity() };
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue