Skip to content

Extra frame of latency #2

Description

@Rubeer

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions