summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-10-02 16:34:31 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-10-02 16:34:31 +0200
commit63e1c6dce35d379e02f3b258c1393520b50197d6 (patch)
treef17618eb0766c48bf686df3673d816f5e16d00d3
parent3c62aa778df82806c94abd9c614c4fc7865127ea (diff)
Disable GLES2 debugging on iOS, fixes build
Could be readded by someone who knows how to access an API similar to EGL on iOS.
-rw-r--r--drivers/gles2/rasterizer_gles2.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp
index 3fa31c32c4..5f4b5428e8 100644
--- a/drivers/gles2/rasterizer_gles2.cpp
+++ b/drivers/gles2/rasterizer_gles2.cpp
@@ -64,14 +64,14 @@
#define GLAPIENTRY
#endif
-#ifndef GLES_OVER_GL
+#if !defined(GLES_OVER_GL) && !defined(IPHONE_ENABLED)
+// Used for debugging on mobile, but not iOS as EGL is not available
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <GLES2/gl2platform.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
-
#endif
static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const GLvoid *userParam) {
@@ -189,7 +189,7 @@ Error RasterizerGLES2::is_viable() {
return ERR_UNAVAILABLE;
}
}
-#endif
+#endif // GLES_OVER_GL
#endif // GLAD_ENABLED
@@ -228,6 +228,7 @@ void RasterizerGLES2::initialize() {
*/
}
#else
+#ifndef IPHONE_ENABLED
if (OS::get_singleton()->is_stdout_verbose()) {
DebugMessageCallbackARB callback = (DebugMessageCallbackARB)eglGetProcAddress("glDebugMessageCallback");
if (!callback) {
@@ -242,8 +243,8 @@ void RasterizerGLES2::initialize() {
glEnable(_EXT_DEBUG_OUTPUT);
}
}
-
-#endif
+#endif // !IPHONE_ENABLED
+#endif // GLES_OVER_GL
const GLubyte *renderer = glGetString(GL_RENDERER);
print_line("OpenGL ES 2.0 Renderer: " + String((const char *)renderer));