1
0
Fork 0
forked from vv/efemra
efemra/src/main.zig
2022-07-27 03:10:22 -07:00

35 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();
}