diff --git a/cocos/platform/winrt/CCGL.h b/cocos/platform/winrt/CCGL.h index 91f91495d5..2b39255fed 100644 --- a/cocos/platform/winrt/CCGL.h +++ b/cocos/platform/winrt/CCGL.h @@ -26,6 +26,25 @@ THE SOFTWARE. #ifndef __CCGL_H__ #define __CCGL_H__ +#define GL_BGRA GL_BGRA_EXT +#define glClearDepth glClearDepthf +#define GL_WRITE_ONLY GL_WRITE_ONLY_OES + +#if CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && !defined(WP8_SHADER_COMPILER) +#include "EGL/egl.h" +#include "EGL/eglext.h" +#include "EGL/eglplatform.h" +#include "GLES2/gl2.h" +#include "GLES2/gl2ext.h" +#include "GLES3/gl3.h" +#include "GLES3/gl3ext.h" + +#define glMapBuffer glMapBufferOES + +#else #include "CCGL_Angle.h" +#endif + + #endif // __CCGL_H__ diff --git a/cocos/platform/winrt/CCGL_Angle.h b/cocos/platform/winrt/CCGL_Angle.h index 888eaeb930..04c8e88cd4 100644 --- a/cocos/platform/winrt/CCGL_Angle.h +++ b/cocos/platform/winrt/CCGL_Angle.h @@ -37,16 +37,13 @@ THE SOFTWARE. #include "GLES2/gl2ext.h" #include "winrtangle.h" #include "esUtil.h" -#include "ccMacros.h" +#include "base/ccMacros.h" #define GL_WRITE_ONLY_OES 0x88B9 #define GL_BUFFER_ACCESS_OES 0x88BB #define GL_BUFFER_MAPPED_OES 0x88BC #define GL_BUFFER_MAP_POINTER_OES 0x88BD -#define GL_BGRA GL_BGRA_EXT - -#define glClearDepth glClearDepthf inline void glGenVertexArrays(GLsizei n, GLuint *arrays) @@ -77,6 +74,5 @@ inline GLboolean glUnmapBuffer(GLenum targets) } #define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES -#define GL_WRITE_ONLY GL_WRITE_ONLY_OES #endif // __CCGL_ANGLE_H__