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
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,15 +16,15 @@
|
|||
//!
|
||||
//!
|
||||
const std = @import("std");
|
||||
const Interface = @import("Interface.zig");
|
||||
const NativeInstance = @import("NativeInstance.zig");
|
||||
pub const Interface = @import("Interface.zig");
|
||||
pub const NativeInstance = @import("NativeInstance.zig");
|
||||
|
||||
const Adapter = @import("Adapter.zig");
|
||||
const Device = @import("Device.zig");
|
||||
const Surface = @import("Surface.zig");
|
||||
pub const Adapter = @import("Adapter.zig");
|
||||
pub const Device = @import("Device.zig");
|
||||
pub const Surface = @import("Surface.zig");
|
||||
|
||||
const FeatureName = @import("feature_name.zig").FeatureName;
|
||||
const SupportedLimits = @import("supported_limits.zig").SupportedLimits;
|
||||
pub const FeatureName = @import("feature_name.zig").FeatureName;
|
||||
pub const SupportedLimits = @import("supported_limits.zig").SupportedLimits;
|
||||
|
||||
test "syntax" {
|
||||
_ = Interface;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue