wip polymorphic modules

This commit is contained in:
David Allemang
2024-07-10 17:27:40 -04:00
parent 53cbe35a97
commit 0efc931006
8 changed files with 208 additions and 219 deletions

View File

@@ -23,30 +23,32 @@ pub const nu_options: nu.Options = .{
pub const nu_driver = nu.Window;
pub const nu_modules = .{
App,
nu.ImGui,
nu.Render,
nu.ImGui,
App,
};
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.detectLeaks();
const alloc = gpa.allocator();
pub const main = nu.main;
nu.init(alloc);
defer nu.deinit();
try nu.Window.init(alloc);
defer nu.Window.deinit();
try nu.Render.init(alloc);
defer nu.Render.deinit();
try nu.ImGui.init(alloc);
defer nu.ImGui.deinit();
try App.init(alloc);
defer App.deinit();
try nu.run(alloc);
}
// pub fn main() !void {
// var gpa = std.heap.GeneralPurposeAllocator(.{}){};
// defer _ = gpa.detectLeaks();
// const alloc = gpa.allocator();
//
// nu.init(alloc);
// defer nu.deinit();
//
// try nu.Window.init(alloc);
// defer nu.Window.deinit();
//
// try nu.Render.init(alloc);
// defer nu.Render.deinit();
//
// try nu.ImGui.init(alloc);
// defer nu.ImGui.deinit();
//
// try App.init(alloc);
// defer App.deinit();
//
// try nu.run(alloc);
// }