gpu: implement SwapChain.present, SwapChain.getCurrentTextureView
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
cc40004a5f
commit
ef3eed7afb
2 changed files with 22 additions and 3 deletions
|
|
@ -587,6 +587,16 @@ const swap_chain_vtable = SwapChain.VTable{
|
|||
);
|
||||
}
|
||||
}).configure,
|
||||
.getCurrentTextureView = (struct {
|
||||
pub fn getCurrentTextureView(ptr: *anyopaque) TextureView {
|
||||
return wrapTextureView(c.wgpuSwapChainGetCurrentTextureView(@ptrCast(c.WGPUSwapChain, ptr)));
|
||||
}
|
||||
}).getCurrentTextureView,
|
||||
.present = (struct {
|
||||
pub fn present(ptr: *anyopaque) void {
|
||||
c.wgpuSwapChainPresent(@ptrCast(c.WGPUSwapChain, ptr));
|
||||
}
|
||||
}).present,
|
||||
};
|
||||
|
||||
fn wrapTextureView(texture_view: c.WGPUTextureView) TextureView {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue