gpu: add Texture.destroy

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 13:25:37 -07:00 committed by Stephen Gutekanst
parent 181e0a19f5
commit e9ac2a0f4f
2 changed files with 11 additions and 1 deletions

View file

@ -571,6 +571,11 @@ const texture_vtable = Texture.VTable{
c.wgpuTextureSetLabel(@ptrCast(c.WGPUTexture, ptr), label);
}
}).setLabel,
.destroy = (struct {
pub fn destroy(ptr: *anyopaque) void {
c.wgpuTextureDestroy(@ptrCast(c.WGPUTexture, ptr));
}
}).destroy,
};
fn wrapSampler(sampler: c.WGPUSampler) Sampler {