fix poll events for window module

This commit is contained in:
Lorenzo Torres 2025-03-28 16:01:30 +01:00
parent ff84d6ac53
commit 64c9d32905
2 changed files with 5 additions and 0 deletions

View file

@ -63,6 +63,7 @@ pub fn main() !void {
});
while (!w.shouldClose()) {
Renderer.Window.pollEvents();
try r.tick();
pool.tick();
}

View file

@ -45,6 +45,10 @@ pub fn create(width: usize, height: usize, title: []const u8) !Window {
};
}
pub fn pollEvents() void {
c.glfwPollEvents();
}
pub fn shouldClose(self: Window) bool {
return c.glfwWindowShouldClose(self.raw) == c.GLFW_TRUE;
}