From 4e1d08d59e65fd06a3fa10e2be147fc290e430af Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Thu, 25 Aug 2011 14:18:01 +0100 Subject: [PATCH] pipeline: Remove unsused get_max_texture_image_units() This function was not used in the opengl pipeline, probably because of the more precise get_max_activable_texture_units(). Remove it then. https://bugzilla.gnome.org/show_bug.cgi?id=657347 Reviewed-by: Robert Bragg --- cogl/cogl-context.c | 1 - cogl/cogl-pipeline-opengl.c | 20 -------------------- cogl/cogl-pipeline-private.h | 5 ----- 3 files changed, 26 deletions(-) diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c index aa8bae85d..71e912d2b 100644 --- a/cogl/cogl-context.c +++ b/cogl/cogl-context.c @@ -269,7 +269,6 @@ cogl_context_new (CoglDisplay *display, _cogl_bitmask_init (&context->arrays_to_change); context->max_texture_units = -1; - context->max_texture_image_units = -1; context->max_activateable_texture_units = -1; context->current_program = COGL_INVALID_HANDLE; diff --git a/cogl/cogl-pipeline-opengl.c b/cogl/cogl-pipeline-opengl.c index 874b82ec1..28693e604 100644 --- a/cogl/cogl-pipeline-opengl.c +++ b/cogl/cogl-pipeline-opengl.c @@ -387,26 +387,6 @@ _cogl_use_vertex_program (GLuint gl_program, CoglPipelineProgramType type) ctx->current_vertex_program_type = type; } -#if defined (COGL_PIPELINE_FRAGEND_GLSL) || \ - defined (COGL_PIPELINE_FRAGEND_ARBFP) -int -_cogl_get_max_texture_image_units (void) -{ - _COGL_GET_CONTEXT (ctx, 0); - - /* This function is called quite often so we cache the value to - avoid too many GL calls */ - if (G_UNLIKELY (ctx->max_texture_image_units == -1)) - { - ctx->max_texture_image_units = 1; - GE (ctx, glGetIntegerv (GL_MAX_TEXTURE_IMAGE_UNITS, - &ctx->max_texture_image_units)); - } - - return ctx->max_texture_image_units; -} -#endif - #if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL) static gboolean diff --git a/cogl/cogl-pipeline-private.h b/cogl/cogl-pipeline-private.h index 41f73ab80..6e8fc359d 100644 --- a/cogl/cogl-pipeline-private.h +++ b/cogl/cogl-pipeline-private.h @@ -916,11 +916,6 @@ typedef struct _CoglPipelineFlushOptions CoglHandle layer0_override_texture; } CoglPipelineFlushOptions; - -int -_cogl_get_max_texture_image_units (void); - - void _cogl_use_fragment_program (GLuint gl_program, CoglPipelineProgramType type);