fix: Force double buffer to make sure to have lowest input lag possible #417
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ensure there's only 2 buffers, 1 to draw to the screen and 1 to render current game frame on.
Probably its already using this by default (On most systems triple (or more) buffer is optional), but just to be sure it doesn't hurt to set it explicitly.
In case you are wondering why no single buffer? It doesn't exists while using vsync. The GPU needs atleast 2 buffers, one which the GPU is reading and drawing to your screen and another one that can be used to render your stuff to. Each frame you just swap the frames around, thus why the drawing call is called GL_Swap();