From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/GfxDevice/opengles20/AssertGLES20.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Runtime/GfxDevice/opengles20/AssertGLES20.h (limited to 'Runtime/GfxDevice/opengles20/AssertGLES20.h') 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 -- cgit v1.1-26-g67d0