gpu: make SwapChain an enum with methods
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
94ca8ffe35
commit
2a65690ffc
3 changed files with 7 additions and 3 deletions
|
|
@ -1 +0,0 @@
|
||||||
ptr: *anyopaque,
|
|
||||||
|
|
@ -30,7 +30,7 @@ pub const RenderPipeline = @import("render_pipeline.zig").RenderPipeline;
|
||||||
pub const Sampler = @import("sampler.zig").Sampler;
|
pub const Sampler = @import("sampler.zig").Sampler;
|
||||||
pub const ShaderModule = @import("shader_module.zig").ShaderModule;
|
pub const ShaderModule = @import("shader_module.zig").ShaderModule;
|
||||||
pub const Surface = @import("surface.zig").Surface;
|
pub const Surface = @import("surface.zig").Surface;
|
||||||
pub const SwapChain = @import("SwapChain.zig");
|
pub const SwapChain = @import("swap_chain.zig").SwapChain;
|
||||||
pub const Texture = @import("Texture.zig");
|
pub const Texture = @import("Texture.zig");
|
||||||
pub const TextureView = @import("TextureView.zig");
|
pub const TextureView = @import("TextureView.zig");
|
||||||
|
|
||||||
|
|
@ -58,7 +58,7 @@ test {
|
||||||
refAllDecls(@import("sampler.zig"));
|
refAllDecls(@import("sampler.zig"));
|
||||||
refAllDecls(@import("shader_module.zig"));
|
refAllDecls(@import("shader_module.zig"));
|
||||||
refAllDecls(@import("surface.zig"));
|
refAllDecls(@import("surface.zig"));
|
||||||
refAllDecls(@import("SwapChain.zig"));
|
refAllDecls(@import("swap_chain.zig"));
|
||||||
refAllDecls(@import("Texture.zig"));
|
refAllDecls(@import("Texture.zig"));
|
||||||
refAllDecls(@import("TextureView.zig"));
|
refAllDecls(@import("TextureView.zig"));
|
||||||
refAllDecls(@import("types.zig"));
|
refAllDecls(@import("types.zig"));
|
||||||
|
|
|
||||||
5
gpu/src/swap_chain.zig
Normal file
5
gpu/src/swap_chain.zig
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
pub const SwapChain = enum(usize) {
|
||||||
|
_,
|
||||||
|
|
||||||
|
pub const none: SwapChain = @intToEnum(SwapChain, 0);
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue