gpu: expose API and begin using in example
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
d32be19c8b
commit
8f5e9f89e5
4 changed files with 13 additions and 9 deletions
|
|
@ -11,9 +11,9 @@ instance: c.WGPUInstance,
|
|||
vtable: Interface.VTable,
|
||||
|
||||
/// Wraps a native WGPUInstance to provide an implementation of the gpu.Interface.
|
||||
pub fn wrap(instance: c.WGPUInstance) NativeInstance {
|
||||
pub fn wrap(instance: *anyopaque) NativeInstance {
|
||||
return .{
|
||||
.instance = instance,
|
||||
.instance = @ptrCast(c.WGPUInstance, instance),
|
||||
.vtable = undefined, // TODO
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue