Created a GpuTextureDef

This commit is contained in:
adrien
2026-05-20 09:55:34 +02:00
parent fc57bee3af
commit 45c0f3180e
3 changed files with 21 additions and 18 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ pub const Binding = struct {
element_size: u32 = 0,
};
pub const RenderDef = struct {
pub const GpuRenderDef = struct {
bindings: []const Binding = &.{},
/// The surface texture format we are rendering to (e.g., BGRA8Unorm)
texture_format: GpuTextureFormat,
@@ -32,9 +32,9 @@ const GpuPrimitiveTopology = enum(c_uint) {
};
pip: c.WGPURenderPipeline,
def: RenderDef,
def: GpuRenderDef,
pub fn init(device: GpuDevice, wgsl: []const u8, def: RenderDef) !@This() {
pub fn init(device: GpuDevice, wgsl: []const u8, def: GpuRenderDef) !@This() {
var wgsl_src = c.WGPUShaderSourceWGSL{
.chain = .{ .sType = c.WGPUSType_ShaderSourceWGSL },
.code = sv(wgsl),