SimpleGL  1.1.0
A framework for platform independent rendering
glfw_general.cpp
Go to the documentation of this file.
1 
9 
10 #include <GLFW/glfw3.h>
11 
12 namespace sgl {
13 
14  GLFW::GLFW(void) {
15  /* Nothing to do here */
16  }
17 
19  ErrorCallback::setCurrent(callback);
20  glfwSetErrorCallback(ErrorCallback::dispatch);
21  };
22 
24  glfwPollEvents();
25  }
26 
27  void GLFW::terminate() {
28  glfwTerminate();
29  }
30 }
static void dispatch(int error, const char *description)
Dispatches the member function.
This class wraps a GLFW error callback.
Generic namespace for the SimpleGL framework.
Definition: application.hpp:18
static void setErrorCallback(ErrorCallback *callback)
Set the error callback.
static void setCurrent(ErrorCallback *callback)
Sets the current error callback.
static void terminate()
Terminates GLFW, this should only be called at the end of the application.
static void pollEvents()
Polls the events and calls the registered callbacks.