openframeworks/openFrameworks — pull request #3240 by arturoc (2014-09-16 11:43:14+00:00)
Title: ofAppGLFWWindow: add polling types

related to https://github.com/openframeworks/openFrameworks/issues/3214

adds polling modes when using glfw:

```cpp
ofAppGLFWWindow::setEventsPolling(ofAppGLFWWindow::Poll);
ofAppGLFWWindow::setEventsPolling(ofAppGLFWWindow::Wait);
ofAppGLFWWindow::setEventsPolling(ofAppGLFWWindow::Threaded);
```

- Poll is what we had till now and still the default.
- Wait, calls glfwWaitEvents() instead of glfwPollEvents() which can be useful for applications that only need to redraw when there's any events.
- Threaded calls glfwWaitEvents() in a different thread and should have the lowest possible latency but will require locking in certain situations, this can be useful for example for sound applications where polling on the gl thread means about 16ms latency and will happen on a different thread than the sound so would require locking anyway.

the functions are static instead of per window cause the events are global so once we have multi window it won't make sense to call this on a particular window