Created
October 11, 2013 05:17
-
-
Save arajkumar/6929912 to your computer and use it in GitHub Desktop.
Fix for GLES2 compilation error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Source/WebCore/platform/graphics/OpenGLESShims.h b/Source/WebCore/platform/graphics/OpenGLESShims.h | |
index b495814..9683042 100644 | |
--- a/Source/WebCore/platform/graphics/OpenGLESShims.h | |
+++ b/Source/WebCore/platform/graphics/OpenGLESShims.h | |
@@ -44,8 +44,12 @@ | |
#define glIsRenderbufferEXT glIsRenderbuffer | |
#define glIsFramebufferEXT glIsFramebuffer | |
#define glGenerateMipmapEXT glGenerateMipmap | |
+#ifndef GL_COLOR_ATTACHMENT0_EXT | |
#define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0 | |
+#endif | |
+#ifndef GL_DEPTH_ATTACHMENT_EXT | |
#define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT | |
+#endif | |
#define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE | |
#define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER | |
#define GL_DEPTH24_STENCIL8_EXT GL_DEPTH24_STENCIL8_OES | |
diff --git a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp | |
index 174289b..786a323 100644 | |
--- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp | |
+++ b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp | |
@@ -37,9 +37,9 @@ | |
#endif | |
#if USE(OPENGL_ES_2) | |
-#include "OpenGLESShims.h" | |
#include <GLES2/gl2.h> | |
#include <GLES2/gl2ext.h> | |
+#include "OpenGLESShims.h" | |
#elif PLATFORM(MAC) | |
#include <OpenGL/gl.h> | |
#elif PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN) || PLATFORM(NIX) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment