Even when you have no windows, event polling needs to be done in order to receive monitor and joystick connection events. Event processing is normally done each frame after buffer swapping. GLFW needs to poll the window system for events both to provide input to the application and to prove to the window system that the application hasn't locked up. It register every callback supported by GLFW and prints out all arguments provided for every event, along with time and sequence information. To get a better feel for how the various events callbacks behave, run the events test program. By using the window user pointer, you can access non-global structures or objects from your callbacks. Callbacks are more work to use than polling but is less CPU intensive and guarantees that you do not miss state changes.Īll input callbacks receive a window handle. While some can only be polled, like time, or only received via callbacks, like scrolling, many provide both callbacks and polling. There are also guides for the other areas of GLFW. For details on a specific function in this category, see the Input reference. This guide introduces the input related functions of GLFW.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |