diff --git a/cogl/cogl-mutter-config.h.in b/cogl/cogl-mutter-config.h.in index cce8e6512..25652ce55 100644 --- a/cogl/cogl-mutter-config.h.in +++ b/cogl/cogl-mutter-config.h.in @@ -1,8 +1,5 @@ /* Have GL for rendering */ #undef HAVE_COGL_GL -/* Have GLES 1.1 for rendering */ -#undef HAVE_COGL_GLES - /* Have GLES 2.0 for rendering */ #undef HAVE_COGL_GLES2 diff --git a/cogl/cogl/Makefile.am b/cogl/cogl/Makefile.am index 66accf709..fdbdd7b89 100644 --- a/cogl/cogl/Makefile.am +++ b/cogl/cogl/Makefile.am @@ -358,11 +358,9 @@ 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/cogl-context.c b/cogl/cogl/cogl-context.c index 70d220659..5ddbe3e23 100644 --- a/cogl/cogl/cogl-context.c +++ b/cogl/cogl/cogl-context.c @@ -425,7 +425,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) +#ifdef 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 @@ -434,9 +434,7 @@ cogl_context_new (CoglDisplay *display, * implemented in the fragment shader so there is no enable for it */ GE (context, glEnable (GL_ALPHA_TEST)); -#endif -#if defined (HAVE_COGL_GL) if ((context->driver == COGL_DRIVER_GL3)) { GLuint vertex_array; diff --git a/cogl/cogl/cogl-feature-private.c b/cogl/cogl/cogl-feature-private.c index 31b421bdd..29c470c59 100644 --- a/cogl/cogl/cogl-feature-private.c +++ b/cogl/cogl/cogl-feature-private.c @@ -58,9 +58,6 @@ _cogl_feature_check (CoglRenderer *renderer, switch (driver) { - case COGL_DRIVER_GLES1: - gles_availability = COGL_EXT_IN_GLES; - break; case COGL_DRIVER_GLES2: gles_availability = COGL_EXT_IN_GLES2; diff --git a/cogl/cogl/cogl-feature-private.h b/cogl/cogl/cogl-feature-private.h index a342d2333..a16c7772a 100644 --- a/cogl/cogl/cogl-feature-private.h +++ b/cogl/cogl/cogl-feature-private.h @@ -41,7 +41,7 @@ typedef enum { - COGL_EXT_IN_GLES = (1 << 0), + COGL_EXT_IN_GL = (1 << 0), COGL_EXT_IN_GLES2 = (1 << 1), COGL_EXT_IN_GLES3 = (1 << 2) } CoglExtGlesAvailability; diff --git a/cogl/cogl/cogl-matrix-stack.c b/cogl/cogl/cogl-matrix-stack.c index d426e1fa3..3d45ab96e 100644 --- a/cogl/cogl/cogl-matrix-stack.c +++ b/cogl/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) +#ifdef 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) +#ifdef HAVE_COGL_GL { CoglBool needs_flip; CoglMatrixEntryCache *cache; diff --git a/cogl/cogl/cogl-pipeline-private.h b/cogl/cogl/cogl-pipeline-private.h index 845fdd866..9aee69588 100644 --- a/cogl/cogl/cogl-pipeline-private.h +++ b/cogl/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/cogl-pipeline-state.c b/cogl/cogl/cogl-pipeline-state.c index 57eaf5717..0fd41b470 100644 --- a/cogl/cogl/cogl-pipeline-state.c +++ b/cogl/cogl/cogl-pipeline-state.c @@ -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/cogl-renderer.c b/cogl/cogl/cogl-renderer.c index 0152e877f..042110c45 100644 --- a/cogl/cogl/cogl-renderer.c +++ b/cogl/cogl/cogl-renderer.c @@ -67,7 +67,7 @@ extern const CoglTextureDriver _cogl_texture_driver_gl; extern const CoglDriverVtable _cogl_driver_gl; #endif -#if defined (HAVE_COGL_GLES) || defined (HAVE_COGL_GLES2) +#if defined (HAVE_COGL_GLES2) extern const CoglTextureDriver _cogl_texture_driver_gles; extern const CoglDriverVtable _cogl_driver_gles; #endif @@ -130,20 +130,6 @@ static CoglDriverDescription _cogl_drivers[] = &_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, @@ -401,8 +387,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/cogl-renderer.h b/cogl/cogl/cogl-renderer.h index 8dbf199c8..7a7ba2e9f 100644 --- a/cogl/cogl/cogl-renderer.h +++ b/cogl/cogl/cogl-renderer.h @@ -347,7 +347,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/cogl-texture-3d.c b/cogl/cogl/cogl-texture-3d.c index 5644119d7..f177b0edf 100644 --- a/cogl/cogl/cogl-texture-3d.c +++ b/cogl/cogl/cogl-texture-3d.c @@ -641,7 +641,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) +#ifdef 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/deprecated/cogl-program.c b/cogl/cogl/deprecated/cogl-program.c index fbf4f2c46..7115a6749 100644 --- a/cogl/cogl/deprecated/cogl-program.c +++ b/cogl/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/cogl/driver/gl/cogl-attribute-gl.c b/cogl/cogl/driver/gl/cogl-attribute-gl.c index 0599049f0..96873d5ac 100644 --- a/cogl/cogl/driver/gl/cogl-attribute-gl.c +++ b/cogl/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) +#ifdef 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) +#ifdef HAVE_COGL_GL { CoglBool enabled = _cogl_bitmask_get (state->new_bits, bit_num); diff --git a/cogl/cogl/driver/gl/cogl-buffer-gl.c b/cogl/cogl/driver/gl/cogl-buffer-gl.c index f3c134a9c..98300cf15 100644 --- a/cogl/cogl/driver/gl/cogl-buffer-gl.c +++ b/cogl/cogl/driver/gl/cogl-buffer-gl.c @@ -107,8 +107,7 @@ 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; + return GL_STREAM_DRAW; #else return GL_DYNAMIC_DRAW; #endif diff --git a/cogl/cogl/driver/gl/cogl-clip-stack-gl.c b/cogl/cogl/driver/gl/cogl-clip-stack-gl.c index 5c77e07b6..191214b57 100644 --- a/cogl/cogl/driver/gl/cogl-clip-stack-gl.c +++ b/cogl/cogl/driver/gl/cogl-clip-stack-gl.c @@ -125,10 +125,6 @@ set_clip_plane (CoglFramebuffer *framebuffer, g_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/cogl/driver/gl/cogl-pipeline-fragend-fixed.c b/cogl/cogl/driver/gl/cogl-pipeline-fragend-fixed.c index b529122e4..e8e099ecd 100644 --- a/cogl/cogl/driver/gl/cogl-pipeline-fragend-fixed.c +++ b/cogl/cogl/driver/gl/cogl-pipeline-fragend-fixed.c @@ -390,19 +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 */ diff --git a/cogl/cogl/driver/gl/cogl-pipeline-opengl.c b/cogl/cogl/driver/gl/cogl-pipeline-opengl.c index 178269646..23c81047d 100644 --- a/cogl/cogl/driver/gl/cogl-pipeline-opengl.c +++ b/cogl/cogl/driver/gl/cogl-pipeline-opengl.c @@ -438,8 +438,7 @@ 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 || + 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)) @@ -520,59 +519,51 @@ _cogl_pipeline_flush_color_blend_alpha_depth_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 (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 defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES) + 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)); + } +#endif + +#ifdef HAVE_COGL_GL if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_ALPHA_TEST)) { @@ -769,7 +760,7 @@ get_max_activateable_texture_units (void) } #endif -#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES) +#ifdef 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 @@ -914,7 +905,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) +#ifdef 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/cogl/driver/gl/cogl-texture-2d-gl.c b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c index d1eff4507..218b6d5a9 100644 --- a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c +++ b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c @@ -721,7 +721,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) +#ifdef HAVE_COGL_GL else { _cogl_bind_gl_texture_transient (GL_TEXTURE_2D, diff --git a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c index 521f6ef3d..346d4e36d 100644 --- a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c +++ b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c @@ -309,44 +309,23 @@ _cogl_driver_update_features (CoglContext *context, gl_minor, 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 + flags |= COGL_FEATURE_SHADERS_GLSL | COGL_FEATURE_OFFSCREEN; + /* Note GLES 2 core doesn't support mipmaps for npot textures or + * repeat modes other than CLAMP_TO_EDGE. */ + flags |= COGL_FEATURE_TEXTURE_NPOT_BASIC; + flags |= COGL_FEATURE_DEPTH_RANGE; + COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_GLSL, TRUE); + COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_OFFSCREEN, TRUE); + COGL_FLAGS_SET (context->features, + COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, TRUE); + COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_DEPTH_RANGE, TRUE); + COGL_FLAGS_SET (context->features, + COGL_FEATURE_ID_MIRRORED_REPEAT, TRUE); + COGL_FLAGS_SET (context->features, + COGL_FEATURE_ID_PER_VERTEX_POINT_SIZE, TRUE); - if (context->driver == COGL_DRIVER_GLES2) - { - flags |= COGL_FEATURE_SHADERS_GLSL | COGL_FEATURE_OFFSCREEN; - /* Note GLES 2 core doesn't support mipmaps for npot textures or - * repeat modes other than CLAMP_TO_EDGE. */ - flags |= COGL_FEATURE_TEXTURE_NPOT_BASIC; - flags |= COGL_FEATURE_DEPTH_RANGE; - COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_GLSL, TRUE); - COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_OFFSCREEN, TRUE); - COGL_FLAGS_SET (context->features, - COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, TRUE); - COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_DEPTH_RANGE, TRUE); - COGL_FLAGS_SET (context->features, - COGL_FEATURE_ID_MIRRORED_REPEAT, TRUE); - COGL_FLAGS_SET (context->features, - COGL_FEATURE_ID_PER_VERTEX_POINT_SIZE, TRUE); - - 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_BLEND_CONSTANT, TRUE); COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_VBOS, TRUE); COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ANY_GL, TRUE); diff --git a/cogl/cogl/gl-prototypes/cogl-all-functions.h b/cogl/cogl/gl-prototypes/cogl-all-functions.h index 0c80fbcd2..0e71ae81f 100644 --- a/cogl/cogl/gl-prototypes/cogl-all-functions.h +++ b/cogl/cogl/gl-prototypes/cogl-all-functions.h @@ -59,10 +59,6 @@ /* The functions in this file are part of the core GL,GLES1 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 */ #include "cogl-in-gles2-core-functions.h" @@ -334,3 +330,11 @@ COGL_EXT_BEGIN (robustness, 255, 255, COGL_EXT_FUNCTION (GLenum, glGetGraphicsResetStatus, (void)) COGL_EXT_END () + +COGL_EXT_BEGIN (multitexture_part1, 1, 3, + 0, + "ARB\0", + "multitexture\0") +COGL_EXT_FUNCTION (void, glClientActiveTexture, + (GLenum texture)) +COGL_EXT_END () diff --git a/cogl/cogl/gl-prototypes/cogl-core-functions.h b/cogl/cogl/gl-prototypes/cogl-core-functions.h index f37041b7b..dee9605f7 100644 --- a/cogl/cogl/gl-prototypes/cogl-core-functions.h +++ b/cogl/cogl/gl-prototypes/cogl-core-functions.h @@ -60,7 +60,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/cogl/gl-prototypes/cogl-fixed-functions.h b/cogl/cogl/gl-prototypes/cogl-fixed-functions.h index ce7b4e0de..5c11fedf4 100644 --- a/cogl/cogl/gl-prototypes/cogl-fixed-functions.h +++ b/cogl/cogl/gl-prototypes/cogl-fixed-functions.h @@ -60,7 +60,7 @@ supports fixed-function (ie, GL and GLES1.1) */ COGL_EXT_BEGIN (fixed_function_core, 0, 0, - COGL_EXT_IN_GLES, + 0, "\0", "\0") COGL_EXT_FUNCTION (void, glAlphaFunc, diff --git a/cogl/cogl/gl-prototypes/cogl-gles1-functions.h b/cogl/cogl/gl-prototypes/cogl-gles1-functions.h deleted file mode 100644 index 774b9b33b..000000000 --- a/cogl/cogl/gl-prototypes/cogl-gles1-functions.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Cogl - * - * A Low Level GPU Graphics and Utilities API - * - * Copyright (C) 2009, 2011 Intel Corporation. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * - */ - -/* The functions in this file are part of the core GL,GLES1 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 GLES1 only but - * may be extensions for GLES2 and GL */ -#include "cogl-in-gles1-core-functions.h" - -/* These are fixed-function APIs core to GL and GLES1 */ -#include "cogl-fixed-functions.h" diff --git a/cogl/cogl/gl-prototypes/cogl-in-gles-core-functions.h b/cogl/cogl/gl-prototypes/cogl-in-gles-core-functions.h index 5679e7221..7057bf2f6 100644 --- a/cogl/cogl/gl-prototypes/cogl-in-gles-core-functions.h +++ b/cogl/cogl/gl-prototypes/cogl-in-gles-core-functions.h @@ -58,7 +58,6 @@ COGL_EXT_BEGIN (only_in_both_gles, 4, 1, - COGL_EXT_IN_GLES | COGL_EXT_IN_GLES2, "ARB\0", "ES2_compatibility\0") @@ -70,7 +69,6 @@ COGL_EXT_END () COGL_EXT_BEGIN (only_in_both_gles_and_gl_1_3, 1, 3, - COGL_EXT_IN_GLES | COGL_EXT_IN_GLES2, "\0", "\0") @@ -99,7 +97,6 @@ COGL_EXT_END () COGL_EXT_BEGIN (only_in_both_gles_and_gl_1_5, 1, 5, - COGL_EXT_IN_GLES | COGL_EXT_IN_GLES2, "\0", "\0") @@ -108,7 +105,6 @@ COGL_EXT_FUNCTION (void, glGetBufferParameteriv, COGL_EXT_END () COGL_EXT_BEGIN (vbos, 1, 5, - COGL_EXT_IN_GLES | COGL_EXT_IN_GLES2, "ARB\0", "vertex_buffer_object\0") @@ -138,7 +134,6 @@ COGL_EXT_END () /* Available in GL 1.3, the multitexture extension or GLES. These are required */ COGL_EXT_BEGIN (multitexture_part0, 1, 3, - COGL_EXT_IN_GLES | COGL_EXT_IN_GLES2, "ARB\0", "multitexture\0") diff --git a/cogl/cogl/gl-prototypes/cogl-in-gles1-core-functions.h b/cogl/cogl/gl-prototypes/cogl-in-gles1-core-functions.h deleted file mode 100644 index 20dc1a81f..000000000 --- a/cogl/cogl/gl-prototypes/cogl-in-gles1-core-functions.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Cogl - * - * A Low Level GPU Graphics and Utilities API - * - * Copyright (C) 2009, 2011 Intel Corporation. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * - */ - -/* This is included multiple times with different definitions for - * these macros. The macros are given the following arguments: - * - * COGL_EXT_BEGIN: - * - * @name: a unique symbol name for this feature - * - * @min_gl_major: the major part of the minimum GL version where these - * functions are available in core, or 255 if it isn't available in - * any version. - * @min_gl_minor: the minor part of the minimum GL version where these - * 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 - * function names. The suffix can optionally include a ':' to specify - * an alternate suffix for the function names. - * - * @extension_names: A list of extension names to try. If any of these - * extensions match then it will be used. - */ - -/* These functions are only available in GLES and are used as - replacements for some GL equivalents that only accept double - arguments */ -COGL_EXT_BEGIN (only_in_gles1, - 255, 255, - COGL_EXT_IN_GLES, - "\0", - "\0") -COGL_EXT_FUNCTION (void, glClipPlanef, - (GLenum plane, const GLfloat *equation)) -COGL_EXT_END () - -COGL_EXT_BEGIN (multitexture_part1, 1, 3, - COGL_EXT_IN_GLES, - "ARB\0", - "multitexture\0") -COGL_EXT_FUNCTION (void, glClientActiveTexture, - (GLenum texture)) -COGL_EXT_END () - diff --git a/cogl/cogl/winsys/cogl-winsys-egl.c b/cogl/cogl/winsys/cogl-winsys-egl.c index 73648f663..b785e9c91 100644 --- a/cogl/cogl/winsys/cogl-winsys-egl.c +++ b/cogl/cogl/winsys/cogl-winsys-egl.c @@ -265,8 +265,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); if (config->samples_per_pixel) diff --git a/cogl/configure.ac b/cogl/configure.ac index 3a935b040..e38fde9a7 100644 --- a/cogl/configure.ac +++ b/cogl/configure.ac @@ -405,83 +405,6 @@ EGL_CHECKED=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 ]) - - # 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 "], - [test "x$ac_cv_header_EGL_egl_h" = "xyes"], - [ - COGL_EGL_INCLUDES="#include " - ], - [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 "], - [], - [$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], @@ -560,10 +483,6 @@ 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)], @@ -580,8 +499,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]) diff --git a/cogl/tests/config.env.in b/cogl/tests/config.env.in index d3777565d..341dd35cf 100644 --- a/cogl/tests/config.env.in +++ b/cogl/tests/config.env.in @@ -1,3 +1,2 @@ HAVE_GL=@HAVE_GL@ -HAVE_GLES1=@HAVE_GLES1@ HAVE_GLES2=@HAVE_GLES2@ diff --git a/src/backends/x11/meta-renderer-x11.c b/src/backends/x11/meta-renderer-x11.c index bb52d3caf..07a64a56e 100644 --- a/src/backends/x11/meta-renderer-x11.c +++ b/src/backends/x11/meta-renderer-x11.c @@ -50,7 +50,6 @@ get_x11_cogl_winsys_vtable (CoglRenderer *renderer) switch (renderer->driver) { - case COGL_DRIVER_GLES1: case COGL_DRIVER_GLES2: return _cogl_winsys_egl_xlib_get_vtable (); case COGL_DRIVER_GL: