gpu: implement RenderPassEncoder.setViewport

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-16 10:50:53 -07:00 committed by Stephen Gutekanst
parent 1db208d2df
commit d707d7e2e2
2 changed files with 34 additions and 31 deletions

View file

@ -1062,22 +1062,27 @@ const render_pass_encoder_vtable = RenderPassEncoder.VTable{
);
}
}).setVertexBuffer,
// .setViewport = (struct {
// pub fn setViewport(
// ptr: *anyopaque,
// x: f32,
// y: f32,
// width: f32,
// height: f32,
// min_depth: f32,
// max_depth: f32,
// ) void {
// c.wgpuRenderPassEncoderSetViewport(
// @ptrCast(c.WGPURenderPassEncoder, ptr),
// x, y, width, height, min_depth, max_depth,
// );
// }
// }).setViewport,
.setViewport = (struct {
pub fn setViewport(
ptr: *anyopaque,
x: f32,
y: f32,
width: f32,
height: f32,
min_depth: f32,
max_depth: f32,
) void {
c.wgpuRenderPassEncoderSetViewport(
@ptrCast(c.WGPURenderPassEncoder, ptr),
x,
y,
width,
height,
min_depth,
max_depth,
);
}
}).setViewport,
// .writeTimestamp = (struct {
// pub fn writeTimestamp(ptr: *anyopaque, query_set: QuerySet, query_index: u32) void {
// c.wgpuRenderPassEncoderWriteTimestamp(