[cogl/wip/rig: 32/34] Remove OpenGL ES 1.1 support



commit 91d084f73c14c256d00f95bf767ba0061bdfdbb2
Author: Robert Bragg <robert bragg intel com>
Date:   Wed Mar 19 00:09:21 2014 +0000

    Remove OpenGL ES 1.1 support
    
    We haven't depended on OpenGL ES 1.1 support for years now and if we can
    remove the need to support GL's legacy fixed function apis then we may
    simplify some parts of Cogl.

 Makefile.am                                       |    1 -
 README.in                                         |    2 +-
 cogl/Makefile.am                                  |    1 -
 cogl/Makefile.sources                             |    4 -
 cogl/cogl-context.c                               |   20 ++--
 cogl/cogl-defines.h.win32.in                      |    5 -
 cogl/cogl-defines.h.win32_SDL.in                  |    5 -
 cogl/cogl-feature-private.c                       |    2 -
 cogl/cogl-feature-private.h                       |    5 +-
 cogl/cogl-matrix-stack.c                          |    4 +-
 cogl/cogl-pipeline-private.h                      |   19 ---
 cogl/cogl-pipeline-state.c                        |   11 --
 cogl/cogl-pipeline-state.h                        |    7 +-
 cogl/cogl-renderer.c                              |   16 ---
 cogl/cogl-renderer.h                              |    2 -
 cogl/cogl-texture-3d.c                            |    2 +-
 cogl/driver/gl/cogl-attribute-gl.c                |    4 +-
 cogl/driver/gl/cogl-buffer-gl.c                   |    9 +-
 cogl/driver/gl/cogl-clip-stack-gl.c               |    4 -
 cogl/driver/gl/cogl-pipeline-opengl.c             |   94 ++++++--------
 cogl/driver/gl/cogl-texture-2d-gl.c               |    2 +-
 cogl/driver/gl/gles/cogl-driver-gles.c            |   20 +---
 cogl/driver/gl/gles/cogl-texture-driver-gles.c    |   12 --
 cogl/gl-prototypes/cogl-all-functions.h           |   57 +++++----
 cogl/gl-prototypes/cogl-core-functions.h          |    7 +-
 cogl/gl-prototypes/cogl-fixed-functions.h         |   11 +-
 cogl/gl-prototypes/cogl-gles1-functions.h         |   43 ------
 cogl/gl-prototypes/cogl-gles2-functions.h         |    8 +-
 cogl/gl-prototypes/cogl-glsl-functions.h          |    5 +-
 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 |   87 ++++++++++++-
 cogl/winsys/cogl-winsys-egl.c                     |    2 -
 cogl/winsys/cogl-winsys-sdl.c                     |    6 -
 cogl/winsys/cogl-winsys-sdl2.c                    |   20 +---
 config.h.win32.in                                 |    3 -
 configure.ac                                      |   94 +-------------
 doc/RELEASING                                     |    2 +-
 tests/config.env.in                               |    1 -
 39 files changed, 202 insertions(+), 621 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index ff229dd..a580978 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,7 +34,6 @@ DISTCHECK_CONFIGURE_FLAGS = \
        --enable-gtk-doc \
        --enable-maintainer-flags \
        --enable-profile \
-       --enable-gles1 \
        --enable-gles2 \
        --enable-gl \
        --enable-xlib-egl-platform \
diff --git a/README.in b/README.in
index d6f8779..c8a9210 100644
--- a/README.in
+++ b/README.in
@@ -42,7 +42,7 @@ REQUIREMENTS
 
 Cogl currently only requires:
 
-  • OpenGL ≥ 1.3 (or 1.2 + multitexturing), or OpenGL ES 2.0 (or 1.1)
+  • OpenGL ≥ 1.3 (or 1.2 + multitexturing), or OpenGL ES 2.0
   • GLX, AGL, WGL or an EGL implementation
 
 Cogl also has optional dependencies:
diff --git a/cogl/Makefile.am b/cogl/Makefile.am
index bd1d925..ff1990b 100644
--- a/cogl/Makefile.am
+++ b/cogl/Makefile.am
@@ -30,7 +30,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)
diff --git a/cogl/Makefile.sources b/cogl/Makefile.sources
index 9e340f3..8188805 100644
--- a/cogl/Makefile.sources
+++ b/cogl/Makefile.sources
@@ -66,7 +66,6 @@ cogl_driver_sources = \
 cogl_gl_prototypes_h = \
        gl-prototypes/cogl-gles2-functions.h            \
        gl-prototypes/cogl-core-functions.h             \
-       gl-prototypes/cogl-in-gles-core-functions.h     \
        gl-prototypes/cogl-in-gles2-core-functions.h    \
        gl-prototypes/cogl-glsl-functions.h
 
@@ -265,11 +264,8 @@ cogl_sources_c = \
        cogl-poll-private.h                     \
        cogl-poll.c                             \
        gl-prototypes/cogl-all-functions.h      \
-       gl-prototypes/cogl-gles1-functions.h    \
        gl-prototypes/cogl-gles2-functions.h    \
        gl-prototypes/cogl-core-functions.h     \
-       gl-prototypes/cogl-in-gles-core-functions.h     \
-       gl-prototypes/cogl-in-gles1-core-functions.h    \
        gl-prototypes/cogl-in-gles2-core-functions.h    \
        gl-prototypes/cogl-fixed-functions.h    \
        gl-prototypes/cogl-glsl-functions.h     \
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index 747abd6..e85a6c0 100644
--- a/cogl/cogl-context.c
+++ b/cogl/cogl-context.c
@@ -355,18 +355,18 @@ 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
-     * will be no performance impact if we always leave the test enabled which
-     * makes things a bit simpler for us. Under GLES2 the alpha test is
-     * implemented in the fragment shader so there is no enable for it
-     */
-    GE (context, glEnable (GL_ALPHA_TEST));
-#endif
+    {
+      /* 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
+       * will be no performance impact if we always leave the test enabled which
+       * makes things a bit simpler for us. Under GLES2 the alpha test is
+       * implemented in the fragment shader so there is no enable for it
+       */
+      GE (context, glEnable (GL_ALPHA_TEST));
+    }
 
-#if defined (HAVE_COGL_GL)
   if ((context->driver == COGL_DRIVER_GL3))
     {
       GLuint vertex_array;
diff --git a/cogl/cogl-defines.h.win32.in b/cogl/cogl-defines.h.win32.in
index e374c10..111a9f2 100644
--- a/cogl/cogl-defines.h.win32.in
+++ b/cogl/cogl-defines.h.win32.in
@@ -47,15 +47,10 @@ G_BEGIN_DECLS
 #define CLUTTER_COGL_HAS_GL 1
 
 #ifdef COGL_HAS_EGL_SUPPORT
-#ifdef COGL_HAS_GLES1
-#include <GLES/gl.h>
-#include <GLES/egl.h>
-#else
 #include <EGL/egl.h>
 #define NativeDisplayType EGLNativeDisplayType
 #define NativeWindowType EGLNativeWindowType
 #endif
-#endif
 
 #ifndef GL_OES_EGL_image
 #define GLeglImageOES void *
diff --git a/cogl/cogl-defines.h.win32_SDL.in b/cogl/cogl-defines.h.win32_SDL.in
index a1d5e20..aa1cfa7 100644
--- a/cogl/cogl-defines.h.win32_SDL.in
+++ b/cogl/cogl-defines.h.win32_SDL.in
@@ -48,15 +48,10 @@ G_BEGIN_DECLS
 #define CLUTTER_COGL_HAS_GL 1
 
 #ifdef COGL_HAS_EGL_SUPPORT
-#ifdef COGL_HAS_GLES1
-#include <GLES/gl.h>
-#include <GLES/egl.h>
-#else
 #include <EGL/egl.h>
 #define NativeDisplayType EGLNativeDisplayType
 #define NativeWindowType EGLNativeWindowType
 #endif
-#endif
 
 #ifndef GL_OES_EGL_image
 #define GLeglImageOES void *
diff --git a/cogl/cogl-feature-private.c b/cogl/cogl-feature-private.c
index ebd8438..a3a0e7e 100644
--- a/cogl/cogl-feature-private.c
+++ b/cogl/cogl-feature-private.c
@@ -61,8 +61,6 @@ _cogl_feature_check (CoglRenderer *renderer,
         driver == COGL_DRIVER_GL3) &&
        COGL_CHECK_GL_VERSION (gl_major, gl_minor,
                               data->min_gl_major, data->min_gl_minor)) ||
