Skip to content

Commit 3cb6bc5

Browse files
committed
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.
1 parent 0ca9c3b commit 3cb6bc5

39 files changed

+203
-611
lines changed

Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ DISTCHECK_CONFIGURE_FLAGS = \
3434
--enable-gtk-doc \
3535
--enable-maintainer-flags \
3636
--enable-profile \
37-
--enable-gles1 \
3837
--enable-gles2 \
3938
--enable-gl \
4039
--enable-xlib-egl-platform \

README.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ REQUIREMENTS
4242

4343
Cogl currently only requires:
4444

45-
• OpenGL ≥ 1.3 (or 1.2 + multitexturing), or OpenGL ES 2.0 (or 1.1)
45+
• OpenGL ≥ 1.3 (or 1.2 + multitexturing), or OpenGL ES 2.0
4646
• GLX, AGL, WGL or an EGL implementation
4747

4848
Cogl also has optional dependencies:

cogl/Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ AM_CPPFLAGS += \
3030
-DG_LOG_DOMAIN=\"Cogl\" \
3131
-DCOGL_COMPILATION \
3232
-DCOGL_GL_LIBNAME=\"$(COGL_GL_LIBNAME)\" \
33-
-DCOGL_GLES1_LIBNAME=\"$(COGL_GLES1_LIBNAME)\" \
3433
-DCOGL_GLES2_LIBNAME=\"$(COGL_GLES2_LIBNAME)\" \
3534
-DCOGL_LOCALEDIR=\""$(localedir)"\" \
3635
$(NULL)

cogl/Makefile.sources

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ cogl_driver_sources = \
6666
cogl_gl_prototypes_h = \
6767
gl-prototypes/cogl-gles2-functions.h \
6868
gl-prototypes/cogl-core-functions.h \
69-
gl-prototypes/cogl-in-gles-core-functions.h \
7069
gl-prototypes/cogl-in-gles2-core-functions.h \
7170
gl-prototypes/cogl-glsl-functions.h
7271

@@ -265,11 +264,8 @@ cogl_sources_c = \
265264
cogl-poll-private.h \
266265
cogl-poll.c \
267266
gl-prototypes/cogl-all-functions.h \
268-
gl-prototypes/cogl-gles1-functions.h \
269267
gl-prototypes/cogl-gles2-functions.h \
270268
gl-prototypes/cogl-core-functions.h \
271-
gl-prototypes/cogl-in-gles-core-functions.h \
272-
gl-prototypes/cogl-in-gles1-core-functions.h \
273269
gl-prototypes/cogl-in-gles2-core-functions.h \
274270
gl-prototypes/cogl-fixed-functions.h \
275271
gl-prototypes/cogl-glsl-functions.h \

cogl/cogl-context.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -355,18 +355,18 @@ cogl_context_new (CoglDisplay *display,
355355
context->texture_download_pipeline = NULL;
356356
context->blit_texture_pipeline = NULL;
357357

358-
#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
358+
#if defined (HAVE_COGL_GL)
359359
if (_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_ALPHA_TEST))
360-
/* The default for GL_ALPHA_TEST is to always pass which is equivalent to
361-
* the test being disabled therefore we assume that for all drivers there
362-
* will be no performance impact if we always leave the test enabled which
363-
* makes things a bit simpler for us. Under GLES2 the alpha test is
364-
* implemented in the fragment shader so there is no enable for it
365-
*/
366-
GE (context, glEnable (GL_ALPHA_TEST));
367-
#endif
360+
{
361+
/* The default for GL_ALPHA_TEST is to always pass which is equivalent to
362+
* the test being disabled therefore we assume that for all drivers there
363+
* will be no performance impact if we always leave the test enabled which
364+
* makes things a bit simpler for us. Under GLES2 the alpha test is
365+
* implemented in the fragment shader so there is no enable for it
366+
*/
367+
GE (context, glEnable (GL_ALPHA_TEST));
368+
}
368369

369-
#if defined (HAVE_COGL_GL)
370370
if ((context->driver == COGL_DRIVER_GL3))
371371
{
372372
GLuint vertex_array;

cogl/cogl-defines.h.win32.in

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,10 @@ G_BEGIN_DECLS
4747
#define CLUTTER_COGL_HAS_GL 1
4848

4949
#ifdef COGL_HAS_EGL_SUPPORT
50-
#ifdef COGL_HAS_GLES1
51-
#include <GLES/gl.h>
52-
#include <GLES/egl.h>
53-
#else
5450
#include <EGL/egl.h>
5551
#define NativeDisplayType EGLNativeDisplayType
5652
#define NativeWindowType EGLNativeWindowType
5753
#endif
58-
#endif
5954

6055
#ifndef GL_OES_EGL_image
6156
#define GLeglImageOES void *

cogl/cogl-defines.h.win32_SDL.in

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,10 @@ G_BEGIN_DECLS
4848
#define CLUTTER_COGL_HAS_GL 1
4949

5050
#ifdef COGL_HAS_EGL_SUPPORT
51-
#ifdef COGL_HAS_GLES1
52-
#include <GLES/gl.h>
53-
#include <GLES/egl.h>
54-
#else
5551
#include <EGL/egl.h>
5652
#define NativeDisplayType EGLNativeDisplayType
5753
#define NativeWindowType EGLNativeWindowType
5854
#endif
59-
#endif
6055

6156
#ifndef GL_OES_EGL_image
6257
#define GLeglImageOES void *

cogl/cogl-feature-private.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ _cogl_feature_check (CoglRenderer *renderer,
6161
driver == COGL_DRIVER_GL3) &&
6262
COGL_CHECK_GL_VERSION (gl_major, gl_minor,
6363
data->min_gl_major, data->min_gl_minor)) ||
64-
(driver == COGL_DRIVER_GLES1 &&
65-
(data->gles_availability & COGL_EXT_IN_GLES)) ||
6664
(driver == COGL_DRIVER_GLES2 &&
6765
(data->gles_availability & COGL_EXT_IN_GLES2)))
6866
{

cogl/cogl-feature-private.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@
3939
((driver_major) > (target_major) || \
4040
((driver_major) == (target_major) && (driver_minor) >= (target_minor)))
4141

42+
/* This is a leftover from when we used to support GLES 1.1, though
43+
* we may want to use this to differentiate WebGL later */
4244
typedef enum
4345
{
44-
COGL_EXT_IN_GLES = (1 << 0),
45-
COGL_EXT_IN_GLES2 = (1 << 1)
46+
COGL_EXT_IN_GLES2 = (1 << 0)
4647
} CoglExtGlesAvailability;
4748

4849
typedef struct _CoglFeatureFunction CoglFeatureFunction;

cogl/cogl-matrix-stack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ _cogl_matrix_flush_to_gl_builtin (CoglContext *ctx,
823823
{
824824
u_assert (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED));
825825

826-
#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
826+
#if defined (HAVE_COGL_GL)
827827
if (ctx->flushed_matrix_mode != mode)
828828
{
829829
GLenum gl_mode = 0;
@@ -863,7 +863,7 @@ _cogl_matrix_entry_flush_to_gl_builtins (CoglContext *ctx,
863863
{
864864
u_assert (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED));
865865

866-
#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
866+
#if defined (HAVE_COGL_GL)
867867
{
868868
CoglBool needs_flip;
869869
CoglMatrixEntryCache *cache;

0 commit comments

Comments
 (0)