summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorluccie-cmd <luccie@sideros.org>2025-03-16 23:02:01 +0100
committerLorenzo Torres <torres@sideros.org>2025-03-16 23:21:44 +0100
commit48796a0fa3c06143ba3d8c427f582cb7e78814a9 (patch)
treef90ccb6c9739e9fc1d60c377b78734356561b7e1 /src/main.zig
parentfee8a08bdf54d5af9d3e352b3844840ee71c4a29 (diff)
Added checking if our extensions are supported and make Renderer.destroy() not return an error
Signed-off-by: luccie-cmd <luccie@sideros.org>
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main.zig b/src/main.zig
index 457bcef..321f0f0 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -24,19 +24,17 @@ pub fn main() !void {
//var parameters = [_]usize{};
//try runtime.callExternal(allocator, "fibonacci", &parameters);
-
const w = try window.Window.create(800, 600, "sideros");
defer w.destroy();
- // TODO: Renderer.destroy should not return an error?
+ // TODO(luccie-cmd): Renderer.create shouldn't return an error
var r = try Renderer.create(allocator, w);
- defer r.destroy() catch {};
+ defer r.destroy();
while (!w.shouldClose()) {
c.glfwPollEvents();
try r.tick();
}
- try r.device.waitIdle();
}
if (gpa.detectLeaks()) {