Skip to content

Extra frame of latency #2

@Rubeer

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

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