Backlog/projects/minimal/src/main.zig

38 lines
826 B
Zig

pub var NeonObjectTable = core.EngineObjectVTable.from(@This(), "main");
allocator: std.mem.Allocator,
pub fn init(allocator: std.mem.Allocator) !*@This() {
const self = try allocator.create(@This());
self.* = .{
.allocator = allocator,
};
return self;
}
pub fn prepare(self: *@This()) !void {
_ = self;
core.engine_log("program ready", .{});
}
pub fn tick(self: *@This(), dt: f64) void {
_ = self;
_ = dt;
ig.showDemoWindow(null);
}
pub fn deinit(self: *@This()) void {
self.allocator.destroy(self);
}
pub fn main() anyerror!void {
var spec = try api.getSpec("minimal");
_ = api.startEngine(&NeonObjectTable, &spec);
}
const std = @import("std");
const api = @import("backlog");
// const bl = @import("Backlog");
const ig = api.imgui.api;
const core = api.core;