From 987e3c32dc733b5f6942a10651750080730272e6 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Tue, 23 Nov 2010 14:51:49 +0000 Subject: [PATCH] Disable the fixed function backend for GLES2 GLES2 doesn't really support fixed function so if we disable it we can remove the fixed function wrappers from the GLES2 Cogl backend. --- clutter/cogl/cogl/cogl-pipeline-fixed.c | 11 ----------- clutter/cogl/cogl/cogl-pipeline-private.h | 4 +--- clutter/cogl/cogl/cogl-pipeline.c | 2 ++ 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/clutter/cogl/cogl/cogl-pipeline-fixed.c b/clutter/cogl/cogl/cogl-pipeline-fixed.c index 11337b7..f925b1d 100644 --- a/clutter/cogl/cogl/cogl-pipeline-fixed.c +++ b/clutter/cogl/cogl/cogl-pipeline-fixed.c @@ -47,10 +47,6 @@ #include #include -#ifdef HAVE_COGL_GLES2 -#include "../gles/cogl-gles2-wrapper.h" -#endif - const CoglPipelineBackend _cogl_pipeline_fixed_backend; static int @@ -235,13 +231,6 @@ _cogl_pipeline_backend_fixed_end (CoglPipeline *pipeline, GE (glDisable (GL_FOG)); } -#ifdef HAVE_COGL_GLES2 - /* Let the GLES2 backend know that we're not using a user shader - anymore. This is a massive hack but it will go away once the GLSL - backend replaces the GLES2 wrapper */ - _cogl_gles2_use_program (0); -#endif - return TRUE; } diff --git a/clutter/cogl/cogl/cogl-pipeline-private.h b/clutter/cogl/cogl/cogl-pipeline-private.h index 6e07884..e05ace0 100644 --- a/clutter/cogl/cogl/cogl-pipeline-private.h +++ b/clutter/cogl/cogl/cogl-pipeline-private.h @@ -56,10 +56,8 @@ typedef struct _CoglPipelineLayer CoglPipelineLayer; #define COGL_PIPELINE_BACKEND_GLSL 0 #define COGL_PIPELINE_BACKEND_GLSL_MASK (1L<<0) -#define COGL_PIPELINE_BACKEND_FIXED 1 -#define COGL_PIPELINE_BACKEND_FIXED_MASK (1L<<1) -#define COGL_PIPELINE_N_BACKENDS 2 +#define COGL_PIPELINE_N_BACKENDS 1 #else /* HAVE_COGL_GLES */ diff --git a/clutter/cogl/cogl/cogl-pipeline.c b/clutter/cogl/cogl/cogl-pipeline.c index e04ff9c..1ec8647 100644 --- a/clutter/cogl/cogl/cogl-pipeline.c +++ b/clutter/cogl/cogl/cogl-pipeline.c @@ -1173,8 +1173,10 @@ _cogl_pipeline_pre_change_notify (CoglPipeline *pipeline, * code in response to a pipeline change therefore we don't want to * try searching for another backend when the pipeline changes. */ +#ifdef COGL_PIPELINE_BACKEND_FIXED if (pipeline->backend == COGL_PIPELINE_BACKEND_FIXED) _cogl_pipeline_set_backend (pipeline, COGL_PIPELINE_BACKEND_UNDEFINED); +#endif if (pipeline->backend != COGL_PIPELINE_BACKEND_UNDEFINED && _cogl_pipeline_backends[pipeline->backend]->pipeline_pre_change_notify) -- 2.7.4