cleanup and flush gl lol

stable
Ivory 2024-09-04 12:41:03 -04:00
parent b195b95585
commit fb4b881def
2 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,6 @@ pub fn create() !*Camera {
}
pub fn resize(self: *Camera, width: i32, height: i32) void {
std.debug.print("[Camera:resize] {d} x {d}\n", .{ width, height });
self.window_size_offset_x = @divFloor(width, 2);
self.window_size_offset_y = @divFloor(height, 2);
}

View File

@ -135,6 +135,7 @@ pub fn run() Error!void {
// setup for drawing
c.glClear(c.GL_COLOR_BUFFER_BIT | c.GL_DEPTH_BUFFER_BIT);
current_scene.?.draw();
c.glFlush();
c.glfwSwapBuffers(window);
c.glfwPollEvents();