faiface / pixel

A hand-crafted 2D game library in Go
MIT License
4.46k stars 246 forks source link

expose glfw.WaitEvent using Window.WaitInput #243

Closed andrebq closed 4 years ago

andrebq commented 4 years ago

By using glfw.WaitEvent/WaitEventTimeout CPU time falls drastically (at the cost of less FPS). As the UI will be updated only when the OS notices that an event should be dispatched.

With this change users of pixel can choose between high FPS (window.UpdateInput) vs low FPS (window.WaitInput).

delp commented 4 years ago

Cool idea!

Would you mind updating CHANGELOG.MD as well in your PR?