gpu: examples: use latest friendlier APIs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
ab71c7fd93
commit
f856fccb76
2 changed files with 23 additions and 27 deletions
|
|
@ -50,10 +50,9 @@ pub fn main() !void {
|
|||
\\ }
|
||||
;
|
||||
const vs_module = setup.device.createShaderModule(&.{
|
||||
.next_in_chain = @ptrCast(*const gpu.ChainedStruct, &gpu.ShaderModule.WGSLDescriptor{
|
||||
.chain = .{ .next = null, .s_type = .shader_module_wgsl_descriptor },
|
||||
.next_in_chain = .{ .wgsl_descriptor = &.{
|
||||
.source = vs,
|
||||
}),
|
||||
} },
|
||||
.label = "my vertex shader",
|
||||
});
|
||||
|
||||
|
|
@ -63,10 +62,9 @@ pub fn main() !void {
|
|||
\\ }
|
||||
;
|
||||
const fs_module = setup.device.createShaderModule(&.{
|
||||
.next_in_chain = @ptrCast(*const gpu.ChainedStruct, &gpu.ShaderModule.WGSLDescriptor{
|
||||
.chain = .{ .next = null, .s_type = .shader_module_wgsl_descriptor },
|
||||
.next_in_chain = .{ .wgsl_descriptor = &.{
|
||||
.source = fs,
|
||||
}),
|
||||
} },
|
||||
.label = "my fragment shader",
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue