From 584e976d916b6405452e40253848f1b752344c50 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Fri, 7 Jun 2024 19:12:35 -0700 Subject: Format. --- gfx/src/core/gl_util.h | 56 ++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/gfx/src/core/gl_util.h b/gfx/src/core/gl_util.h index a3cc629..d2d6e22 100644 --- a/gfx/src/core/gl_util.h +++ b/gfx/src/core/gl_util.h @@ -3,8 +3,6 @@ #include #include -#include - #define GFX_GL_CONTEXT_PC 1 #define GFX_GL_CONTEXT_ES 2 @@ -14,33 +12,33 @@ /// Log an error if an OpenGL has occurred. #ifndef NDEBUG -#define ASSERT_GL \ - { \ - GLenum e = glGetError(); \ - switch (e) { \ - case GL_NO_ERROR: \ - break; \ - case GL_INVALID_ENUM: \ - LOGE("GL_INVALID_ENUM"); \ - break; \ - case GL_INVALID_VALUE: \ - LOGE("GL_INVALID_VALUE"); \ - break; \ - case GL_INVALID_OPERATION: \ - LOGE("GL_INVALID_OPERATION"); \ - break; \ - case GL_INVALID_FRAMEBUFFER_OPERATION: \ - LOGE("GL_INVALID_FRAMEBUFFER_OPERATION"); \ - break; \ - case GL_OUT_OF_MEMORY: \ - LOGE("GL_OUT_OF_MEMORY"); \ - break; \ - /*case GL_STACK_UNDERFLOW: LOGE("GL_STACK_UNDERFLOW");*/ \ - /*case GL_STACK_OVERFLOW: LOGE("GL_STACK_OVERFLOW");*/ \ - default: \ - LOGE("Unknown OpenGL error"); \ - break; \ - } \ +#define ASSERT_GL \ + { \ + GLenum e = glGetError(); \ + switch (e) { \ + case GL_NO_ERROR: \ + break; \ + case GL_INVALID_ENUM: \ + LOGE("GL_INVALID_ENUM"); \ + break; \ + case GL_INVALID_VALUE: \ + LOGE("GL_INVALID_VALUE"); \ + break; \ + case GL_INVALID_OPERATION: \ + LOGE("GL_INVALID_OPERATION"); \ + break; \ + case GL_INVALID_FRAMEBUFFER_OPERATION: \ + LOGE("GL_INVALID_FRAMEBUFFER_OPERATION"); \ + break; \ + case GL_OUT_OF_MEMORY: \ + LOGE("GL_OUT_OF_MEMORY"); \ + break; \ + /*case GL_STACK_UNDERFLOW: LOGE("GL_STACK_UNDERFLOW");*/ \ + /*case GL_STACK_OVERFLOW: LOGE("GL_STACK_OVERFLOW");*/ \ + default: \ + LOGE("Unknown OpenGL error"); \ + break; \ + } \ } #else // Not NDEBUG. #define ASSERT_GL -- cgit v1.2.3