gpu: expose API and begin using in example

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-06 21:38:36 -07:00 committed by Stephen Gutekanst
parent d32be19c8b
commit 8f5e9f89e5
4 changed files with 13 additions and 9 deletions

View file

@ -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
};
}