gpu: make TextureView an enum with methods
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
05f153009d
commit
9f77103cae
3 changed files with 17 additions and 13 deletions
|
|
@ -1,11 +0,0 @@
|
||||||
ptr: *anyopaque,
|
|
||||||
|
|
||||||
pub const Dimension = enum(u32) {
|
|
||||||
dimension_undef = 0x00000000,
|
|
||||||
dimension_1d = 0x00000001,
|
|
||||||
dimension_2d = 0x00000002,
|
|
||||||
dimension_2d_array = 0x00000003,
|
|
||||||
dimension_cube = 0x00000004,
|
|
||||||
dimension_cube_array = 0x00000005,
|
|
||||||
dimension_3d = 0x00000006,
|
|
||||||
};
|
|
||||||
|
|
@ -32,7 +32,7 @@ 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("swap_chain.zig").SwapChain;
|
pub const SwapChain = @import("swap_chain.zig").SwapChain;
|
||||||
pub const Texture = @import("texture.zig").Texture;
|
pub const Texture = @import("texture.zig").Texture;
|
||||||
pub const TextureView = @import("TextureView.zig");
|
pub const TextureView = @import("texture_view.zig").TextureView;
|
||||||
|
|
||||||
pub const AlphaMode = @import("types.zig").AlphaMode;
|
pub const AlphaMode = @import("types.zig").AlphaMode;
|
||||||
|
|
||||||
|
|
@ -60,7 +60,7 @@ test {
|
||||||
refAllDecls(@import("surface.zig"));
|
refAllDecls(@import("surface.zig"));
|
||||||
refAllDecls(@import("swap_chain.zig"));
|
refAllDecls(@import("swap_chain.zig"));
|
||||||
refAllDecls(@import("texture.zig"));
|
refAllDecls(@import("texture.zig"));
|
||||||
refAllDecls(@import("TextureView.zig"));
|
refAllDecls(@import("texture_view.zig"));
|
||||||
refAllDecls(@import("types.zig"));
|
refAllDecls(@import("types.zig"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
15
gpu/src/texture_view.zig
Normal file
15
gpu/src/texture_view.zig
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
pub const TextureView = enum(usize) {
|
||||||
|
_,
|
||||||
|
|
||||||
|
pub const none: TextureView = @intToEnum(TextureView, 0);
|
||||||
|
|
||||||
|
pub const Dimension = enum(u32) {
|
||||||
|
dimension_undef = 0x00000000,
|
||||||
|
dimension_1d = 0x00000001,
|
||||||
|
dimension_2d = 0x00000002,
|
||||||
|
dimension_2d_array = 0x00000003,
|
||||||
|
dimension_cube = 0x00000004,
|
||||||
|
dimension_cube_array = 0x00000005,
|
||||||
|
dimension_3d = 0x00000006,
|
||||||
|
};
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue