1 #pragma once
2 
3 #include <string>
4 #include <cstdint>
5 
6 // Utility to be able to liberally sprinkle GL error checks around your code
7 // and easily disable them all in release builds - just undefine DEBUG_OPENGL.
8 
9 // #define DEBUG_OPENGL
10 
11 #if defined(DEBUG_OPENGL)
12 
13 bool CheckGLError(const char *file, int line);
14 #define CHECK_GL_ERROR_IF_DEBUG() if (!CheckGLError(__FILE__, __LINE__)) __debugbreak();
15 
16 #else
17 
18 #define CHECK_GL_ERROR_IF_DEBUG()
19 
20 #endif
21 
22 std::string GLEnumToString(uint16_t value);
23