-      (driver == COGL_DRIVER_GLES1 &&
-       (data->gles_availability & COGL_EXT_IN_GLES)) ||
       (driver == COGL_DRIVER_GLES2 &&
        (data->gles_availability & COGL_EXT_IN_GLES2)))
     {
diff --git a/cogl/cogl-feature-private.h b/cogl/cogl-feature-private.h
index 7f11240..2286ce2 100644
--- a/cogl/cogl-feature-private.h
+++ b/cogl/cogl-feature-private.h
@@ -39,10 +39,11 @@
   ((driver_major) > (target_major) || \
    ((driver_major) == (target_major) && (driver_minor) >= (target_minor)))
 
+/* This is a leftover from when we used to support GLES 1.1, though
+ * we may want to use this to differentiate WebGL later */
 typedef enum
 {
-  COGL_EXT_IN_GLES = (1 << 0),
-  COGL_EXT_IN_GLES2 = (1 << 1)
+  COGL_EXT_IN_GLES2 = (1 << 0)
 } CoglExtGlesAvailability;
 
 typedef struct _CoglFeatureFunction CoglFeatureFunction;
diff --git a/cogl/cogl-matrix-stack.c b/cogl/cogl-matrix-stack.c
index 970f220..7f45158 100644
--- a/cogl/cogl-matrix-stack.c
+++ b/cogl/cogl-matrix-stack.c
@@ -823,7 +823,7 @@ _cogl_matrix_flush_to_gl_builtin (CoglContext *ctx,
 {
   u_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;
@@ -863,7 +863,7 @@ _cogl_matrix_entry_flush_to_gl_builtins (CoglContext *ctx,
 {
   u_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 84e24c2..189b00d 100644
--- a/cogl/cogl-pipeline-private.h
+++ b/cogl/cogl-pipeline-private.h
@@ -73,32 +73,13 @@
 #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 */
 
diff --git a/cogl/cogl-pipeline-state.c b/cogl/cogl-pipeline-state.c
index c053844..bf44d71 100644
--- a/cogl/cogl-pipeline-state.c
+++ b/cogl/cogl-pipeline-state.c
@@ -773,17 +773,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-state.h b/cogl/cogl-pipeline-state.h
index f19241a..90b2330 100644
--- a/cogl/cogl-pipeline-state.h
+++ b/cogl/cogl-pipeline-state.h
@@ -208,10 +208,9 @@ cogl_pipeline_get_alpha_test_reference (CoglPipeline *pipeline);
  *   describing the desired blend function.
  * @error: return location for a #CoglError that may report lack of driver
  *   support if you give separate blend string statements for the alpha
- *   channel and RGB channels since some drivers, or backends such as
- *   GLES 1.1, don't support this feature. May be %NULL, in which case a
- *   warning will be printed out using GLib's logging facilities if an
- *   error is encountered.
+ *   channel and RGB channels since some drivers. May be %NULL, in which case
+ *   an error will cause the program to terminate with an error
+ *   message.
  *
  * If not already familiar; please refer <link linkend="cogl-Blend-Strings">here</link>
  * for an overview of what blend strings are, and their syntax.
diff --git a/cogl/cogl-renderer.c b/cogl/cogl-renderer.c
index 74c1a6a..097d6f2 100644
--- a/cogl/cogl-renderer.c
+++ b/cogl/cogl-renderer.c
@@ -152,20 +152,6 @@ static CoglDriverDescription _cogl_drivers[] =
     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
 #ifdef USING_EMSCRIPTEN
   {
     COGL_DRIVER_WEBGL,
@@ -450,8 +436,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:
diff --git a/cogl/cogl-renderer.h b/cogl/cogl-renderer.h
index b299c6f..5991dd5 100644
--- a/cogl/cogl-renderer.h
+++ b/cogl/cogl-renderer.h
@@ -337,7 +337,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.
  *
@@ -353,7 +352,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-texture-3d.c b/cogl/cogl-texture-3d.c
index fea0031..25e48e6 100644
--- a/cogl/cogl-texture-3d.c
+++ b/cogl/cogl-texture-3d.c
@@ -634,7 +634,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/driver/gl/cogl-attribute-gl.c b/cogl/driver/gl/cogl-attribute-gl.c
index 261dd64..114e687 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;
@@ -103,7 +103,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 332c8c0..1735029 100644
--- a/cogl/driver/gl/cogl-buffer-gl.c
+++ b/cogl/driver/gl/cogl-buffer-gl.c
@@ -103,15 +103,8 @@ update_hints_to_gl_enum (CoglBuffer *buffer)
       return GL_STATIC_DRAW;
     case COGL_BUFFER_UPDATE_HINT_DYNAMIC:
       return GL_DYNAMIC_DRAW;
-
     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;
-#else
-      return GL_DYNAMIC_DRAW;
-#endif
+      return GL_STREAM_DRAW;
     }
 
   u_assert_not_reached ();
diff --git a/cogl/driver/gl/cogl-clip-stack-gl.c b/cogl/driver/gl/cogl-clip-stack-gl.c
index d833031..bc12373 100644
--- a/cogl/driver/gl/cogl-clip-stack-gl.c
+++ b/cogl/driver/gl/cogl-clip-stack-gl.c
@@ -125,10 +125,6 @@ set_clip_plane (CoglFramebuffer *framebuffer,
       u_assert_not_reached ();
       break;
 
-    case COGL_DRIVER_GLES1:
-      GE( ctx, glClipPlanef (plane_num, planef) );
-      break;
-
     case COGL_DRIVER_GL:
     case COGL_DRIVER_GL3:
       planed[0] = planef[0];
diff --git a/cogl/driver/gl/cogl-pipeline-opengl.c b/cogl/driver/gl/cogl-pipeline-opengl.c
index 8ccc87b..460df55 100644
--- a/cogl/driver/gl/cogl-pipeline-opengl.c
+++ b/cogl/driver/gl/cogl-pipeline-opengl.c
@@ -441,9 +441,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 +521,49 @@ _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)
+      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))
         {
-          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 (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))
     {
@@ -750,7 +738,7 @@ get_max_activateable_texture_units (void)
         }
 #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
@@ -895,7 +883,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 decee1c..47f3962 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/driver/gl/gles/cogl-driver-gles.c b/cogl/driver/gl/gles/cogl-driver-gles.c
index 26b57ed..0e676d7 100644
--- a/cogl/driver/gl/gles/cogl-driver-gles.c
+++ b/cogl/driver/gl/gles/cogl-driver-gles.c
@@ -261,17 +261,6 @@ _cogl_driver_update_features (CoglContext *context,
                                      -1 /* GL minor version */,
                                      gl_extensions);
 
-#ifdef HAVE_COGL_GLES
-  if (context->driver == COGL_DRIVER_GLES1)
-    {
-      int max_clip_planes;
-      GE( context, glGetIntegerv (GL_MAX_CLIP_PLANES, &max_clip_planes) );
-      if (max_clip_planes >= 4)
-        COGL_FLAGS_SET (private_features,
-                        COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES, TRUE);
-    }
-#endif
-
   if (context->driver == COGL_DRIVER_GLES2)
     {
       /* Note GLES 2 core doesn't support mipmaps for npot textures or
@@ -289,19 +278,12 @@ _cogl_driver_update_features (CoglContext *context,
       COGL_FLAGS_SET (private_features,
                       COGL_PRIVATE_FEATURE_BLEND_CONSTANT, TRUE);
     }
-  else if (context->driver == COGL_DRIVER_GLES1)
-    {
-      COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_GL_FIXED, TRUE);
-      COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ALPHA_TEST, TRUE);
-      COGL_FLAGS_SET (private_features,
-                      COGL_PRIVATE_FEATURE_BUILTIN_POINT_SIZE_UNIFORM, TRUE);
-    }
 
   COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_VBOS, TRUE);
   COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ANY_GL, TRUE);
   COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ALPHA_TEXTURES, TRUE);
 
-  /* Both GLES 1.1 and GLES 2.0 support point sprites in core */
+  /* GLES 2.0 supports point sprites in core */
   COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_POINT_SPRITE, TRUE);
 
   if (context->glGenRenderbuffers)
diff --git a/cogl/driver/gl/gles/cogl-texture-driver-gles.c b/cogl/driver/gl/gles/cogl-texture-driver-gles.c
index 73c659c..422e0b5 100644
--- a/cogl/driver/gl/gles/cogl-texture-driver-gles.c
+++ b/cogl/driver/gl/gles/cogl-texture-driver-gles.c
@@ -61,18 +61,6 @@
 #define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
 #endif
 
-/* This extension isn't available for GLES 1.1 so these won't be
-   defined */
-#ifndef GL_UNPACK_ROW_LENGTH
-#define GL_UNPACK_ROW_LENGTH 0x0CF2
-#endif
-#ifndef GL_UNPACK_SKIP_ROWS
-#define GL_UNPACK_SKIP_ROWS 0x0CF3
-#endif
-#ifndef GL_UNPACK_SKIP_PIXELS
-#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-#endif
-
 static GLuint
 _cogl_texture_driver_gen (CoglContext *ctx,
                           GLenum gl_target,
diff --git a/cogl/gl-prototypes/cogl-all-functions.h b/cogl/gl-prototypes/cogl-all-functions.h
index b3d7739..8a6d055 100644
--- a/cogl/gl-prototypes/cogl-all-functions.h
+++ b/cogl/gl-prototypes/cogl-all-functions.h
@@ -43,8 +43,9 @@
  * 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.
+ * functions are available in. This is a leftover from when we
+ * supported GLES1 and currently the only value that can go here is
+ * 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
@@ -56,22 +57,14 @@
  * extensions match then it will be used.
  */
 
-/* The functions in this file are part of the core GL,GLES1 and GLES2 apis */
+/* The functions in this file are part of the core GL, and GLES2 apis */
 #include "cogl-core-functions.h"
 
-/* The functions in this file are core to GLES1 only but may also be
- * extensions available for GLES2 and GL */
-#include "cogl-in-gles1-core-functions.h"
-
-/* The functions in this file are core to GLES2 only but
- * may be extensions for GLES1 and GL */
+/* The functions in this file are core to GLES2 only but may be
+ * extensions for GL */
 #include "cogl-in-gles2-core-functions.h"
 
-/* The functions in this file are core to GLES1 and GLES2 but not core
- * to GL but they may be extensions available for GL */
-#include "cogl-in-gles-core-functions.h"
-
-/* These are fixed-function APIs core to GL and GLES1 */
+/* These are fixed-function APIs core to GL */
 #include "cogl-fixed-functions.h"
 
 /* These are GLSL shader APIs core to GL 2.0 and GLES2 */
@@ -114,7 +107,7 @@ COGL_EXT_FUNCTION (GLboolean, glUnmapBuffer,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (texture_3d, 1, 2,
-                0, /* not in either GLES */
+                0, /* not in GLES */
                 "OES\0",
                 "texture_3D\0")
 COGL_EXT_FUNCTION (void, glTexImage3D,
@@ -136,7 +129,7 @@ COGL_EXT_END ()
 
 
 COGL_EXT_BEGIN (offscreen_blit, 3, 0,
-                0, /* not in either GLES */
+                0, /* not in GLES */
                 "EXT\0ANGLE\0",
                 "framebuffer_blit\0")
 COGL_EXT_FUNCTION (void, glBlitFramebuffer,
@@ -154,7 +147,7 @@ COGL_EXT_END ()
 
 /* ARB_fragment_program */
 COGL_EXT_BEGIN (arbfp, 255, 255,
-                0, /* not in either GLES */
+                0, /* not in GLES */
                 "ARB\0",
                 "fragment_program\0")
 COGL_EXT_FUNCTION (void, glGenPrograms,
@@ -178,7 +171,7 @@ COGL_EXT_FUNCTION (void, glProgramLocalParameter4fv,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (EGL_image, 255, 255,
-                0, /* not in either GLES */
+                0, /* not in GLES */
                 "OES\0",
                 "EGL_image\0")
 COGL_EXT_FUNCTION (void, glEGLImageTargetTexture2D,
@@ -190,7 +183,7 @@ COGL_EXT_FUNCTION (void, glEGLImageTargetRenderbufferStorage,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (framebuffer_discard, 255, 255,
-                0, /* not in either GLES */
+                0, /* not in GLES */
                 "EXT\0",
                 "framebuffer_discard\0")
 COGL_EXT_FUNCTION (void, glDiscardFramebuffer,
@@ -200,7 +193,7 @@ COGL_EXT_FUNCTION (void, glDiscardFramebuffer,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (IMG_multisampled_render_to_texture, 255, 255,
-                0, /* not in either GLES */
+                0, /* not in GLES */
                 "\0",
                 "IMG_multisampled_render_to_texture\0")
 COGL_EXT_FUNCTION (void, glRenderbufferStorageMultisampleIMG,
@@ -219,7 +212,7 @@ COGL_EXT_FUNCTION (void, glFramebufferTexture2DMultisampleIMG,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (ARB_sampler_objects, 3, 3,
-                0, /* not in either GLES */
+                0, /* not in GLES */
                 "ARB:\0",
                 "sampler_objects\0")
 COGL_EXT_FUNCTION (void, glGenSamplers,
@@ -241,7 +234,7 @@ 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 */
+                0, /* not in GLES */
                 "ARB\0",
                 "shader_objects\0")
 COGL_EXT_FUNCTION (GLuint, glCreateProgramObject,
@@ -273,7 +266,7 @@ COGL_EXT_FUNCTION (void, glGetAttachedObjects,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (only_gl3, 3, 0,
-                0, /* not in either GLES */
+                0, /* not in GLES */
                 "\0",
                 "\0")
 COGL_EXT_FUNCTION (const GLubyte *, glGetStringi,
@@ -281,7 +274,7 @@ COGL_EXT_FUNCTION (const GLubyte *, glGetStringi,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (vertex_array_object, 3, 0,
-                0, /* not in either GLES */
+                0, /* not in GLES */
                 "ARB\0OES\0",
                 "vertex_array_object\0")
 COGL_EXT_FUNCTION (void, glBindVertexArray,
@@ -295,7 +288,7 @@ COGL_EXT_FUNCTION (void, glGenVertexArrays,
 COGL_EXT_END ()
 
 COGL_EXT_BEGIN (map_region, 3, 0,
-                0, /* not in either GLES */
+                0, /* not in GLES */
                 "ARB:\0",
                 "map_buffer_range\0")
 COGL_EXT_FUNCTION (GLvoid *, glMapBufferRange,
@@ -307,7 +300,7 @@ COGL_EXT_END ()
 
 #ifdef GL_ARB_sync
 COGL_EXT_BEGIN (sync, 3, 2,
-                0, /* not in either GLES */
+                0, /* not in GLES */
                 "ARB:\0",
                 "sync\0")
 COGL_EXT_FUNCTION (GLsync, glFenceSync,
@@ -318,3 +311,15 @@ COGL_EXT_FUNCTION (void, glDeleteSync,
                    (GLsync sync))
 COGL_EXT_END ()
 #endif
+
+/* Note the check for multitexturing is split into two parts because
+ * GLES2 has glActiveTexture() but not glClientActiveTexture()
+ */
+COGL_EXT_BEGIN (multitexture_part1, 1, 3,
+                0, /* not in GLES2 */
+                "ARB\0",
+                "multitexture\0")
+COGL_EXT_FUNCTION (void, glClientActiveTexture,
+                   (GLenum                texture))
+COGL_EXT_END ()
+
diff --git a/cogl/gl-prototypes/cogl-core-functions.h b/cogl/gl-prototypes/cogl-core-functions.h
index 1d0571f..17ade72 100644
--- a/cogl/gl-prototypes/cogl-core-functions.h
+++ b/cogl/gl-prototypes/cogl-core-functions.h
@@ -43,8 +43,9 @@
  * 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.
+ * functions are available in. This is a leftover from when we
+ * supported GLES1 and currently the only value that can go here is
+ * 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
@@ -60,7 +61,7 @@
    available */
 COGL_EXT_BEGIN (core,
                 0, 0,
-                COGL_EXT_IN_GLES | COGL_EXT_IN_GLES2,
+                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 1aeeef8..c5b1fb1 100644
--- a/cogl/gl-prototypes/cogl-fixed-functions.h
+++ b/cogl/gl-prototypes/cogl-fixed-functions.h
@@ -43,8 +43,9 @@
  * 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.
+ * functions are available in. This is a leftover from when we
+ * supported GLES1 and currently the only value that can go here is
+ * 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
@@ -56,11 +57,11 @@
  * extensions match then it will be used.
  */
 
-/* These are the core GL functions which are available when the API
-   supports fixed-function (ie, GL and GLES1.1) */
+/* These are the core GL functions which are available with the GL
+ * compatibility profile */
 COGL_EXT_BEGIN (fixed_function_core,
                 0, 0,
-                COGL_EXT_IN_GLES,
+                0, /* Not in GLES */
                 "\0",
                 "\0")
 COGL_EXT_FUNCTION (void, glAlphaFunc,
diff --git a/cogl/gl-prototypes/cogl-gles2-functions.h b/cogl/gl-prototypes/cogl-gles2-functions.h
index 92bdb23..deafc32 100644
--- a/cogl/gl-prototypes/cogl-gles2-functions.h
+++ b/cogl/gl-prototypes/cogl-gles2-functions.h
@@ -28,15 +28,11 @@
  *
  */
 
-/* The functions in this file are part of the core GL,GLES1 and GLES2 apis */
+/* The functions in this file are part of the core GL and GLES2 apis */
 #include "cogl-core-functions.h"
 
-/* The functions in this file are core to GLES1 and GLES2 but not core
- * to GL but they may be extensions available for GL */
-#include "cogl-in-gles-core-functions.h"
-
 /* The functions in this file are core to GLES2 only but
- * may be extensions for GLES1 and GL */
+ * may be extensions for GL */
 #include "cogl-in-gles2-core-functions.h"
 
 /* These are APIs for using GLSL used by GL and GLES2 */
diff --git a/cogl/gl-prototypes/cogl-glsl-functions.h b/cogl/gl-prototypes/cogl-glsl-functions.h
index b8aebda..9d7e206 100644
--- a/cogl/gl-prototypes/cogl-glsl-functions.h
+++ b/cogl/gl-prototypes/cogl-glsl-functions.h
@@ -43,8 +43,9 @@
  * 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.
+ * functions are available in. This is a leftover from when we
+ * supported GLES1 and currently the only value that can go here is
+ * 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
diff --git a/cogl/gl-prototypes/cogl-in-gles2-core-functions.h 
b/cogl/gl-prototypes/cogl-in-gles2-core-functions.h
index 9942111..b2d19f1 100644
--- a/cogl/gl-prototypes/cogl-in-gles2-core-functions.h
+++ b/cogl/gl-prototypes/cogl-in-gles2-core-functions.h
@@ -43,8 +43,9 @@
  * 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.
+ * functions are available in. This is a leftover from when we
+ * supported GLES1 and currently the only value that can go here is
+ * 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
@@ -169,6 +170,87 @@ COGL_EXT_FUNCTION (void, glShaderBinary,
                     GLenum binaryformat,
                     const GLvoid* binary,
                     GLsizei length))
+COGL_EXT_FUNCTION (void, glDepthRangef,
+                   (GLfloat near_val, GLfloat far_val))
+COGL_EXT_FUNCTION (void, glClearDepthf,
+                   (GLclampf depth))
+COGL_EXT_END ()
+
+/* GL 1.3 and GLES 2.0 apis */
+COGL_EXT_BEGIN (only_in_gles2_and_gl_1_3,
+                1, 3,
+                COGL_EXT_IN_GLES2,
+                "\0",
+                "\0")
+COGL_EXT_FUNCTION (void, glCompressedTexImage2D,
+                   (GLenum target,
+                    GLint level,
+                    GLenum internalformat,
+                    GLsizei width,
+                    GLsizei height,
+                    GLint border,
+                    GLsizei imageSize,
+                    const GLvoid* data))
+COGL_EXT_FUNCTION (void, glCompressedTexSubImage2D,
+                   (GLenum target,
+                    GLint level,
+                    GLint xoffset,
+                    GLint yoffset,
+                    GLsizei width,
+                    GLsizei height,
+                    GLenum format,
+                    GLsizei imageSize,
+                    const GLvoid* data))
+COGL_EXT_FUNCTION (void, glSampleCoverage,
+                   (GLclampf value, GLboolean invert))
+COGL_EXT_END ()
+
+/* Available in GL 1.3, the multitexture extension or GLES2.
+ * Note: this api is a hard requirement for Cogl. */
+COGL_EXT_BEGIN (multitexture_part0, 1, 3,
+                COGL_EXT_IN_GLES2,
+                "ARB\0",
+                "multitexture\0")
+COGL_EXT_FUNCTION (void, glActiveTexture,
+                   (GLenum texture))
+COGL_EXT_END ()
+
+/* GL 1.5 and GLES 2.0 apis */
+COGL_EXT_BEGIN (only_in_gles2_and_gl_1_5,
+                1, 5,
+                COGL_EXT_IN_GLES2,
+                "\0",
+                "\0")
+COGL_EXT_FUNCTION (void, glGetBufferParameteriv,
+                   (GLenum target, GLenum pname, GLint* params))
+COGL_EXT_END ()
+
+
+COGL_EXT_BEGIN (vbos, 1, 5,
+                COGL_EXT_IN_GLES2,
+                "ARB\0",
+                "vertex_buffer_object\0")
+COGL_EXT_FUNCTION (void, glGenBuffers,
+                   (GLsizei             n,
+                    GLuint             *buffers))
+COGL_EXT_FUNCTION (void, glBindBuffer,
+                   (GLenum              target,
+                    GLuint              buffer))
+COGL_EXT_FUNCTION (void, glBufferData,
+                   (GLenum              target,
+                    GLsizeiptr          size,
+                    const GLvoid               *data,
+                    GLenum              usage))
+COGL_EXT_FUNCTION (void, glBufferSubData,
+                   (GLenum              target,
+                    GLintptr            offset,
+                    GLsizeiptr          size,
+                    const GLvoid               *data))
+COGL_EXT_FUNCTION (void, glDeleteBuffers,
+                   (GLsizei             n,
+                    const GLuint               *buffers))
+COGL_EXT_FUNCTION (GLboolean, glIsBuffer,
+                   (GLuint               buffer))
 COGL_EXT_END ()
 
 /* GL and GLES 2.0 apis */
@@ -184,3 +266,4 @@ COGL_EXT_FUNCTION (void, glStencilMaskSeparate,
 COGL_EXT_FUNCTION (void, glStencilOpSeparate,
                    (GLenum face, GLenum fail, GLenum zfail, GLenum zpass))
 COGL_EXT_END ()
+
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index 216bc3a..69a9157 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -263,8 +263,6 @@ egl_attributes_from_framebuffer_config (CoglDisplay *display,
   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_SURFACE_TYPE;
diff --git a/cogl/winsys/cogl-winsys-sdl.c b/cogl/winsys/cogl-winsys-sdl.c
index b36a331..96137e9 100644
--- a/cogl/winsys/cogl-winsys-sdl.c
+++ b/cogl/winsys/cogl-winsys-sdl.c
@@ -190,12 +190,6 @@ _cogl_winsys_display_setup (CoglDisplay *display,
       SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 0);
       break;
 
-    case COGL_DRIVER_GLES1:
-      sdl_display->video_mode_flags = SDL_OPENGLES;
-      SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION, 1);
-      SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 1);
-      break;
-
 #elif defined (USING_EMSCRIPTEN)
     case COGL_DRIVER_GLES2:
       sdl_display->video_mode_flags = SDL_OPENGL;
diff --git a/cogl/winsys/cogl-winsys-sdl2.c b/cogl/winsys/cogl-winsys-sdl2.c
index c7e0289..48588f1 100644
--- a/cogl/winsys/cogl-winsys-sdl2.c
+++ b/cogl/winsys/cogl-winsys-sdl2.c
@@ -166,14 +166,7 @@ _cogl_winsys_display_setup (CoglDisplay *display,
 
   set_gl_attribs_from_framebuffer_config (&display->onscreen_template->config);
 
-  if (display->renderer->driver == COGL_DRIVER_GLES1)
-    {
-      SDL_GL_SetAttribute (SDL_GL_CONTEXT_PROFILE_MASK,
-                           SDL_GL_CONTEXT_PROFILE_ES);
-      SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION, 1);
-      SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 1);
-    }
-  else if (display->renderer->driver == COGL_DRIVER_GLES2)
+  if (display->renderer->driver == COGL_DRIVER_GLES2)
     {
       SDL_GL_SetAttribute (SDL_GL_CONTEXT_PROFILE_MASK,
                            SDL_GL_CONTEXT_PROFILE_ES);
@@ -261,17 +254,6 @@ _cogl_winsys_display_setup (CoglDisplay *display,
         }
       break;
 
-    case COGL_DRIVER_GLES1:
-      if (!u_str_has_prefix (gl_version, "OpenGL ES 1"))
-        {
-          _cogl_set_error (error, COGL_WINSYS_ERROR,
-                           COGL_WINSYS_ERROR_INIT,
-                           "The GLES1 driver was requested but SDL is "
-                           "not using GLES1");
-          goto error;
-        }
-      break;
-
     default:
       u_assert_not_reached ();
     }
diff --git a/config.h.win32.in b/config.h.win32.in
index 9915845..f7df307 100644
--- a/config.h.win32.in
+++ b/config.h.win32.in
@@ -120,9 +120,6 @@
 /* Have GL for rendering */
 #define HAVE_COGL_GL 1
 
-/* Have GLES 1.1 for rendering */
-/*#undef HAVE_COGL_GLES*/
-
 /* Have GLES 2.0 for rendering */
 /*#undef HAVE_COGL_GLES2*/
 
diff --git a/configure.ac b/configure.ac
index e42e96c..7252042 100644
--- a/configure.ac
+++ b/configure.ac
@@ -689,86 +689,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"],
-      [
-        AS_IF([test "x$platform_win32" = "xyes"],
-             [AC_MSG_ERROR([GLES 1 not available for win32])])
-
-        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],
@@ -874,18 +794,13 @@ 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"])
+AM_CONDITIONAL([COGL_DRIVER_GLES_SUPPORTED], [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)],
@@ -902,8 +817,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])
@@ -1030,7 +943,7 @@ AS_IF([test "x$enable_sdl" = "xyes"],
 
                 AS_IF([test "x$SUPPORT_SDL_GLES" = "xyes"],
                       [
-                       SUPPORTED_SDL_GL_APIS="gles1 gles2"
+                       SUPPORTED_SDL_GL_APIS="gles2"
                        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_SDL_GLES_SUPPORT"
                       ],
                       [ SUPPORTED_SDL_GL_APIS="gl" ])
@@ -1216,8 +1129,7 @@ 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" && \
+  AS_IF([test "x$enable_gles2" = "xyes" && \
          test "x$SUPPORT_SDL_GLES" != "xyes" && \
          test "x$SUPPORT_SDL_WEBGL" != "xyes" && \
          test "x$SUPPORT_SDL2" != "xyes" && \
diff --git a/doc/RELEASING b/doc/RELEASING
index df3e4c9..d824257 100644
--- a/doc/RELEASING
+++ b/doc/RELEASING
@@ -21,7 +21,7 @@ When making a new release;
 
  - Run:
 
-     $ ./autogen.sh --enable-gtk-doc --enable-profile --enable-gles1 \
+     $ ./autogen.sh --enable-gtk-doc --enable-profile \
                     --enable-gles2 --enable-gl --enable-xlib-egl-platform \
                     --enable-wayland-egl-platform --enable-glx \
                     --enable-wayland-egl-server --enable-cogl-gst
diff --git a/tests/config.env.in b/tests/config.env.in
index d377756..341dd35 100644
--- a/tests/config.env.in
+++ b/tests/config.env.in
@@ -1,3 +1,2 @@
 HAVE_GL= HAVE_GL@
-HAVE_GLES1= HAVE_GLES1@
 HAVE_GLES2= HAVE_GLES2@


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