SimpleGL
1.1.0
A framework for platform independent rendering
|
This class wraps a GLFW error callback. More...
#include <glfw_callback.hpp>
Public Member Functions | |
ErrorCallback (void) | |
Creates an error callback. More... | |
~ErrorCallback (void) | |
Destroys an error callback. More... | |
virtual void | invoke (int error, std::string description) |
This function gets called whenever a GLFW error occurs. More... | |
Static Public Member Functions | |
static ErrorCallback * | getCurrent () |
Returns the current error callback. More... | |
static void | setCurrent (ErrorCallback *callback) |
Sets the current error callback. More... | |
static void | dispatch (int error, const char *description) |
Dispatches the member function. More... | |
Static Protected Attributes | |
static ErrorCallback * | current = nullptr |
Stores the current instance of the error callback. More... | |
This class wraps a GLFW error callback.
Definition at line 26 of file glfw_callback.hpp.
sgl::ErrorCallback::ErrorCallback | ( | void | ) |
Creates an error callback.
Definition at line 36 of file glfw_callback.cpp.
sgl::ErrorCallback::~ErrorCallback | ( | void | ) |
Destroys an error callback.
Definition at line 40 of file glfw_callback.cpp.
|
static |
Dispatches the member function.
error | An error code. |
description | A UTF-8 encoded string describing the error. |
Definition at line 29 of file glfw_callback.cpp.
|
static |
Returns the current error callback.
Definition at line 18 of file glfw_callback.cpp.
|
virtual |
This function gets called whenever a GLFW error occurs.
Default implementation of the error callback.
error | An error code. |
description | Description of the error. |
Definition at line 48 of file glfw_callback.cpp.
|
static |
Sets the current error callback.
callback | The error callback to set. |
Definition at line 22 of file glfw_callback.cpp.
|
staticprotected |
Stores the current instance of the error callback.
Definition at line 30 of file glfw_callback.hpp.