Initial metal abstraction (noop)

This commit is contained in:
Mitchell Hashimoto
2022-10-28 14:48:36 -07:00
parent 19f003d7d0
commit 07271a6cfd
4 changed files with 101 additions and 21 deletions

View File

@@ -7,11 +7,21 @@
//! APIs. The renderers in this package assume that the renderer is already
//! setup (OpenGL has a context, Vulkan has a surface, etc.)
const builtin = @import("builtin");
pub usingnamespace @import("renderer/size.zig");
pub const Metal = @import("renderer/Metal.zig");
pub const OpenGL = @import("renderer/OpenGL.zig");
pub const Thread = @import("renderer/Thread.zig");
pub const State = @import("renderer/State.zig");
/// The implementation to use for the renderer. This is comptime chosen
/// so that every build has exactly one renderer implementation.
pub const Renderer = switch (builtin.os.tag) {
.macos => Metal,
else => OpenGL,
};
test {
@import("std").testing.refAllDecls(@This());
}