pixel/pixelgl: export UpdateInput

This change mirrors the change done in the master branch
(see #78) for users of gl2.1, to provide access to polling
of events without rendering the screen.

Updates #26.
This commit is contained in:
mewmew 2018-03-24 19:19:56 +01:00
parent f80edafc7b
commit 5c98b446fd
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

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