[cogl/wip/rstrode/prepare-for-mutter-merge: 13/13] drop support for GLES



commit f19a275b44d84982828dfac64033e487130c2760
Author: Ray Strode <rstrode redhat com>
Date:   Tue Jan 12 17:35:06 2016 -0500

    drop support for GLES

 Makefile.am                                       |    4 -
 cogl-gles2/GLES2/gl2.h                            |  169 --
 cogl-gles2/GLES2/gl2ext.h                         | 1498 ----------------
 cogl-gles2/GLES2/gl2platform.h                    |   28 -
 cogl-gles2/Makefile.am                            |   36 -
 cogl-gles2/cogl-gles2-1.0.pc.in                   |   13 -
 cogl-gles2/cogl-gles2-2.0-experimental.pc.in      |   13 -
 cogl-gles2/cogl-gles2-api.c                       | 1048 -----------
 cogl-path/tesselator/GL/glu.h                     |   14 -
 cogl/Makefile.am                                  |    9 -
 cogl/cogl-attribute.c                             |    5 -
 cogl/cogl-context-private.h                       |    4 -
 cogl/cogl-context.c                               |   11 +-
 cogl/cogl-context.h                               |    3 -
 cogl/cogl-feature-private.c                       |   14 +-
 cogl/cogl-feature-private.h                       |   10 -
 cogl/cogl-gles2-context-private.h                 |  201 ---
 cogl/cogl-gles2-context.c                         | 1966 ---------------------
 cogl/cogl-gles2-types.h                           |  474 -----
 cogl/cogl-gles2.h                                 |  420 -----
 cogl/cogl-matrix-stack.c                          |    4 +-
 cogl/cogl-pipeline-private.h                      |   39 +-
 cogl/cogl-pipeline-state.c                        |   15 +-
 cogl/cogl-pipeline.c                              |    2 +-
 cogl/cogl-renderer-private.h                      |    5 -
 cogl/cogl-renderer.c                              |   43 +-
 cogl/cogl-renderer.h                              |    9 -
 cogl/cogl-sampler-cache-private.h                 |    8 -
 cogl/cogl-texture-3d.c                            |   20 +-
 cogl/cogl-texture-rectangle.c                     |   11 -
 cogl/cogl-texture.c                               |    5 -
 cogl/cogl1-context.h                              |    2 -
 cogl/deprecated/cogl-program.c                    |    2 -
 cogl/deprecated/cogl-shader.c                     |    2 +-
 cogl/driver/gl/cogl-attribute-gl.c                |    4 +-
 cogl/driver/gl/cogl-buffer-gl.c                   |   43 +-
 cogl/driver/gl/cogl-pipeline-fragend-fixed.c      |   16 -
 cogl/driver/gl/cogl-pipeline-fragend-glsl.c       |   13 +-
 cogl/driver/gl/cogl-pipeline-opengl.c             |  129 +-
 cogl/driver/gl/cogl-texture-2d-gl.c               |    2 +-
 cogl/driver/gl/gles/cogl-driver-gles.c            |  487 -----
 cogl/driver/gl/gles/cogl-texture-driver-gles.c    |  652 -------
 cogl/gl-prototypes/cogl-all-functions.h           |   19 -
 cogl/gl-prototypes/cogl-core-functions.h          |    5 -
 cogl/gl-prototypes/cogl-fixed-functions.h         |    5 -
 cogl/gl-prototypes/cogl-gles1-functions.h         |   43 -
 cogl/gl-prototypes/cogl-gles2-functions.h         |   43 -
 cogl/gl-prototypes/cogl-glsl-functions.h          |    7 -
 cogl/gl-prototypes/cogl-in-gles-core-functions.h  |  148 --
 cogl/gl-prototypes/cogl-in-gles1-core-functions.h |   78 -
 cogl/gl-prototypes/cogl-in-gles2-core-functions.h |  186 --
 cogl/winsys/cogl-winsys-egl.c                     |  107 +--
 cogl/winsys/cogl-winsys-private.h                 |   11 -
 configure.ac                                      |  147 --
 54 files changed, 63 insertions(+), 8189 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 9080fbe..0fe4edb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,10 +10,6 @@ if BUILD_COGL_PANGO
 SUBDIRS += cogl-pango
 endif
 
-if BUILD_COGL_GLES2
-SUBDIRS += cogl-gles2
-endif
-
 SUBDIRS += po build
 
 ACLOCAL_AMFLAGS = -I build/autotools ${ACLOCAL_FLAGS}
diff --git a/cogl-path/tesselator/GL/glu.h b/cogl-path/tesselator/GL/glu.h
index 18c4024..ed978fb 100644
--- a/cogl-path/tesselator/GL/glu.h
+++ b/cogl-path/tesselator/GL/glu.h
@@ -31,17 +31,3 @@
    that the tesselator code can still #include <GL/glu.h> */
 
 #include "../tesselator.h"
-
-/* These aren't defined on GLES and we don't really want the
-   tesselator code to use them but we're also trying to avoid
-   modifying the C files so we just force them to be empty here */
-
-#undef GLAPI
-#define GLAPI
-
-#undef GLAPIENTRY
-#define GLAPIENTRY
-
-/* GLES doesn't define a GLdouble type so lets just force it to a
-   regular double */
-#define GLdouble double
diff --git a/cogl/Makefile.am b/cogl/Makefile.am
index f3a8f86..2d5c397 100644
--- a/cogl/Makefile.am
+++ b/cogl/Makefile.am
@@ -33,8 +33,6 @@ AM_CPPFLAGS += \
        -DG_LOG_DOMAIN=\"Cogl\"         \
        -DCOGL_COMPILATION              \
        -DCOGL_GL_LIBNAME=\"$(COGL_GL_LIBNAME)\" \
-       -DCOGL_GLES1_LIBNAME=\"$(COGL_GLES1_LIBNAME)\" \
-       -DCOGL_GLES2_LIBNAME=\"$(COGL_GLES2_LIBNAME)\" \
        -DCOGL_LOCALEDIR=\""$(localedir)"\" \
        $(NULL)
 
@@ -219,13 +217,6 @@ cogl_driver_sources += \
        $(NULL)
 endif
 
-if COGL_DRIVER_GLES_SUPPORTED
-cogl_driver_sources += \
-       driver/gl/gles/cogl-driver-gles.c \
-       driver/gl/gles/cogl-texture-driver-gles.c       \
-       $(NULL)
-endif
-
 # winsys sources, common to all backends
 cogl_winsys_common_sources = \
        winsys/cogl-winsys-private.h \
diff --git a/cogl/cogl-attribute.c b/cogl/cogl-attribute.c
index bcfbf78..0e41718 100644
--- a/cogl/cogl-attribute.c
+++ b/cogl/cogl-attribute.c
@@ -57,11 +57,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-/* This isn't defined in the GLES headers */
-#ifndef GL_UNSIGNED_INT
-#define GL_UNSIGNED_INT 0x1405
-#endif
-
 static void _cogl_attribute_free (CoglAttribute *attribute);
 
 COGL_OBJECT_DEFINE (Attribute, attribute);
diff --git a/cogl/cogl-context-private.h b/cogl/cogl-context-private.h
index 9e66207..3002749 100644
--- a/cogl/cogl-context-private.h
+++ b/cogl/cogl-context-private.h
@@ -219,9 +219,6 @@ struct _CoglContext
   CoglList onscreen_dirty_queue;
   CoglClosure *onscreen_dispatch_idle;
 
-  CoglGLES2Context *current_gles2_context;
-  GQueue gles2_context_stack;
-
   /* This becomes TRUE the first time the context is bound to an
    * onscreen buffer. This is used by cogl-framebuffer-gl to determine
    * when to initialise the glDrawBuffer state */
@@ -346,7 +343,6 @@ struct _CoglContext
 
 #define COGL_EXT_BEGIN(name, \
                        min_gl_major, min_gl_minor, \
-                       gles_availability, \
                        extension_suffixes, extension_names)
 #define COGL_EXT_FUNCTION(ret, name, args) \
   ret (APIENTRY * name) args;
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index a7eed29..71e7e52 100644
--- a/cogl/cogl-context.c
+++ b/cogl/cogl-context.c
@@ -67,15 +67,6 @@
 #include "cogl-pipeline-fragend-arbfp-private.h"
 #endif
 
-/* These aren't defined in the GLES headers */
-#ifndef GL_POINT_SPRITE
-#define GL_POINT_SPRITE 0x8861
-#endif
-
-#ifndef GL_NUM_EXTENSIONS
-#define GL_NUM_EXTENSIONS 0x821D
-#endif
-
 static void _cogl_context_free (CoglContext *context);
 
 COGL_OBJECT_DEFINE (Context, context);
@@ -407,7 +398,7 @@ cogl_context_new (CoglDisplay *display,
   context->texture_download_pipeline = NULL;
   context->blit_texture_pipeline = NULL;
 
-#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
+#if defined (HAVE_COGL_GL)
   if (_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_ALPHA_TEST))
     /* The default for GL_ALPHA_TEST is to always pass which is equivalent to
      * the test being disabled therefore we assume that for all drivers there
diff --git a/cogl/cogl-context.h b/cogl/cogl-context.h
index 5294817..67558fe 100644
--- a/cogl/cogl-context.h
+++ b/cogl/cogl-context.h
@@ -230,8 +230,6 @@ cogl_is_context (void *object);
  * @COGL_FEATURE_ID_BUFFER_AGE: Available if the age of #CoglOnscreen back
  *    buffers are tracked and so cogl_onscreen_get_buffer_age() can be
  *    expected to return age values other than 0.
- * @COGL_FEATURE_ID_GLES2_CONTEXT: Whether creating new GLES2 contexts is
- *    suported.
  * @COGL_FEATURE_ID_DEPTH_TEXTURE: Whether #CoglFramebuffer support rendering
  *     the depth buffer to a texture.
  * @COGL_FEATURE_ID_PRESENTATION_TIME: Whether frame presentation
@@ -263,7 +261,6 @@ typedef enum _CoglFeatureID
   COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE,
   COGL_FEATURE_ID_MIRRORED_REPEAT,
   COGL_FEATURE_ID_SWAP_BUFFERS_EVENT,
-  COGL_FEATURE_ID_GLES2_CONTEXT,
   COGL_FEATURE_ID_DEPTH_TEXTURE,
   COGL_FEATURE_ID_PRESENTATION_TIME,
   COGL_FEATURE_ID_FENCE,
diff --git a/cogl/cogl-feature-private.c b/cogl/cogl-feature-private.c
index 7c160c3..a38a1f9 100644
--- a/cogl/cogl-feature-private.c
+++ b/cogl/cogl-feature-private.c
@@ -53,20 +53,10 @@ _cogl_feature_check (CoglRenderer *renderer,
 {
   const char *suffix = NULL;
   int func_num;
-  CoglExtGlesAvailability gles_availability = 0;
   CoglBool in_core;
 
   switch (driver)
     {
-    case COGL_DRIVER_GLES1:
-      gles_availability = COGL_EXT_IN_GLES;
-      break;
-    case COGL_DRIVER_GLES2:
-      gles_availability = COGL_EXT_IN_GLES2;
-
-      if (COGL_CHECK_GL_VERSION (gl_major, gl_minor, 3, 0))
-        gles_availability |= COGL_EXT_IN_GLES3;
-      break;
     case COGL_DRIVER_ANY:
       g_assert_not_reached ();
     case COGL_DRIVER_WEBGL:
@@ -187,7 +177,6 @@ error:
    for each feature */
 #define COGL_EXT_BEGIN(name,                                            \
                        min_gl_major, min_gl_minor,                      \
-                       gles_availability,                               \
                        namespaces, extension_names)                     \
   static const CoglFeatureFunction cogl_ext_ ## name ## _funcs[] = {
 #define COGL_EXT_FUNCTION(ret, name, args)                          \
@@ -201,9 +190,8 @@ error:
 #undef COGL_EXT_BEGIN
 #define COGL_EXT_BEGIN(name,                                            \
                        min_gl_major, min_gl_minor,                      \
-                       gles_availability,                               \
                        namespaces, extension_names)                     \
-  { min_gl_major, min_gl_minor, gles_availability, namespaces,          \
+  { min_gl_major, min_gl_minor, namespaces,                             \
       extension_names, 0, 0, 0,                                         \
     cogl_ext_ ## name ## _funcs },
 #undef COGL_EXT_FUNCTION
diff --git a/cogl/cogl-feature-private.h b/cogl/cogl-feature-private.h
index a342d23..8b332c4 100644
--- a/cogl/cogl-feature-private.h
+++ b/cogl/cogl-feature-private.h
@@ -39,13 +39,6 @@
   ((driver_major) > (target_major) || \
    ((driver_major) == (target_major) && (driver_minor) >= (target_minor)))
 
-typedef enum
-{
-  COGL_EXT_IN_GLES = (1 << 0),
-  COGL_EXT_IN_GLES2 = (1 << 1),
-  COGL_EXT_IN_GLES3 = (1 << 2)
-} CoglExtGlesAvailability;
-
 typedef struct _CoglFeatureFunction CoglFeatureFunction;
 
 struct _CoglFeatureFunction
@@ -64,9 +57,6 @@ struct _CoglFeatureData
      without needing an extension. Set to 255,255 if it's only
      provided in an extension */
   int min_gl_major, min_gl_minor;
-  /* Flags specifying which versions of GLES the feature is available
-     in core in */
-  CoglExtGlesAvailability gles_availability;
   /* \0 separated list of namespaces to try. Eg "EXT\0ARB\0" */
   const char *namespaces;
   /* \0 separated list of required extension names without the GL_EXT
diff --git a/cogl/cogl-matrix-stack.c b/cogl/cogl-matrix-stack.c
index 400855f..9b0926a 100644
--- a/cogl/cogl-matrix-stack.c
+++ b/cogl/cogl-matrix-stack.c
@@ -829,7 +829,7 @@ _cogl_matrix_flush_to_gl_builtin (CoglContext *ctx,
 {
   g_assert (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED));
 
-#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
+#if defined (HAVE_COGL_GL)
   if (ctx->flushed_matrix_mode != mode)
     {
       GLenum gl_mode = 0;
@@ -869,7 +869,7 @@ _cogl_matrix_entry_flush_to_gl_builtins (CoglContext *ctx,
 {
   g_assert (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED));
 
-#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
+#if defined (HAVE_COGL_GL)
   {
     CoglBool needs_flip;
     CoglMatrixEntryCache *cache;
diff --git a/cogl/cogl-pipeline-private.h b/cogl/cogl-pipeline-private.h
index 845fdd8..577da7e 100644
--- a/cogl/cogl-pipeline-private.h
+++ b/cogl/cogl-pipeline-private.h
@@ -65,43 +65,6 @@
 #define COGL_PIPELINE_FRAGEND_GLSL  2
 #define COGL_PIPELINE_N_FRAGENDS    3
 
-#else /* HAVE_COGL_GL */
-
-#ifdef HAVE_COGL_GLES2
-
-#define COGL_PIPELINE_PROGEND_GLSL 0
-#define COGL_PIPELINE_VERTEND_GLSL 0
-#define COGL_PIPELINE_FRAGEND_GLSL 0
-
-#ifdef HAVE_COGL_GLES
-#define COGL_PIPELINE_PROGEND_FIXED 1
-#define COGL_PIPELINE_VERTEND_FIXED 1
-#define COGL_PIPELINE_FRAGEND_FIXED 1
-
-#define COGL_PIPELINE_N_PROGENDS    2
-#define COGL_PIPELINE_N_VERTENDS    2
-#define COGL_PIPELINE_N_FRAGENDS    2
-#else
-#define COGL_PIPELINE_N_PROGENDS    1
-#define COGL_PIPELINE_N_VERTENDS    1
-#define COGL_PIPELINE_N_FRAGENDS    1
-#endif
-
-#else /* HAVE_COGL_GLES2 */
-
-#ifdef HAVE_COGL_GLES
-#define COGL_PIPELINE_PROGEND_FIXED 0
-#define COGL_PIPELINE_VERTEND_FIXED 0
-#define COGL_PIPELINE_FRAGEND_FIXED 0
-#define COGL_PIPELINE_N_PROGENDS    1
-#define COGL_PIPELINE_N_VERTENDS    1
-#define COGL_PIPELINE_N_FRAGENDS    1
-#else
-#error No drivers defined
-#endif
-
-#endif /* HAVE_COGL_GLES2 */
-
 #endif /* HAVE_COGL_GL */
 
 #define COGL_PIPELINE_PROGEND_DEFAULT    0
@@ -283,7 +246,7 @@ typedef enum _CoglPipelineBlendEnable
 typedef struct
 {
   /* Determines how this pipeline is blended with other primitives */
-#if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
+#if defined(HAVE_COGL_GL)
   GLenum    blend_equation_rgb;
   GLenum    blend_equation_alpha;
   GLint     blend_src_factor_alpha;
diff --git a/cogl/cogl-pipeline-state.c b/cogl/cogl-pipeline-state.c
index 04c76f8..84aa084 100644
--- a/cogl/cogl-pipeline-state.c
+++ b/cogl/cogl-pipeline-state.c
@@ -909,7 +909,7 @@ arg_to_gl_blend_factor (CoglBlendStringArgument *arg)
             return GL_DST_ALPHA;
         }
     }
-#if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
+#if defined(HAVE_COGL_GL)
   else if (arg->factor.source.info->type ==
            COGL_BLEND_STRING_COLOR_SOURCE_CONSTANT)
     {
@@ -1048,7 +1048,7 @@ cogl_pipeline_set_blend_constant (CoglPipeline *pipeline,
   if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_BLEND_CONSTANT))
     return;
 
-#if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
+#if defined(HAVE_COGL_GL)
   {
     CoglPipelineState state = COGL_PIPELINE_STATE_BLEND;
     CoglPipeline *authority;
@@ -1177,17 +1177,6 @@ cogl_pipeline_set_depth_state (CoglPipeline *pipeline,
       orig_state->range_far == depth_state->range_far)
     return TRUE;
 
-  if (ctx->driver == COGL_DRIVER_GLES1 &&
-      (depth_state->range_near != 0 ||
-       depth_state->range_far != 1))
-    {
-      _cogl_set_error (error,
-                       COGL_SYSTEM_ERROR,
-                       COGL_SYSTEM_ERROR_UNSUPPORTED,
-                       "glDepthRange not available on GLES 1");
-      return FALSE;
-    }
-
   /* - Flush journal primitives referencing the current state.
    * - Make sure the pipeline has no dependants so it may be modified.
    * - If the pipeline isn't currently an authority for the state being
diff --git a/cogl/cogl-pipeline.c b/cogl/cogl-pipeline.c
index b2fee10..c948275 100644
--- a/cogl/cogl-pipeline.c
+++ b/cogl/cogl-pipeline.c
@@ -209,7 +209,7 @@ _cogl_pipeline_init_default_pipeline (void)
   alpha_state->alpha_func_reference = 0.0;
 
   /* Not the same as the GL default, but seems saner... */
-#if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
+#if defined(HAVE_COGL_GL)
   blend_state->blend_equation_rgb = GL_FUNC_ADD;
   blend_state->blend_equation_alpha = GL_FUNC_ADD;
   blend_state->blend_src_factor_alpha = GL_ONE;
diff --git a/cogl/cogl-renderer-private.h b/cogl/cogl-renderer-private.h
index f226968..7cb2642 100644
--- a/cogl/cogl-renderer-private.h
+++ b/cogl/cogl-renderer-private.h
@@ -84,11 +84,6 @@ struct _CoglRenderer
   void *winsys;
 };
 
-/* Mask of constraints that effect driver selection. All of the other
- * constraints effect only the winsys selection */
-#define COGL_RENDERER_DRIVER_CONSTRAINTS \
-  COGL_RENDERER_CONSTRAINT_SUPPORTS_COGL_GLES2
-
 typedef CoglFilterReturn (* CoglNativeFilterFunc) (void *native_event,
                                                    void *data);
 
diff --git a/cogl/cogl-renderer.c b/cogl/cogl-renderer.c
index 1d3eba5..8fd2ce6 100644
--- a/cogl/cogl-renderer.c
+++ b/cogl/cogl-renderer.c
@@ -71,10 +71,6 @@ typedef const CoglWinsysVtable *(*CoglWinsysVtableGetter) (void);
 extern const CoglTextureDriver _cogl_texture_driver_gl;
 extern const CoglDriverVtable _cogl_driver_gl;
 #endif
-#if defined (HAVE_COGL_GLES) || defined (HAVE_COGL_GLES2)
-extern const CoglTextureDriver _cogl_texture_driver_gles;
-extern const CoglDriverVtable _cogl_driver_gles;
-#endif
 
 extern const CoglDriverVtable _cogl_driver_nop;
 
@@ -121,34 +117,6 @@ static CoglDriverDescription _cogl_drivers[] =
     COGL_GL_LIBNAME,
   },
 #endif
-#ifdef HAVE_COGL_GLES2
-  {
-    COGL_DRIVER_GLES2,
-    "gles2",
-    COGL_RENDERER_CONSTRAINT_SUPPORTS_COGL_GLES2,
-    { COGL_PRIVATE_FEATURE_ANY_GL,
-      COGL_PRIVATE_FEATURE_GL_EMBEDDED,
-      COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
-      -1 },
-    &_cogl_driver_gles,
-    &_cogl_texture_driver_gles,
-    COGL_GLES2_LIBNAME,
-  },
-#endif
-#ifdef HAVE_COGL_GLES
-  {
-    COGL_DRIVER_GLES1,
-    "gles1",
-    0,
-    { COGL_PRIVATE_FEATURE_ANY_GL,
-      COGL_PRIVATE_FEATURE_GL_EMBEDDED,
-      COGL_PRIVATE_FEATURE_GL_FIXED,
-      -1 },
-    &_cogl_driver_gles,
-    &_cogl_texture_driver_gles,
-    COGL_GLES1_LIBNAME,
-  },
-#endif
   {
     COGL_DRIVER_NOP,
     "nop",
@@ -393,10 +361,6 @@ driver_id_to_name (CoglDriver id)
         return "gl";
       case COGL_DRIVER_GL3:
         return "gl3";
-      case COGL_DRIVER_GLES1:
-        return "gles1";
-      case COGL_DRIVER_GLES2:
-        return "gles2";
       case COGL_DRIVER_WEBGL:
         return "webgl";
       case COGL_DRIVER_NOP:
@@ -427,11 +391,6 @@ satisfy_constraints (CoglDriverDescription *description,
     {
       CoglRendererConstraint constraint = GPOINTER_TO_UINT (l->data);
 
-      /* Most of the constraints only affect the winsys selection so
-       * we'll filter them out */
-      if (!(constraint & COGL_RENDERER_DRIVER_CONSTRAINTS))
-        continue;
-
       /* If the driver doesn't satisfy any constraint then continue
        * to the next driver description */
       if (!(constraint & description->constraints))
@@ -752,7 +711,7 @@ cogl_renderer_get_n_fragment_texture_units (CoglRenderer *renderer)
 
   _COGL_GET_CONTEXT (ctx, 0);
 
-#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES2)
+#if defined (HAVE_COGL_GL)
   if (cogl_has_feature (ctx, COGL_FEATURE_ID_GLSL) ||
       cogl_has_feature (ctx, COGL_FEATURE_ID_ARBFP))
     GE (ctx, glGetIntegerv (GL_MAX_TEXTURE_IMAGE_UNITS, &n));
diff --git a/cogl/cogl-renderer.h b/cogl/cogl-renderer.h
index 20c7906..ca8c510 100644
--- a/cogl/cogl-renderer.h
+++ b/cogl/cogl-renderer.h
@@ -267,10 +267,6 @@ cogl_renderer_connect (CoglRenderer *renderer, CoglError **error);
  * @COGL_RENDERER_CONSTRAINT_USES_XLIB: Require the renderer to be X11
  *                                      based and use Xlib
  * @COGL_RENDERER_CONSTRAINT_USES_EGL: Require the renderer to be EGL based
- * @COGL_RENDERER_CONSTRAINT_SUPPORTS_COGL_GLES2: Require that the
- *    renderer supports creating a #CoglGLES2Context via
- *    cogl_gles2_context_new(). This can be used to integrate GLES 2.0
- *    code into Cogl based applications.
  *
  * These constraint flags are hard-coded features of the different renderer
  * backends. Sometimes a platform may support multiple rendering options which
@@ -292,7 +288,6 @@ typedef enum
   COGL_RENDERER_CONSTRAINT_USES_X11 = (1 << 0),
   COGL_RENDERER_CONSTRAINT_USES_XLIB = (1 << 1),
   COGL_RENDERER_CONSTRAINT_USES_EGL = (1 << 2),
-  COGL_RENDERER_CONSTRAINT_SUPPORTS_COGL_GLES2 = (1 << 3)
 } CoglRendererConstraint;
 
 
@@ -336,8 +331,6 @@ cogl_renderer_remove_constraint (CoglRenderer *renderer,
  * @COGL_DRIVER_NOP: A No-Op driver.
  * @COGL_DRIVER_GL: An OpenGL driver.
  * @COGL_DRIVER_GL3: An OpenGL driver using the core GL 3.1 profile
- * @COGL_DRIVER_GLES1: An OpenGL ES 1.1 driver.
- * @COGL_DRIVER_GLES2: An OpenGL ES 2.0 driver.
  * @COGL_DRIVER_WEBGL: A WebGL driver.
  *
  * Identifiers for underlying hardware drivers that may be used by
@@ -352,8 +345,6 @@ typedef enum
   COGL_DRIVER_NOP,
   COGL_DRIVER_GL,
   COGL_DRIVER_GL3,
-  COGL_DRIVER_GLES1,
-  COGL_DRIVER_GLES2,
   COGL_DRIVER_WEBGL
 } CoglDriver;
 
diff --git a/cogl/cogl-sampler-cache-private.h b/cogl/cogl-sampler-cache-private.h
index 5688eff..ad7a8dc 100644
--- a/cogl/cogl-sampler-cache-private.h
+++ b/cogl/cogl-sampler-cache-private.h
@@ -34,14 +34,6 @@
 #include "cogl-context.h"
 #include "cogl-gl-header.h"
 
-/* These aren't defined in the GLES headers */
-#ifndef GL_CLAMP_TO_BORDER
-#define GL_CLAMP_TO_BORDER 0x812d
-#endif
-#ifndef GL_MIRRORED_REPEAT
-#define GL_MIRRORED_REPEAT 0x8370
-#endif
-
 /* GL_ALWAYS is just used here as a value that is known not to clash
  * with any valid GL wrap modes.
  *
diff --git a/cogl/cogl-texture-3d.c b/cogl/cogl-texture-3d.c
index 8e2ff08..6c32bb3 100644
--- a/cogl/cogl-texture-3d.c
+++ b/cogl/cogl-texture-3d.c
@@ -52,14 +52,6 @@
 #include <string.h>
 #include <math.h>
 
-/* These might not be defined on GLES */
-#ifndef GL_TEXTURE_3D
-#define GL_TEXTURE_3D                           0x806F
-#endif
-#ifndef GL_TEXTURE_WRAP_R
-#define GL_TEXTURE_WRAP_R                       0x8072
-#endif
-
 static void _cogl_texture_3d_free (CoglTexture3D *tex_3d);
 
 COGL_TEXTURE_DEFINE (Texture3D, texture_3d);
@@ -297,16 +289,6 @@ _cogl_texture_3d_can_create (CoglContext *ctx,
   GLenum gl_intformat;
   GLenum gl_type;
 
-  /* This should only happen on GLES */
-  if (!cogl_has_feature (ctx, COGL_FEATURE_ID_TEXTURE_3D))
-    {
-      _cogl_set_error (error,
-                       COGL_SYSTEM_ERROR,
-                       COGL_SYSTEM_ERROR_UNSUPPORTED,
-                       "3D textures are not supported by the GPU");
-      return FALSE;
-    }
-
   /* If NPOT textures aren't supported then the size must be a power
      of two */
   if (!cogl_has_feature (ctx, COGL_FEATURE_ID_TEXTURE_NPOT) &&
@@ -643,7 +625,7 @@ _cogl_texture_3d_pre_paint (CoglTexture *tex, CoglTexturePrePaintFlags flags)
          GL_GENERATE_MIPMAP and reuploading the first pixel */
       if (cogl_has_feature (ctx, COGL_FEATURE_ID_OFFSCREEN))
         _cogl_texture_gl_generate_mipmaps (tex);
-#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
+#if defined (HAVE_COGL_GL)
       else if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED))
         {
           _cogl_bind_gl_texture_transient (GL_TEXTURE_3D,
diff --git a/cogl/cogl-texture-rectangle.c b/cogl/cogl-texture-rectangle.c
index 65d2f06..c2674aa 100644
--- a/cogl/cogl-texture-rectangle.c
+++ b/cogl/cogl-texture-rectangle.c
@@ -51,17 +51,6 @@
 #include <string.h>
 #include <math.h>
 
-/* These aren't defined under GLES */
-#ifndef GL_TEXTURE_RECTANGLE_ARB
-#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
-#endif
-#ifndef GL_CLAMP
-#define GL_CLAMP                 0x2900
-#endif
-#ifndef GL_CLAMP_TO_BORDER
-#define GL_CLAMP_TO_BORDER       0x812D
-#endif
-
 static void _cogl_texture_rectangle_free (CoglTextureRectangle *tex_rect);
 
 COGL_TEXTURE_DEFINE (TextureRectangle, texture_rectangle);
diff --git a/cogl/cogl-texture.c b/cogl/cogl-texture.c
index d93db22..9bed579 100644
--- a/cogl/cogl-texture.c
+++ b/cogl/cogl-texture.c
@@ -69,11 +69,6 @@
 #include <stdlib.h>
 #include <math.h>
 
-/* This isn't defined in the GLES headers */
-#ifndef GL_RED
-#define GL_RED 0x1903
-#endif
-
 COGL_GTYPE_DEFINE_INTERFACE (Texture, texture);
 
 uint32_t
diff --git a/cogl/cogl1-context.h b/cogl/cogl1-context.h
index 92ac7d0..87b179a 100644
--- a/cogl/cogl1-context.h
+++ b/cogl/cogl1-context.h
@@ -840,7 +840,6 @@ cogl_flush (void);
  * Since: 1.0
  * Deprecated: 1.16: Use the #CoglGLES2Context api instead
  */
-COGL_DEPRECATED_IN_1_16_FOR (CoglGLES2Context_API)
 void
 cogl_begin_gl (void);
 
@@ -853,7 +852,6 @@ cogl_begin_gl (void);
  * Since: 1.0
  * Deprecated: 1.16: Use the #CoglGLES2Context api instead
  */
-COGL_DEPRECATED_IN_1_16_FOR (CoglGLES2Context_API)
 void
 cogl_end_gl (void);
 
diff --git a/cogl/deprecated/cogl-program.c b/cogl/deprecated/cogl-program.c
index 9b44d35..61922d5 100644
--- a/cogl/deprecated/cogl-program.c
+++ b/cogl/deprecated/cogl-program.c
@@ -409,8 +409,6 @@ _cogl_program_flush_uniforms (CoglProgram *program,
 
   _COGL_GET_CONTEXT (ctx, NO_RETVAL);
 
-  _COGL_RETURN_IF_FAIL (ctx->driver != COGL_DRIVER_GLES1);
-
   for (i = 0; i < program->custom_uniforms->len; i++)
     {
       uniform = &g_array_index (program->custom_uniforms,
diff --git a/cogl/deprecated/cogl-shader.c b/cogl/deprecated/cogl-shader.c
index 08dcb82..2cc1817 100644
--- a/cogl/deprecated/cogl-shader.c
+++ b/cogl/deprecated/cogl-shader.c
@@ -347,7 +347,7 @@ cogl_shader_get_type (CoglHandle  handle)
 CoglBool
 cogl_shader_is_compiled (CoglHandle handle)
 {
-#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES2)
+#if defined (HAVE_COGL_GL)
   if (!cogl_is_shader (handle))
     return FALSE;
 
diff --git a/cogl/driver/gl/cogl-attribute-gl.c b/cogl/driver/gl/cogl-attribute-gl.c
index 34ddb55..410c578 100644
--- a/cogl/driver/gl/cogl-attribute-gl.c
+++ b/cogl/driver/gl/cogl-attribute-gl.c
@@ -66,7 +66,7 @@ toggle_builtin_attribute_enabled_cb (int bit_num, void *user_data)
                             (context, COGL_PRIVATE_FEATURE_GL_FIXED),
                             FALSE);
 
-#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
+#if defined (HAVE_COGL_GL)
   {
     CoglBool enabled = _cogl_bitmask_get (state->new_bits, bit_num);
     GLenum cap;
@@ -105,7 +105,7 @@ toggle_texcood_attribute_enabled_cb (int bit_num, void *user_data)
                             (context, COGL_PRIVATE_FEATURE_GL_FIXED),
                             FALSE);
 
-#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
+#if defined (HAVE_COGL_GL)
   {
     CoglBool enabled = _cogl_bitmask_get (state->new_bits, bit_num);
 
diff --git a/cogl/driver/gl/cogl-buffer-gl.c b/cogl/driver/gl/cogl-buffer-gl.c
index 0f98406..ce9eb6d 100644
--- a/cogl/driver/gl/cogl-buffer-gl.c
+++ b/cogl/driver/gl/cogl-buffer-gl.c
@@ -41,44 +41,6 @@
 #include "cogl-error-private.h"
 #include "cogl-util-gl-private.h"
 
-/*
- * GL/GLES compatibility defines for the buffer API:
- */
-
-#ifndef GL_PIXEL_PACK_BUFFER
-#define GL_PIXEL_PACK_BUFFER 0x88EB
-#endif
-#ifndef GL_PIXEL_UNPACK_BUFFER
-#define GL_PIXEL_UNPACK_BUFFER 0x88EC
-#endif
-#ifndef GL_ARRAY_BUFFER
-#define GL_ARRAY_BUFFER 0x8892
-#endif
-#ifndef GL_ELEMENT_ARRAY_BUFFER
-#define GL_ARRAY_BUFFER 0x8893
-#endif
-#ifndef GL_READ_ONLY
-#define GL_READ_ONLY 0x88B8
-#endif
-#ifndef GL_WRITE_ONLY
-#define GL_WRITE_ONLY 0x88B9
-#endif
-#ifndef GL_READ_WRITE
-#define GL_READ_WRITE 0x88BA
-#endif
-#ifndef GL_MAP_READ_BIT
-#define GL_MAP_READ_BIT 0x0001
-#endif
-#ifndef GL_MAP_WRITE_BIT
-#define GL_MAP_WRITE_BIT 0x0002
-#endif
-#ifndef GL_MAP_INVALIDATE_RANGE_BIT
-#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
-#endif
-#ifndef GL_MAP_INVALIDATE_BUFFER_BIT
-#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
-#endif
-
 void
 _cogl_buffer_gl_create (CoglBuffer *buffer)
 {
@@ -106,9 +68,8 @@ update_hints_to_gl_enum (CoglBuffer *buffer)
 
     case COGL_BUFFER_UPDATE_HINT_STREAM:
       /* OpenGL ES 1.1 only knows about STATIC_DRAW and DYNAMIC_DRAW */
-#if defined(HAVE_COGL_GL) || defined(HAVE_COGL_GLES2)
-      if (buffer->context->driver != COGL_DRIVER_GLES1)
-        return GL_STREAM_DRAW;
+#if defined(HAVE_COGL_GL)
+      return GL_STREAM_DRAW;
 #else
       return GL_DYNAMIC_DRAW;
 #endif
diff --git a/cogl/driver/gl/cogl-pipeline-fragend-fixed.c b/cogl/driver/gl/cogl-pipeline-fragend-fixed.c
index 55b0956..541c425 100644
--- a/cogl/driver/gl/cogl-pipeline-fragend-fixed.c
+++ b/cogl/driver/gl/cogl-pipeline-fragend-fixed.c
@@ -390,22 +390,6 @@ _cogl_pipeline_fragend_fixed_end (CoglPipeline *pipeline,
 
           GE (ctx, glFogfv (GL_FOG_COLOR, fogColor));
 
-          if (ctx->driver == COGL_DRIVER_GLES1)
-            switch (fog_state->mode)
-              {
-              case COGL_FOG_MODE_LINEAR:
-                gl_mode = GL_LINEAR;
-                break;
-              case COGL_FOG_MODE_EXPONENTIAL:
-                gl_mode = GL_EXP;
-                break;
-              case COGL_FOG_MODE_EXPONENTIAL_SQUARED:
-                gl_mode = GL_EXP2;
-                break;
-              }
-          /* TODO: support other modes for GLES2 */
-
-          /* NB: GLES doesn't have glFogi */
           GE (ctx, glFogf (GL_FOG_MODE, gl_mode));
           GE (ctx, glHint (GL_FOG_HINT, GL_NICEST));
 
diff --git a/cogl/driver/gl/cogl-pipeline-fragend-glsl.c b/cogl/driver/gl/cogl-pipeline-fragend-glsl.c
index 6fdb3a1..0137130 100644
--- a/cogl/driver/gl/cogl-pipeline-fragend-glsl.c
+++ b/cogl/driver/gl/cogl-pipeline-fragend-glsl.c
@@ -58,15 +58,6 @@
 
 #include <glib.h>
 
-/*
- * GL/GLES compatability defines for pipeline thingies:
- */
-
-/* This might not be defined on GLES */
-#ifndef GL_TEXTURE_3D
-#define GL_TEXTURE_3D                           0x806F
-#endif
-
 const CoglPipelineFragend _cogl_pipeline_glsl_backend;
 
 typedef struct _UnitState
@@ -927,7 +918,7 @@ _cogl_pipeline_fragend_glsl_add_layer (CoglPipeline *pipeline,
 /* GLES2 and GL3 don't have alpha testing so we need to implement it
    in the shader */
 
-#if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
+#if defined(HAVE_COGL_GL)
 
 static void
 add_alpha_test_snippet (CoglPipeline *pipeline,
@@ -1043,7 +1034,7 @@ _cogl_pipeline_fragend_glsl_end (CoglPipeline *pipeline,
         g_string_append (shader_state->source,
                          "  cogl_color_out = cogl_color_in;\n");
 
-#if defined(HAVE_COGL_GLES2) || defined (HAVE_COGL_GL)
+#if defined(HAVE_COGL_GL)
       if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_ALPHA_TEST))
         add_alpha_test_snippet (pipeline, shader_state);
 #endif
diff --git a/cogl/driver/gl/cogl-pipeline-opengl.c b/cogl/driver/gl/cogl-pipeline-opengl.c
index c7b44ee..0bd0ff4 100644
--- a/cogl/driver/gl/cogl-pipeline-opengl.c
+++ b/cogl/driver/gl/cogl-pipeline-opengl.c
@@ -50,24 +50,6 @@
 #include <glib.h>
 #include <string.h>
 
-/*
- * GL/GLES compatability defines for pipeline thingies:
- */
-
-/* These aren't defined in the GLES headers */
-#ifndef GL_POINT_SPRITE
-#define GL_POINT_SPRITE 0x8861
-#endif
-#ifndef GL_COORD_REPLACE
-#define GL_COORD_REPLACE 0x8862
-#endif
-#ifndef GL_CLAMP_TO_BORDER
-#define GL_CLAMP_TO_BORDER 0x812d
-#endif
-#ifndef GL_PROGRAM_POINT_SIZE
-#define GL_PROGRAM_POINT_SIZE 0x8642
-#endif
-
 static void
 texture_unit_init (CoglContext *ctx,
                    CoglTextureUnit *unit,
@@ -396,7 +378,7 @@ _cogl_use_vertex_program (GLuint gl_program, CoglPipelineProgramType type)
   ctx->current_vertex_program_type = type;
 }
 
-#if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
+#if defined(HAVE_COGL_GL)
 
 static CoglBool
 blend_factor_uses_constant (GLenum blend_factor)
@@ -441,9 +423,8 @@ flush_depth_state (CoglContext *ctx,
       ctx->depth_writing_enabled_cache = depth_writing_enabled;
     }
 
-  if (ctx->driver != COGL_DRIVER_GLES1 &&
-      (ctx->depth_range_near_cache != depth_state->range_near ||
-       ctx->depth_range_far_cache != depth_state->range_far))
+  if (ctx->depth_range_near_cache != depth_state->range_near ||
+       ctx->depth_range_far_cache != depth_state->range_far)
     {
       if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED))
         GE (ctx, glDepthRangef (depth_state->range_near,
@@ -522,60 +503,50 @@ _cogl_pipeline_flush_color_blend_alpha_depth_state (
       CoglPipelineBlendState *blend_state =
         &authority->big_state->blend_state;
 
-      /* GLES 1 only has glBlendFunc */
-      if (ctx->driver == COGL_DRIVER_GLES1)
-        {
-          GE (ctx, glBlendFunc (blend_state->blend_src_factor_rgb,
-                                blend_state->blend_dst_factor_rgb));
-        }
-#if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
-      else
+#if defined(HAVE_COGL_GL)
+      if (blend_factor_uses_constant (blend_state->blend_src_factor_rgb) ||
+          blend_factor_uses_constant (blend_state
+                                      ->blend_src_factor_alpha) ||
+          blend_factor_uses_constant (blend_state->blend_dst_factor_rgb) ||
+          blend_factor_uses_constant (blend_state->blend_dst_factor_alpha))
         {
-          if (blend_factor_uses_constant (blend_state->blend_src_factor_rgb) ||
-              blend_factor_uses_constant (blend_state
-                                          ->blend_src_factor_alpha) ||
-              blend_factor_uses_constant (blend_state->blend_dst_factor_rgb) ||
-              blend_factor_uses_constant (blend_state->blend_dst_factor_alpha))
-            {
-              float red =
-                cogl_color_get_red_float (&blend_state->blend_constant);
-              float green =
-                cogl_color_get_green_float (&blend_state->blend_constant);
-              float blue =
-                cogl_color_get_blue_float (&blend_state->blend_constant);
-              float alpha =
-                cogl_color_get_alpha_float (&blend_state->blend_constant);
-
+          float red =
+            cogl_color_get_red_float (&blend_state->blend_constant);
+          float green =
+            cogl_color_get_green_float (&blend_state->blend_constant);
+          float blue =
+            cogl_color_get_blue_float (&blend_state->blend_constant);
+          float alpha =
+            cogl_color_get_alpha_float (&blend_state->blend_constant);
 
-              GE (ctx, glBlendColor (red, green, blue, alpha));
-            }
 
-          if (ctx->glBlendEquationSeparate &&
-              blend_state->blend_equation_rgb !=
-              blend_state->blend_equation_alpha)
-            GE (ctx,
-                glBlendEquationSeparate (blend_state->blend_equation_rgb,
-                                         blend_state->blend_equation_alpha));
-          else
-            GE (ctx, glBlendEquation (blend_state->blend_equation_rgb));
-
-          if (ctx->glBlendFuncSeparate &&
-              (blend_state->blend_src_factor_rgb !=
-               blend_state->blend_src_factor_alpha ||
-               (blend_state->blend_dst_factor_rgb !=
-                blend_state->blend_dst_factor_alpha)))
-            GE (ctx, glBlendFuncSeparate (blend_state->blend_src_factor_rgb,
-                                          blend_state->blend_dst_factor_rgb,
-                                          blend_state->blend_src_factor_alpha,
-                                          blend_state->blend_dst_factor_alpha));
-          else
-            GE (ctx, glBlendFunc (blend_state->blend_src_factor_rgb,
-                                  blend_state->blend_dst_factor_rgb));
+          GE (ctx, glBlendColor (red, green, blue, alpha));
         }
-#endif
+
+      if (ctx->glBlendEquationSeparate &&
+          blend_state->blend_equation_rgb !=
+          blend_state->blend_equation_alpha)
+        GE (ctx,
+            glBlendEquationSeparate (blend_state->blend_equation_rgb,
+                                     blend_state->blend_equation_alpha));
+      else
+        GE (ctx, glBlendEquation (blend_state->blend_equation_rgb));
+
+      if (ctx->glBlendFuncSeparate &&
+          (blend_state->blend_src_factor_rgb !=
+           blend_state->blend_src_factor_alpha ||
+           (blend_state->blend_dst_factor_rgb !=
+            blend_state->blend_dst_factor_alpha)))
+        GE (ctx, glBlendFuncSeparate (blend_state->blend_src_factor_rgb,
+                                      blend_state->blend_dst_factor_rgb,
+                                      blend_state->blend_src_factor_alpha,
+                                      blend_state->blend_dst_factor_alpha));
+      else
+        GE (ctx, glBlendFunc (blend_state->blend_src_factor_rgb,
+                              blend_state->blend_dst_factor_rgb));
     }
 
-#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
+#if defined (HAVE_COGL_GL)
 
   if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_ALPHA_TEST))
     {
@@ -758,21 +729,7 @@ get_max_activateable_texture_units (void)
         }
 #endif /* HAVE_COGL_GL */
 
-#ifdef HAVE_COGL_GLES2
-      if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED) &&
-          _cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE))
-        {
-          GE (ctx, glGetIntegerv (GL_MAX_VERTEX_ATTRIBS, values + n_values));
-          /* Two of the vertex attribs need to be used for the position
-             and color */
-          values[n_values++] -= 2;
-
-          GE (ctx, glGetIntegerv (GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,
-                                  values + n_values++));
-        }
-#endif
-
-#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
+#if defined (HAVE_COGL_GL)
       if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED))
         {
           /* GL_MAX_TEXTURE_UNITS defines the number of units that are
@@ -917,7 +874,7 @@ flush_layers_common_gl_state_cb (CoglPipelineLayer *layer, void *user_data)
    * this point we can't currently tell if we are using the fixed or
    * glsl progend.
    */
-#if defined (HAVE_COGL_GLES) || defined (HAVE_COGL_GL)
+#if defined (HAVE_COGL_GL)
   if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED) &&
       (layers_difference & COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS))
     {
diff --git a/cogl/driver/gl/cogl-texture-2d-gl.c b/cogl/driver/gl/cogl-texture-2d-gl.c
index 8675f52..7829555 100644
--- a/cogl/driver/gl/cogl-texture-2d-gl.c
+++ b/cogl/driver/gl/cogl-texture-2d-gl.c
@@ -612,7 +612,7 @@ _cogl_texture_2d_gl_generate_mipmap (CoglTexture2D *tex_2d)
      GL_GENERATE_MIPMAP and reuploading the first pixel */
   if (cogl_has_feature (ctx, COGL_FEATURE_ID_OFFSCREEN))
     _cogl_texture_gl_generate_mipmaps (COGL_TEXTURE (tex_2d));
-#if defined(HAVE_COGL_GLES) || defined(HAVE_COGL_GL)
+#if defined(HAVE_COGL_GL)
   else
     {
       _cogl_bind_gl_texture_transient (GL_TEXTURE_2D,
diff --git a/cogl/gl-prototypes/cogl-all-functions.h b/cogl/gl-prototypes/cogl-all-functions.h
index 7ac9022..db9ef48 100644
--- a/cogl/gl-prototypes/cogl-all-functions.h
+++ b/cogl/gl-prototypes/cogl-all-functions.h
@@ -42,10 +42,6 @@
  * functions are available in core, or 255 if it isn't available in
  * any version.
  *
- * @gles_availability: flags to specify which versions of GLES the
- * functions are available in. Should be a combination of
- * COGL_EXT_IN_GLES and COGL_EXT_IN_GLES2.
- *
  * @extension_suffixes: A zero-separated list of suffixes in a
  * string. These are appended to the extension name to get a complete
  * extension name to try. The suffix is also appended to all of the
@@ -81,7 +77,6 @@
    GL */
 COGL_EXT_BEGIN (only_in_big_gl,
                 0, 0,
-                0, /* not in GLES */
                 "\0",
                 "\0")
 COGL_EXT_FUNCTION (void, glGetTexLevelParameteriv,
@@ -103,7 +98,6 @@ COGL_EXT_END ()
 /* GLES doesn't support mapping buffers in core so this has to be a
    separate check */
 COGL_EXT_BEGIN (map_vbos, 1, 5,
-                0, /* not in GLES core */
                 "ARB\0OES\0",
                 "vertex_buffer_object\0mapbuffer\0")
 COGL_EXT_FUNCTION (void *, glMapBuffer,
@@ -114,7 +108,6 @@ COGL_EXT_FUNCTION (GLboolean, glUnmapBuffer,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (texture_3d, 1, 2,
-                0, /* not in either GLES */
                 "OES\0",
                 "texture_3D\0")
 COGL_EXT_FUNCTION (void, glTexImage3D,
@@ -136,7 +129,6 @@ COGL_EXT_END ()
 
 
 COGL_EXT_BEGIN (offscreen_blit, 3, 0,
-                0, /* not in either GLES */
                 "EXT\0ANGLE\0",
                 "framebuffer_blit\0")
 COGL_EXT_FUNCTION (void, glBlitFramebuffer,
@@ -154,7 +146,6 @@ COGL_EXT_END ()
 
 /* ARB_fragment_program */
 COGL_EXT_BEGIN (arbfp, 255, 255,
-                0, /* not in either GLES */
                 "ARB\0",
                 "fragment_program\0")
 COGL_EXT_FUNCTION (void, glGenPrograms,
@@ -178,7 +169,6 @@ COGL_EXT_FUNCTION (void, glProgramLocalParameter4fv,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (EGL_image, 255, 255,
-                0, /* not in either GLES */
                 "OES\0",
                 "EGL_image\0")
 COGL_EXT_FUNCTION (void, glEGLImageTargetTexture2D,
@@ -190,7 +180,6 @@ COGL_EXT_FUNCTION (void, glEGLImageTargetRenderbufferStorage,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (framebuffer_discard, 255, 255,
-                0, /* not in either GLES */
                 "EXT\0",
                 "framebuffer_discard\0")
 COGL_EXT_FUNCTION (void, glDiscardFramebuffer,
@@ -200,7 +189,6 @@ COGL_EXT_FUNCTION (void, glDiscardFramebuffer,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (IMG_multisampled_render_to_texture, 255, 255,
-                0, /* not in either GLES */
                 "\0",
                 "IMG_multisampled_render_to_texture\0")
 COGL_EXT_FUNCTION (void, glRenderbufferStorageMultisampleIMG,
@@ -219,7 +207,6 @@ COGL_EXT_FUNCTION (void, glFramebufferTexture2DMultisampleIMG,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (ARB_sampler_objects, 3, 3,
-                0, /* not in either GLES */
                 "ARB:\0",
                 "sampler_objects\0")
 COGL_EXT_FUNCTION (void, glGenSamplers,
@@ -241,7 +228,6 @@ COGL_EXT_END ()
  * Functions that are common to the extensions and GLSL 2.0 should
  * instead be listed in cogl-glsl-functions.h */
 COGL_EXT_BEGIN (shader_objects, 255, 255,
-                0, /* not in either GLES */
                 "ARB\0",
                 "shader_objects\0")
 COGL_EXT_FUNCTION (GLuint, glCreateProgramObject,
@@ -273,7 +259,6 @@ COGL_EXT_FUNCTION (void, glGetAttachedObjects,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (only_gl3, 3, 0,
-                0, /* not in either GLES */
                 "\0",
                 "\0")
 COGL_EXT_FUNCTION (const GLubyte *, glGetStringi,
@@ -281,7 +266,6 @@ COGL_EXT_FUNCTION (const GLubyte *, glGetStringi,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (vertex_array_object, 3, 0,
-                0, /* not in either GLES */
                 "ARB\0OES\0",
                 "vertex_array_object\0")
 COGL_EXT_FUNCTION (void, glBindVertexArray,
@@ -295,7 +279,6 @@ COGL_EXT_FUNCTION (void, glGenVertexArrays,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (map_region, 3, 0,
-                COGL_EXT_IN_GLES3,
                 "ARB:\0",
                 "map_buffer_range\0")
 COGL_EXT_FUNCTION (GLvoid *, glMapBufferRange,
@@ -307,7 +290,6 @@ COGL_EXT_END ()
 
 #ifdef GL_ARB_sync
 COGL_EXT_BEGIN (sync, 3, 2,
-                0, /* not in either GLES */
                 "ARB:\0",
                 "sync\0")
 COGL_EXT_FUNCTION (GLsync, glFenceSync,
@@ -320,7 +302,6 @@ COGL_EXT_END ()
 #endif
 
 COGL_EXT_BEGIN (draw_buffers, 2, 0,
-                COGL_EXT_IN_GLES3,
                 "ARB\0EXT\0",
                 "draw_buffers\0")
 COGL_EXT_FUNCTION (void, glDrawBuffers,
diff --git a/cogl/gl-prototypes/cogl-core-functions.h b/cogl/gl-prototypes/cogl-core-functions.h
index f37041b..13db162 100644
--- a/cogl/gl-prototypes/cogl-core-functions.h
+++ b/cogl/gl-prototypes/cogl-core-functions.h
@@ -42,10 +42,6 @@
  * functions are available in core, or 255 if it isn't available in
  * any version.
  *
- * @gles_availability: flags to specify which versions of GLES the
- * functions are available in. Should be a combination of
- * COGL_EXT_IN_GLES and COGL_EXT_IN_GLES2.
- *
  * @extension_suffixes: A zero-separated list of suffixes in a
  * string. These are appended to the extension name to get a complete
  * extension name to try. The suffix is also appended to all of the
@@ -60,7 +56,6 @@
    available */
 COGL_EXT_BEGIN (core,
                 0, 0,
-                COGL_EXT_IN_GLES | COGL_EXT_IN_GLES2,
                 "\0",
                 "\0")
 COGL_EXT_FUNCTION (void, glBindTexture,
diff --git a/cogl/gl-prototypes/cogl-fixed-functions.h b/cogl/gl-prototypes/cogl-fixed-functions.h
index ce7b4e0..59bd6b1 100644
--- a/cogl/gl-prototypes/cogl-fixed-functions.h
+++ b/cogl/gl-prototypes/cogl-fixed-functions.h
@@ -42,10 +42,6 @@
  * functions are available in core, or 255 if it isn't available in
  * any version.
  *
- * @gles_availability: flags to specify which versions of GLES the
- * functions are available in. Should be a combination of
- * COGL_EXT_IN_GLES and COGL_EXT_IN_GLES2.
- *
  * @extension_suffixes: A zero-separated list of suffixes in a
  * string. These are appended to the extension name to get a complete
  * extension name to try. The suffix is also appended to all of the
@@ -60,7 +56,6 @@
    supports fixed-function (ie, GL and GLES1.1) */
 COGL_EXT_BEGIN (fixed_function_core,
                 0, 0,
-                COGL_EXT_IN_GLES,
                 "\0",
                 "\0")
 COGL_EXT_FUNCTION (void, glAlphaFunc,
diff --git a/cogl/gl-prototypes/cogl-glsl-functions.h b/cogl/gl-prototypes/cogl-glsl-functions.h
index 980f8ad..d8491df 100644
--- a/cogl/gl-prototypes/cogl-glsl-functions.h
+++ b/cogl/gl-prototypes/cogl-glsl-functions.h
@@ -42,10 +42,6 @@
  * functions are available in core, or 255 if it isn't available in
  * any version.
  *
- * @gles_availability: flags to specify which versions of GLES the
- * functions are available in. Should be a combination of
- * COGL_EXT_IN_GLES and COGL_EXT_IN_GLES2.
- *
  * @extension_suffixes: A zero-separated list of suffixes in a
  * string. These are appended to the extension name to get a complete
  * extension name to try. The suffix is also appended to all of the
@@ -59,7 +55,6 @@
 /* This lists functions that are unique to GL 2.0 or GLES 2.0 and are
  * not in the old GLSL extensions */
 COGL_EXT_BEGIN (shaders_glsl_2_only, 2, 0,
-                COGL_EXT_IN_GLES2,
                 "\0",
                 "\0")
 COGL_EXT_FUNCTION (GLuint, glCreateProgram,
@@ -109,7 +104,6 @@ COGL_EXT_END ()
 /* These functions are provided by GL_ARB_shader_objects or are in GL
  * 2.0 core */
 COGL_EXT_BEGIN (shader_objects_or_gl2, 2, 0,
-                COGL_EXT_IN_GLES2,
                 "ARB\0",
                 "shader_objects\0")
 COGL_EXT_FUNCTION (void, glShaderSource,
@@ -235,7 +229,6 @@ COGL_EXT_END ()
 /* These functions are provided by GL_ARB_vertex_shader or are in GL
  * 2.0 core */
 COGL_EXT_BEGIN (vertex_shaders, 2, 0,
-                COGL_EXT_IN_GLES2,
                 "ARB\0",
                 "vertex_shader\0")
 COGL_EXT_FUNCTION (void, glVertexAttribPointer,
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index a53c0c7..c463ab5 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -262,12 +262,7 @@ egl_attributes_from_framebuffer_config (CoglDisplay *display,
   attributes[i++] = EGL_DONT_CARE;
 
   attributes[i++] = EGL_RENDERABLE_TYPE;
-  attributes[i++] = ((renderer->driver == COGL_DRIVER_GL ||
-                      renderer->driver == COGL_DRIVER_GL3) ?
-                     EGL_OPENGL_BIT :
-                     renderer->driver == COGL_DRIVER_GLES1 ?
-                     EGL_OPENGL_ES_BIT :
-                     EGL_OPENGL_ES2_BIT);
+  attributes[i++] = EGL_OPENGL_BIT;
 
   attributes[i++] = EGL_SURFACE_TYPE;
   attributes[i++] = EGL_WINDOW_BIT;
@@ -391,12 +386,6 @@ try_create_context (CoglDisplay *display,
       attribs[7] = EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR;
       attribs[8] = EGL_NONE;
     }
-  else if (display->renderer->driver == COGL_DRIVER_GLES2)
-    {
-      attribs[0] = EGL_CONTEXT_CLIENT_VERSION;
-      attribs[1] = 2;
-      attribs[2] = EGL_NONE;
-    }
   else
     attribs[0] = EGL_NONE;
 
@@ -523,14 +512,6 @@ _cogl_winsys_context_init (CoglContext *context, CoglError **error)
       COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_BUFFER_AGE, TRUE);
     }
 
-  /* NB: We currently only support creating standalone GLES2 contexts
-   * for offscreen rendering and so we need a dummy (non-visible)
-   * surface to be able to bind those contexts */
-  if (egl_display->dummy_surface != EGL_NO_SURFACE &&
-      context->driver == COGL_DRIVER_GLES2)
-    COGL_FLAGS_SET (context->features,
-                    COGL_FEATURE_ID_GLES2_CONTEXT, TRUE);
-
   if (egl_renderer->platform_vtable->context_init &&
       !egl_renderer->platform_vtable->context_init (context, error))
     return FALSE;
@@ -550,54 +531,6 @@ _cogl_winsys_context_deinit (CoglContext *context)
   g_free (context->winsys);
 }
 
-typedef struct _CoglGLES2ContextEGL
-{
-  EGLContext egl_context;
-  EGLSurface dummy_surface;
-} CoglGLES2ContextEGL;
-
-static void *
-_cogl_winsys_context_create_gles2_context (CoglContext *ctx, CoglError **error)
-{
-  CoglRendererEGL *egl_renderer = ctx->display->renderer->winsys;
-  CoglDisplayEGL *egl_display = ctx->display->winsys;
-  EGLint attribs[3];
-  EGLContext egl_context;
-
-  attribs[0] = EGL_CONTEXT_CLIENT_VERSION;
-  attribs[1] = 2;
-  attribs[2] = EGL_NONE;
-
-  egl_context = eglCreateContext (egl_renderer->edpy,
-                                  egl_display->egl_config,
-                                  egl_display->egl_context,
-                                  attribs);
-  if (egl_context == EGL_NO_CONTEXT)
-    {
-      _cogl_set_error (error, COGL_WINSYS_ERROR,
-                   COGL_WINSYS_ERROR_CREATE_GLES2_CONTEXT,
-                   "%s", get_error_string ());
-      return NULL;
-    }
-
-  return (void *)egl_context;
-}
-
-static void
-_cogl_winsys_destroy_gles2_context (CoglGLES2Context *gles2_ctx)
-{
-  CoglContext *context = gles2_ctx->context;
-  CoglDisplay *display = context->display;
-  CoglDisplayEGL *egl_display = display->winsys;
-  CoglRenderer *renderer = display->renderer;
-  CoglRendererEGL *egl_renderer = renderer->winsys;
-  EGLContext egl_context = gles2_ctx->winsys;
-
-  _COGL_RETURN_IF_FAIL (egl_display->current_context != egl_context);
-
-  eglDestroyContext (egl_renderer->edpy, egl_context);
-}
-
 static CoglBool
 _cogl_winsys_onscreen_init (CoglOnscreen *onscreen,
                             CoglError **error)
@@ -873,36 +806,6 @@ _cogl_winsys_save_context (CoglContext *ctx)
   egl_context->saved_read_surface = egl_display->current_read_surface;
 }
 
-static CoglBool
-_cogl_winsys_set_gles2_context (CoglGLES2Context *gles2_ctx, CoglError **error)
-{
-  CoglContext *ctx = gles2_ctx->context;
-  CoglDisplayEGL *egl_display = ctx->display->winsys;
-  CoglBool status;
-
-  if (gles2_ctx->write_buffer &&
-      cogl_is_onscreen (gles2_ctx->write_buffer))
-    status =
-      bind_onscreen_with_context (COGL_ONSCREEN (gles2_ctx->write_buffer),
-                                  gles2_ctx->winsys);
-  else
-    status = _cogl_winsys_egl_make_current (ctx->display,
-                                            egl_display->dummy_surface,
-                                            egl_display->dummy_surface,
-                                            gles2_ctx->winsys);
-
-  if (!status)
-    {
-      _cogl_set_error (error,
-                   COGL_WINSYS_ERROR,
-                   COGL_WINSYS_ERROR_MAKE_CURRENT,
-                   "Failed to make gles2 context current");
-      return FALSE;
-    }
-
-  return TRUE;
-}
-
 static void
 _cogl_winsys_restore_context (CoglContext *ctx)
 {
@@ -956,8 +859,7 @@ _cogl_winsys_fence_destroy (CoglContext *context, void *fence)
 
 static CoglWinsysVtable _cogl_winsys_vtable =
   {
-    .constraints = COGL_RENDERER_CONSTRAINT_USES_EGL |
-      COGL_RENDERER_CONSTRAINT_SUPPORTS_COGL_GLES2,
+    .constraints = COGL_RENDERER_CONSTRAINT_USES_EGL,
 
     /* This winsys is only used as a base for the EGL-platform
        winsys's so it does not have an ID or a name */
@@ -969,9 +871,6 @@ static CoglWinsysVtable _cogl_winsys_vtable =
     .display_destroy = _cogl_winsys_display_destroy,
     .context_init = _cogl_winsys_context_init,
     .context_deinit = _cogl_winsys_context_deinit,
-    .context_create_gles2_context =
-      _cogl_winsys_context_create_gles2_context,
-    .destroy_gles2_context = _cogl_winsys_destroy_gles2_context,
     .onscreen_init = _cogl_winsys_onscreen_init,
     .onscreen_deinit = _cogl_winsys_onscreen_deinit,
     .onscreen_bind = _cogl_winsys_onscreen_bind,
@@ -982,9 +881,7 @@ static CoglWinsysVtable _cogl_winsys_vtable =
     .onscreen_update_swap_throttled =
       _cogl_winsys_onscreen_update_swap_throttled,
 
-    /* CoglGLES2Context related methods */
     .save_context = _cogl_winsys_save_context,
-    .set_gles2_context = _cogl_winsys_set_gles2_context,
     .restore_context = _cogl_winsys_restore_context,
 
 #if defined(EGL_KHR_fence_sync) || defined(EGL_KHR_reusable_sync)
diff --git a/cogl/winsys/cogl-winsys-private.h b/cogl/winsys/cogl-winsys-private.h
index 85a67c7..19d537e 100644
--- a/cogl/winsys/cogl-winsys-private.h
+++ b/cogl/winsys/cogl-winsys-private.h
@@ -33,7 +33,6 @@
 
 #include "cogl-renderer.h"
 #include "cogl-onscreen.h"
-#include "cogl-gles2.h"
 
 #ifdef COGL_HAS_XLIB_SUPPORT
 #include "cogl-texture-pixmap-x11-private.h"
@@ -60,7 +59,6 @@ typedef enum { /*< prefix=COGL_WINSYS_ERROR >*/
   COGL_WINSYS_ERROR_CREATE_CONTEXT,
   COGL_WINSYS_ERROR_CREATE_ONSCREEN,
   COGL_WINSYS_ERROR_MAKE_CURRENT,
-  COGL_WINSYS_ERROR_CREATE_GLES2_CONTEXT,
 } CoglWinsysError;
 
 typedef enum
@@ -105,9 +103,6 @@ typedef struct _CoglWinsysVtable
   void
   (*context_deinit) (CoglContext *context);
 
-  void *
-  (*context_create_gles2_context) (CoglContext *ctx, CoglError **error);
-
   CoglBool
   (*onscreen_init) (CoglOnscreen *onscreen, CoglError **error);
 
@@ -170,15 +165,9 @@ typedef struct _CoglWinsysVtable
   void
   (*save_context) (CoglContext *ctx);
 
-  CoglBool
-  (*set_gles2_context) (CoglGLES2Context *gles2_ctx, CoglError **error);
-
   void
   (*restore_context) (CoglContext *ctx);
 
-  void
-  (*destroy_gles2_context) (CoglGLES2Context *gles2_ctx);
-
   void *
   (*fence_add) (CoglContext *ctx);
 
diff --git a/configure.ac b/configure.ac
index 4f3cc22..e8ab487 100644
--- a/configure.ac
+++ b/configure.ac
@@ -523,101 +523,6 @@ GL_LIBRARY_DIRECTLY_LINKED=no
 
 enabled_drivers=""
 
-HAVE_GLES1=0
-AC_ARG_ENABLE(
-  [gles1],
-  [AC_HELP_STRING([--enable-gles1=@<:@no/yes@:>@], [Enable support for OpenGL-ES 1.1 @<:@default=no@:>@])],
-  [],
-  enable_gles1=no
-)
-AS_IF([test "x$enable_gles1" = "xyes"],
-      [
-        enabled_drivers="$enabled_drivers gles1"
-
-        cogl_gl_headers="GLES/gl.h GLES/glext.h"
-
-        AC_DEFINE([HAVE_COGL_GLES], 1, [Have GLES 1.1 for rendering])
-        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GLES CLUTTER_COGL_HAS_GLES"
-        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GLES1"
-        HAVE_GLES1=1
-
-        PKG_CHECK_EXISTS([glesv1_cm],
-          [COGL_PKG_REQUIRES_GL="$COGL_PKG_REQUIRES_GL glesv1_cm"
-           COGL_GLES1_LIBNAME="libGLESv1_CM.so"
-          ],
-          [
-            # We have to check the two headers independently as GLES/glext.h
-            # needs to include GLES/gl.h to have the GL types defined (eg.
-            # GLenum).
-            AC_CHECK_HEADER([GLES/gl.h],
-                            [],
-                            [AC_MSG_ERROR([Unable to locate GLES/gl.h])])
-            AC_CHECK_HEADER([GLES/glext.h],
-                            [],
-                            [AC_MSG_ERROR([Unable to locate GLES/glext.h])],
-                            [#include <GLES/gl.h>])
-
-            # Early implementations provided only a GLES/egl.h while Khronos's
-            # implementer guide now states EGL/egl.h is the One. Some
-            # implementations keep a GLES/egl.h wrapper around EGL/egl.h for
-            # backward compatibility while others provide EGL/egl.h only.
-            AC_CHECK_HEADERS([GLES/egl.h EGL/egl.h])
-
-            AS_IF([test "x$ac_cv_header_GLES_egl_h" = "xyes"],
-                  [COGL_EGL_INCLUDES="#include <GLES/egl.h>"],
-                  [test "x$ac_cv_header_EGL_egl_h" = "xyes"],
-                  [
-                    COGL_EGL_INCLUDES="#include <EGL/egl.h>"
-                  ],
-                  [AC_MSG_ERROR([Unable to locate EGL header])])
-            AC_SUBST([COGL_EGL_INCLUDES])
-
-            AC_CHECK_HEADERS([EGL/eglext.h],
-                             [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDE
-#include <EGL/eglext.h>"],
-                             [],
-                             [$COGL_EGL_INCLUDES])
-
-            # Check for a GLES 1.x Common Profile library with/without EGL.
-            #
-            # Note: historically GLES 1 libraries shipped with the
-            # EGL and GLES symbols all bundled in one library. Now
-            # the Khronos Implementers Guide defines two naming
-            # schemes: -lGLES_CM should be used for a library that
-            # bundles the GLES and EGL API together and -lGLESv1_CM
-            # would be used for a standalone GLES API.
-            AC_CHECK_LIB(GLES_CM, [eglInitialize],
-              [COGL_GLES1_LIBNAME="libGLES_CM.so"],
-              [
-                AC_CHECK_LIB(GLESv1_CM, [glFlush],
-                  [COGL_GLES1_LIBNAME="libGLESv1_CM.so"
-                   NEED_SEPARATE_EGL=yes
-                  ],
-                  [AC_MSG_ERROR([Unable to locate required GLES 1.x Common Profile library])])
-              ])
-
-            EGL_CHECKED=yes
-          ])
-      ])
-
-HAVE_GLES2=0
-AC_ARG_ENABLE(
-  [gles2],
-  [AC_HELP_STRING([--enable-gles2=@<:@no/yes@:>@], [Enable support for OpenGL-ES 2.0 @<:@default=no@:>@])],
-  [],
-  enable_gles2=no
-)
-AS_IF([test "x$enable_gles2" = "xyes"],
-      [
-        enabled_drivers="$enabled_drivers gles2"
-
-        cogl_gl_headers="GLES2/gl2.h GLES2/gl2ext.h"
-        AC_DEFINE([HAVE_COGL_GLES2], 1, [Have GLES 2.0 for rendering])
-        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GLES CLUTTER_COGL_HAS_GLES"
-        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GLES2"
-        HAVE_GLES2=1
-      ])
-
 HAVE_GL=0
 AC_ARG_ENABLE(
   [gl],
@@ -663,22 +568,12 @@ AS_IF([test "x$enable_gl" = "xyes"],
       ])
 
 AM_CONDITIONAL([COGL_DRIVER_GL_SUPPORTED], [test "x$enable_gl" = "xyes"])
-AM_CONDITIONAL([COGL_DRIVER_GLES_SUPPORTED],
-               [test "x$enable_gles1" = "xyes" || test "x$enable_gles2" = "xyes"])
 
 dnl Allow the GL library names and default driver to be overridden with configure options
 AC_ARG_WITH([gl-libname],
             [AS_HELP_STRING([--with-gl-libname],
                             override the name of the GL library to dlopen)],
             [COGL_GL_LIBNAME="$withval"])
-AC_ARG_WITH([gles1-libname],
-            [AS_HELP_STRING([--with-gles1-libname],
-                            override the name of the GLESv1 library to dlopen)],
-            [COGL_GLES1_LIBNAME="$withval"])
-AC_ARG_WITH([gles2-libname],
-            [AS_HELP_STRING([--with-gles2-libname],
-                            override the name of the GLESv2 library to dlopen)],
-            [COGL_GLES2_LIBNAME="$withval"])
 AC_ARG_WITH([default-driver],
             [AS_HELP_STRING([--with-default-driver],
                             specify a default cogl driver)],
@@ -691,10 +586,6 @@ AM_CONDITIONAL(HAVE_COGL_DEFAULT_DRIVER,
 
 AC_SUBST([COGL_GL_LIBNAME])
 AC_SUBST([HAVE_GL])
-AC_SUBST([COGL_GLES1_LIBNAME])
-AC_SUBST([HAVE_GLES1])
-AC_SUBST([COGL_GLES2_LIBNAME])
-AC_SUBST([HAVE_GLES2])
 AC_SUBST([COGL_DEFAULT_DRIVER])
 
 if test "x$GL_LIBRARY_DIRECTLY_LINKED" = "xyes"; then
@@ -702,27 +593,6 @@ if test "x$GL_LIBRARY_DIRECTLY_LINKED" = "xyes"; then
              [Defined if the GL library should not be dlopened])
 fi
 
-AC_ARG_ENABLE(
-  [cogl-gles2],
-  [AC_HELP_STRING([--enable-cogl-gles2=@<:@no/yes@:>@],
-                  [Enable libcogl-gles2 frontend api for OpenGL-ES 2.0 @<:@default=auto@:>@])],
-  [],
-  [
-    AS_IF([test "x$HAVE_GLES2" = "x1"],
-          [enable_cogl_gles2=yes],
-          [enable_cogl_gles2=no])
-  ]
-)
-AS_IF([test "x$enable_cogl_gles2" = "xyes"],
-      [
-        AS_IF([test "x$HAVE_GLES2" != "x1"],
-              [
-                AC_MSG_ERROR([libcogl-gles2 is currently only supported on systems with a native GLES 2.0 
library])
-              ])
-      ])
-AM_CONDITIONAL([BUILD_COGL_GLES2], [test "x$enable_cogl_gles2" = "xyes"])
-
-
 dnl         ========================================================
 dnl         Check window system integration libraries...
 dnl         ========================================================
@@ -806,10 +676,6 @@ AC_ARG_ENABLE(
   [xlib-egl-platform],
   [AC_HELP_STRING([--enable-xlib-egl-platform=@<:@no/yes@:>@], [Enable support for the Xlib egl platform 
@<:@default=auto@:>@])],
   [],
-  AS_IF([test "x$enable_gles1" = "xyes" -o \
-         "x$enable_gles2" = "xyes" && \
-         test $EGL_PLATFORM_COUNT -eq 0],
-        [enable_xlib_egl_platform=yes], [enable_xlib_egl_platform=no])
 )
 AS_IF([test "x$enable_xlib_egl_platform" = "xyes"],
       [
@@ -916,8 +782,6 @@ if test -n "$COGL_PKG_REQUIRES"; then
     for x in $COGL_DEP_GL_LIBS; do
       AS_CASE([$x],
               [-lGL], [],
-              [-lGLESv2], [],
-              [-lGLESv1_CM], [],
               [*], [gl_libs="$gl_libs $x"])
     done
     COGL_DEP_CFLAGS="$COGL_DEP_CFLAGS $COGL_DEP_CFLAGS_GL"
@@ -973,12 +837,6 @@ AC_CHECK_FUNCS([ffs])
 dnl 'memmem' is a GNU extension but we have a simple fallback
 AC_CHECK_FUNCS([memmem])
 
-dnl This is used in the cogl-gles2-gears example but it is a GNU extension
-save_libs="$LIBS"
-LIBS="$LIBS $LIBM"
-AC_CHECK_FUNCS([sincos])
-LIBS="$save_libs"
-
 dnl ================================================================
 dnl Platform values
 dnl ================================================================
@@ -1088,9 +946,6 @@ cogl-pango/cogl-pango.rc
 cogl-path/Makefile
 cogl-path/cogl-path-1.0.pc
 cogl-path/cogl-path-2.0-experimental.pc
-cogl-gles2/Makefile
-cogl-gles2/cogl-gles2-1.0.pc
-cogl-gles2/cogl-gles2-2.0-experimental.pc
 po/Makefile.in
 )
 
@@ -1114,7 +969,6 @@ echo " • Features:"
 echo "        Drivers: ${enabled_drivers}"
 AS_IF([test "x$GL_LIBRARY_DIRECTLY_LINKED" != xyes],
       [for driver in $enabled_drivers; do
-         driver=`echo $driver | tr "[gles]" "[GLES]"`
          libname=`eval echo \\$COGL_${driver}_LIBNAME`
          echo "        Library name for $driver: $libname"
        done])
@@ -1123,7 +977,6 @@ if test "x$SUPPORT_EGL" = "xyes"; then
 echo "        EGL Platforms:${EGL_PLATFORMS}"
 echo "        Wayland compositor support: ${enable_wayland_egl_server}"
 fi
-echo "        Build libcogl-gles2 GLES 2.0 frontend api: ${enable_cogl_gles2}"
 echo "        Image backend: ${COGL_IMAGE_BACKEND}"
 echo "        Cogl Pango: ${enable_cogl_pango}"
 echo "        Cogl Path: ${enable_cogl_path}"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]