gpu: implement Device.createSampler
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
def801d8a1
commit
418d379f1c
3 changed files with 17 additions and 3 deletions
|
|
@ -382,6 +382,14 @@ const device_vtable = Device.VTable{
|
|||
return wrapBindGroupLayout(c.wgpuDeviceCreateBindGroupLayout(@ptrCast(c.WGPUDevice, ptr), &desc));
|
||||
}
|
||||
}).createBindGroupLayout,
|
||||
.createSampler = (struct {
|
||||
pub fn createSampler(ptr: *anyopaque, descriptor: *const Sampler.Descriptor) Sampler {
|
||||
return wrapSampler(c.wgpuDeviceCreateSampler(
|
||||
@ptrCast(c.WGPUDevice, ptr),
|
||||
@ptrCast(*const c.WGPUSamplerDescriptor, descriptor),
|
||||
));
|
||||
}
|
||||
}).createSampler,
|
||||
.createShaderModule = (struct {
|
||||
pub fn createShaderModule(ptr: *anyopaque, descriptor: *const ShaderModule.Descriptor) ShaderModule {
|
||||
switch (descriptor.code) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue