gpu: implement Device.createTexture
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
418d379f1c
commit
85d5de1077
3 changed files with 16 additions and 2 deletions
|
|
@ -444,6 +444,14 @@ const device_vtable = Device.VTable{
|
|||
));
|
||||
}
|
||||
}).nativeCreateSwapChain,
|
||||
.createTexture = (struct {
|
||||
pub fn createTexture(ptr: *anyopaque, descriptor: *const Texture.Descriptor) Texture {
|
||||
return wrapTexture(c.wgpuDeviceCreateTexture(
|
||||
@ptrCast(c.WGPUDevice, ptr),
|
||||
@ptrCast(*const c.WGPUTextureDescriptor, descriptor),
|
||||
));
|
||||
}
|
||||
}).createTexture,
|
||||
.destroy = (struct {
|
||||
pub fn destroy(ptr: *anyopaque) void {
|
||||
c.wgpuDeviceDestroy(@ptrCast(c.WGPUDevice, ptr));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue