Hello, cool project! Here's something that caught my eye:
https://github.com/Loonride/cppcraft/blob/28d1796499492f8a0eeaff5d31bebc70d73a978a/src/main.cpp#L170
If I'm correct, then the current ordering of getting input, updating the camera and rendering might incur an extra frame of input latency (especially if vsync is enabled). Not really a problem when it runs at 1000 fps, but it could be worth looking at.
I think the order should be:
poll events -> controller update -> camera update -> render -> swap buffers
Hello, cool project! Here's something that caught my eye:
https://github.com/Loonride/cppcraft/blob/28d1796499492f8a0eeaff5d31bebc70d73a978a/src/main.cpp#L170
If I'm correct, then the current ordering of getting input, updating the camera and rendering might incur an extra frame of input latency (especially if vsync is enabled). Not really a problem when it runs at 1000 fps, but it could be worth looking at.
I think the order should be:
poll events -> controller update -> camera update -> render -> swap buffers