gpu: convert SwapChain from enum(usize) to *opaque

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-24 14:59:41 -07:00 committed by Stephen Gutekanst
parent b95f0cc41a
commit 5c5990a84f

View file

@ -2,20 +2,15 @@ const ChainedStruct = @import("types.zig").ChainedStruct;
const PresentMode = @import("types.zig").PresentMode; const PresentMode = @import("types.zig").PresentMode;
const Texture = @import("texture.zig").Texture; const Texture = @import("texture.zig").Texture;
pub const SwapChain = enum(usize) { pub const SwapChain = *opaque {};
_,
// TODO: verify there is a use case for nullable value of this type. pub const SwapChainDescriptor = extern struct {
pub const none: SwapChain = @intToEnum(SwapChain, 0); next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null,
pub const Descriptor = extern struct { usage: Texture.UsageFlags,
next_in_chain: *const ChainedStruct, format: Texture.Format,
label: ?[*:0]const u8 = null, width: u32,
usage: Texture.UsageFlags, height: u32,
format: Texture.Format, present_mode: PresentMode,
width: u32, implementation: u64,
height: u32,
present_mode: PresentMode,
implementation: u64,
};
}; };