Make use of some globals to stop typing engine everywhere.
This commit is contained in:
20
src/AppContext.zig
Normal file
20
src/AppContext.zig
Normal file
@@ -0,0 +1,20 @@
|
||||
const AppContext = @This();
|
||||
const std = @import("std");
|
||||
|
||||
const glfw = @import("zglfw");
|
||||
|
||||
const Atoms = @import("engine/Atoms.zig");
|
||||
const Engine = @import("engine/Engine.zig");
|
||||
const Swapchain = @import("engine/Swapchain.zig");
|
||||
const VkAllocator = @import("engine/VkAllocator.zig");
|
||||
|
||||
pub var allocator_general: std.mem.Allocator = undefined;
|
||||
pub var allocator_frame: std.mem.Allocator = undefined;
|
||||
pub var allocator_persistent: std.mem.Allocator = undefined;
|
||||
pub var io: std.Io = undefined;
|
||||
pub var vk_allocator: *VkAllocator = undefined;
|
||||
|
||||
pub var window: *glfw.Window = undefined;
|
||||
pub var atoms: *Atoms = undefined;
|
||||
pub var engine: *Engine = undefined;
|
||||
pub var swapchain: *Swapchain = undefined;
|
||||
Reference in New Issue
Block a user