glfwPollEvents

Processes all pending events.

This function processes only those events that are already in the event queue and then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.

On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the window refresh callback to redraw the contents of your window when necessary during such operations.

Do not assume that callbacks you set will _only_ be called in response to event processing functions like this one. While it is necessary to poll for events, window systems that require GLFW to register callbacks of its own can pass events to GLFW in response to many window system function calls. GLFW will pass those events on to the application callbacks before returning.

Event processing is not required for joystick input to work.

Errors: Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_PLATFORM_ERROR.

@reentrancy This function must not be called from a callback.

More...
extern (C) @nogc nothrow __gshared
void
glfwPollEvents
()

Detailed Description

Thread Safety

This function must only be called from the main thread.

@sa @ref events @sa @ref glfwWaitEvents @sa @ref glfwWaitEventsTimeout

Meta

Since

Added in version 1.0.

Ingroup: window