diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/GfxDevice/opengles20/AssertGLES20.h |
Diffstat (limited to 'Runtime/GfxDevice/opengles20/AssertGLES20.h')
-rw-r--r-- | Runtime/GfxDevice/opengles20/AssertGLES20.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Runtime/GfxDevice/opengles20/AssertGLES20.h b/Runtime/GfxDevice/opengles20/AssertGLES20.h new file mode 100644 index 0000000..4a9809c --- /dev/null +++ b/Runtime/GfxDevice/opengles20/AssertGLES20.h @@ -0,0 +1,29 @@ +#ifndef GLES_ASSERTGLES20_H +#define GLES_ASSERTGLES20_H + +#include "Runtime/Utilities/LogAssert.h" + +void CheckOpenGLES2Error (const char *prefix, const char* file, long line); + +#if !UNITY_RELEASE + #ifndef GLESAssert + /// Asserts for checking the OpenGL error state + #define GLESAssert() { CheckOpenGLES2Error (NULL, __FILE__, __LINE__); } + #endif + #define GLESAssertString(x) { CheckOpenGLES2Error (x, __FILE__, __LINE__); } + #define GLES_CHK(x) do { {x;} GLESAssert(); } while(0) +#else + + #ifndef GLESAssert + #define GLESAssert() + #endif + #define GLESAssertString(x) + #define GLES_CHK(x) x +#endif + + +//#define GLES_CHK(x) do {} while(0) +//#define GLES_CHK(x) +//#define GLES_CHK(x) do { printf_console("GLES: %s %d\n", __FILE__, __LINE__); } while(0) + +#endif |