38 lines
1.3 KiB
Zig
38 lines
1.3 KiB
Zig
//! This module contains some common global variables, which mostly refer to
|
|
//! singleton modules that are active throughout entire program's runtime.
|
|
//!
|
|
//! These globals can be safely referenced during and after game initialization.
|
|
|
|
const AppContext = @This();
|
|
const std = @import("std");
|
|
|
|
const media = @import("media");
|
|
const glfw = @import("zglfw");
|
|
|
|
const Atoms = @import("engine/Atoms.zig");
|
|
const Fonts = @import("engine/Fonts.zig");
|
|
const Engine = @import("engine/Engine.zig");
|
|
const Gui = @import("engine/Gui.zig");
|
|
const Materials = @import("engine/Materials.zig");
|
|
const Swapchain = @import("engine/Swapchain.zig");
|
|
const Textures = @import("engine/Textures.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 stbi: *media.stbi = undefined;
|
|
pub var stbtt: *media.stbtt = undefined;
|
|
|
|
pub var window: *glfw.Window = undefined;
|
|
pub var atoms: *Atoms = undefined;
|
|
pub var engine: *Engine = undefined;
|
|
pub var swapchain: *Swapchain = undefined;
|
|
|
|
pub var textures: *Textures = undefined;
|
|
pub var materials: *Materials = undefined;
|
|
pub var fonts: *Fonts = undefined;
|
|
pub var gui: *Gui = undefined;
|