Merge pull request #79 from mewpull/poll

pixelgl: export UpdateInput
This commit is contained in:
Michal Štrba 2018-01-04 19:32:21 +01:00 committed by GitHub
commit cb5a468ba2
2 changed files with 4 additions and 2 deletions

View File

@ -372,7 +372,9 @@ func (w *Window) initInput() {
})
}
func (w *Window) updateInput() {
// UpdateInput polls window events. Call this function to poll window events
// without swapping buffers. Note that the Update method invokes UpdateInput.
func (w *Window) UpdateInput() {
mainthread.Call(func() {
glfw.PollEvents()
})

View File

@ -192,7 +192,7 @@ func (w *Window) Update() {
w.end()
})
w.updateInput()
w.UpdateInput()
}
// SetClosed sets the closed flag of the Window.