blob: 7693012dc311137b8d16aec7990ba196a09d398b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef GLASSERT_H
#define GLASSERT_H
#include "Runtime/Utilities/LogAssert.h"
void CheckOpenGLError (const char *prefix, const char* file, long line);
#if !UNITY_RELEASE
#ifndef GLAssert
/// Asserts for checking the OpenGL error state
#define GLAssert() { CheckOpenGLError (NULL, __FILE__, __LINE__); }
#endif
#define GLAssertString(x) { CheckOpenGLError (x, __FILE__, __LINE__); }
#define GL_CHK(x) do { {x;} GLAssert(); } while(0)
#else
#ifndef GLAssert
#define GLAssert()
#endif
#define GLAssertString(x)
#define GL_CHK(x) x
#endif
#endif
|