fix poll events for window module
This commit is contained in:
parent
ff84d6ac53
commit
64c9d32905
2 changed files with 5 additions and 0 deletions
|
|
@ -63,6 +63,7 @@ pub fn main() !void {
|
||||||
});
|
});
|
||||||
|
|
||||||
while (!w.shouldClose()) {
|
while (!w.shouldClose()) {
|
||||||
|
Renderer.Window.pollEvents();
|
||||||
try r.tick();
|
try r.tick();
|
||||||
pool.tick();
|
pool.tick();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
pub fn shouldClose(self: Window) bool {
|
||||||
return c.glfwWindowShouldClose(self.raw) == c.GLFW_TRUE;
|
return c.glfwWindowShouldClose(self.raw) == c.GLFW_TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue