21 #include "hx3d/graphics/error.hpp" 23 #include "hx3d/graphics/gl.hpp" 24 #include "hx3d/utils/log.hpp" 29 GLenum err = GL_NO_ERROR;
30 while ((err = glGetError()) != GL_NO_ERROR) {
34 msg =
"Invalid enum.";
36 case GL_INVALID_VALUE:
37 msg =
"Invalid value.";
39 case GL_INVALID_OPERATION:
40 msg =
"Invalid operation.";
42 case GL_INVALID_FRAMEBUFFER_OPERATION:
43 msg =
"Invalid framebuffer operation.";
45 case GL_OUT_OF_MEMORY:
46 msg =
"Out of memory";
52 Log.
Error(
"GL Error: %s / File: %s / Line: %d", msg.c_str(), file, line);
void Error(const std::string fmt,...)
Write an error message.
static hx3d::LogImpl Log
Current log implementation.
void checkGLError(const char *file, int line)
Display the last unchecked OpenGL errors.