Exemple #1
0
// PollEvents is used for polling for events, such as user input and window
// resize events. Upon calling this function, all window states, keyboard states
// and mouse states are updated. If any related callback functions are
// registered, these are called during the call to glfw.PollEvents.
//
// Note: glfw.PollEvents is called implicitly from glfw.SwapBuffers if
// glfw.AutoPollEvents is enabled (as it is by default). Thus, if glfw.SwapBuffers
// is called frequently, which is normally the case, there is no need to call
// glfw.PollEvents.
func PollEvents() { C.glfwPollEvents() }
Exemple #2
0
// PollEvents processes only those events that have already been received and
// then returns immediately. Processing events will cause the window and input
// callbacks associated with those events to be called.
//
// This function is not required for joystick input to work.
//
// This function may not be called from a callback.
//
// This function may only be called from the main thread.
func PollEvents() {
	C.glfwPollEvents()
	panicError()
}