diff options
Diffstat (limited to 'Runtime/Graphics/OpenGL.h')
-rw-r--r-- | Runtime/Graphics/OpenGL.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Runtime/Graphics/OpenGL.h b/Runtime/Graphics/OpenGL.h index dcecb6d..69755e1 100644 --- a/Runtime/Graphics/OpenGL.h +++ b/Runtime/Graphics/OpenGL.h @@ -2,7 +2,23 @@ #define OPENGL_H #include "glad/glad.h" +#include <string> +#include <exception> //http://docs.gl/gl3/glClear +#define CheckGLError(action)\ +if(true){ \ + GLenum error; \ + while ((error = glGetError()) != GL_NO_ERROR) { \ + action \ + } \ +} + +class GLException : std::exception +{ +}; + +extern std::string g_sharedGLErrorMsg; + #endif |