diff options
author | Mike Morris <mikemorris@users.noreply.github.com> | 2016-08-24 14:39:15 -0400 |
---|---|---|
committer | Mike Morris <mikemorris@users.noreply.github.com> | 2016-09-21 10:33:40 -0400 |
commit | 658354ced1c90ee794dabb128d0861827639bd50 (patch) | |
tree | d37da1dec4e6957edd63b2d2e6a5407f230ec41e /src/mbgl/gl | |
parent | eb97dbe383ca7697feab5860995b97181c39c607 (diff) | |
download | qtlocation-mapboxgl-658354ced1c90ee794dabb128d0861827639bd50.tar.gz |
[core] add GL_CONTEXT_LOST case to checkError
and reorder according to hex value
https://www.opengl.org/wiki/OpenGL_Error#Testing_for_errors
Diffstat (limited to 'src/mbgl/gl')
-rw-r--r-- | src/mbgl/gl/gl.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mbgl/gl/gl.cpp b/src/mbgl/gl/gl.cpp index 309785140f..463d2e5654 100644 --- a/src/mbgl/gl/gl.cpp +++ b/src/mbgl/gl/gl.cpp @@ -69,13 +69,16 @@ void checkError(const char *cmd, const char *file, int line) { case GL_INVALID_ENUM: error = "INVALID_ENUM"; break; case GL_INVALID_VALUE: error = "INVALID_VALUE"; break; case GL_INVALID_OPERATION: error = "INVALID_OPERATION"; break; - case GL_INVALID_FRAMEBUFFER_OPERATION: error = "INVALID_FRAMEBUFFER_OPERATION"; break; - case GL_OUT_OF_MEMORY: error = "OUT_OF_MEMORY"; break; +#ifdef GL_STACK_OVERFLOW + case GL_STACK_OVERFLOW: error = "STACK_OVERFLOW"; break; +#endif #ifdef GL_STACK_UNDERFLOW case GL_STACK_UNDERFLOW: error = "STACK_UNDERFLOW"; break; #endif -#ifdef GL_STACK_OVERFLOW - case GL_STACK_OVERFLOW: error = "STACK_OVERFLOW"; break; + case GL_OUT_OF_MEMORY: error = "OUT_OF_MEMORY"; break; + case GL_INVALID_FRAMEBUFFER_OPERATION: error = "INVALID_FRAMEBUFFER_OPERATION"; break; +#ifdef GL_CONTEXT_LOST + case GL_CONTEXT_LOST: error = "CONTEXT_LOST"; break; #endif default: error = "(unknown)"; break; } |