#define _EGLIMPORTS_HPP_
-// OpenGL
-#ifndef __gl_h_
+#include <KHR/khrplatform.h>
-// Prevent including system's glext.h
-#define __glext_h_
+#ifdef _GDI32_
+/* Prevent __declspec(dllimport) attribute */
+#undef KHRONOS_APICALL
+#define KHRONOS_APICALL
+#endif
-#include <GL/gl.h>
+// EGL
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+/* Prevent collision with Trace::Bool */
+#undef Bool
+
+
+// OpenGL ES
+#include <GLES/glplatform.h>
+#include <GLES2/gl2platform.h>
-// Include our own glext.h
-#undef __glext_h_
-#include "glext/glext.h"
-#ifndef GL_TEXTURE_INDEX_SIZE_EXT
-#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
+// OpenGL ES 1.1
+typedef int32_t GLfixed;
+typedef int32_t GLclampx;
+
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_PALETTE4_RGB8_OES 0x8B90
+#define GL_PALETTE4_RGBA8_OES 0x8B91
+#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
+#define GL_PALETTE4_RGBA4_OES 0x8B93
+#define GL_PALETTE4_RGB5_A1_OES 0x8B94
+#define GL_PALETTE8_RGB8_OES 0x8B95
+#define GL_PALETTE8_RGBA8_OES 0x8B96
+#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
+#define GL_PALETTE8_RGBA4_OES 0x8B98
+#define GL_PALETTE8_RGB5_A1_OES 0x8B99
#endif
-#endif /* __gl_h_ */
+#ifndef GL_OES_point_size_array
+#define GL_POINT_SIZE_ARRAY_OES 0x8B9C
+#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A
+#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B
+#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C
+#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F
+#endif
+// avoid conflict with GL_EXT_framebuffer_multisample
+#define GL_EXT_multisampled_render_to_texture
-#ifdef HAVE_EGL
+#undef __glext_h_
+#include "GLES/glext.h"
-// EGL
-#include "EGL/egl.h"
-#include "EGL/eglext.h"
-/* Prevent collision with Trace::Bool */
-#undef Bool
-#endif /* HAVE_EGL */
+// OpenGL ES 2.0
+
+// avoid conflicting with GL_NV_multisample_coverage
+#define GL_NV_coverage_sample
+#include "GLES2/gl2ext.h"
#endif /* _EGLIMPORTS_HPP_ */