wip polymorphic modules
This commit is contained in:
48
src/main.zig
48
src/main.zig
@@ -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);
|
||||
// }
|
||||
|
Reference in New Issue
Block a user