Globalize textures, materials and gui
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
//! 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 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;
|
||||
@@ -13,8 +22,13 @@ 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 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 gui: *Gui = undefined;
|
||||
|
||||
Reference in New Issue
Block a user