forked from vv/efemra
1
0
Fork 0
efemra/src/main.zig

36 lines
782 B
Zig

const std = @import("std");
const glfw = @import("glfw");
const vk = @import("vulkan");
const resources = @import("resources");
const Renderer = @import("rendering/Renderer.zig");
const ProfileMark = @import("common/profiler.zig").ProfileMark;
const ui = @import("ui/ui.zig");
const editor = @import("editor/editor.zig");
const app_name = "efemra";
pub fn main() !void {
try glfw.init(.{});
defer glfw.terminate();
try Renderer.init();
defer Renderer.deinit();
while (!Renderer.shouldClose()) {
onGui();
try Renderer.update();
try glfw.pollEvents();
}
}
const pm_gui = ProfileMark.init("onGui");
fn onGui() void {
pm_gui.begin();
defer pm_gui.end();
ui.beginFrame();
defer ui.endFrame();
editor.update();
}