From e84dbd7faf59424626dc5ca589da288b0ce01c29 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 29 Oct 2019 14:38:49 -0400 Subject: [PATCH] cogl: Remove unused CoglPipelineLightingState https://gitlab.gnome.org/GNOME/mutter/merge_requests/904 --- cogl/cogl/cogl-pipeline-private.h | 20 -------------------- cogl/cogl/cogl-pipeline.c | 24 ------------------------ 2 files changed, 44 deletions(-) diff --git a/cogl/cogl/cogl-pipeline-private.h b/cogl/cogl/cogl-pipeline-private.h index 09f1af549..59f043b67 100644 --- a/cogl/cogl/cogl-pipeline-private.h +++ b/cogl/cogl/cogl-pipeline-private.h @@ -190,25 +190,6 @@ typedef enum _CoglPipelineState COGL_PIPELINE_STATE_VERTEX_SNIPPETS | \ COGL_PIPELINE_STATE_FRAGMENT_SNIPPETS) -typedef enum -{ - COGL_PIPELINE_LIGHTING_STATE_PROPERTY_AMBIENT = 1, - COGL_PIPELINE_LIGHTING_STATE_PROPERTY_DIFFUSE, - COGL_PIPELINE_LIGHTING_STATE_PROPERTY_SPECULAR, - COGL_PIPELINE_LIGHTING_STATE_PROPERTY_EMISSION, - COGL_PIPELINE_LIGHTING_STATE_PROPERTY_SHININESS -} CoglPipelineLightingStateProperty; - -typedef struct -{ - /* Standard OpenGL lighting model attributes */ - float ambient[4]; - float diffuse[4]; - float specular[4]; - float emission[4]; - float shininess; -} CoglPipelineLightingState; - typedef struct { /* Determines what fragments are discarded based on their alpha */ @@ -261,7 +242,6 @@ typedef struct typedef struct { - CoglPipelineLightingState lighting_state; CoglPipelineAlphaFuncState alpha_state; CoglPipelineBlendState blend_state; CoglHandle user_program; diff --git a/cogl/cogl/cogl-pipeline.c b/cogl/cogl/cogl-pipeline.c index 4bae0d560..b119a2c12 100644 --- a/cogl/cogl/cogl-pipeline.c +++ b/cogl/cogl/cogl-pipeline.c @@ -95,7 +95,6 @@ _cogl_pipeline_init_default_pipeline (void) /* XXX: NB: It's important that we zero this to avoid polluting * pipeline hash values with un-initialized data */ CoglPipelineBigState *big_state = g_slice_new0 (CoglPipelineBigState); - CoglPipelineLightingState *lighting_state = &big_state->lighting_state; CoglPipelineAlphaFuncState *alpha_state = &big_state->alpha_state; CoglPipelineBlendState *blend_state = &big_state->blend_state; CoglPipelineCullFaceState *cull_face_state = &big_state->cull_face_state; @@ -142,29 +141,6 @@ _cogl_pipeline_init_default_pipeline (void) /* Use the same defaults as the GL spec... */ cogl_color_init_from_4ub (&pipeline->color, 0xff, 0xff, 0xff, 0xff); - /* Use the same defaults as the GL spec... */ - lighting_state->ambient[0] = 0.2; - lighting_state->ambient[1] = 0.2; - lighting_state->ambient[2] = 0.2; - lighting_state->ambient[3] = 1.0; - - lighting_state->diffuse[0] = 0.8; - lighting_state->diffuse[1] = 0.8; - lighting_state->diffuse[2] = 0.8; - lighting_state->diffuse[3] = 1.0; - - lighting_state->specular[0] = 0; - lighting_state->specular[1] = 0; - lighting_state->specular[2] = 0; - lighting_state->specular[3] = 1.0; - - lighting_state->emission[0] = 0; - lighting_state->emission[1] = 0; - lighting_state->emission[2] = 0; - lighting_state->emission[3] = 1.0; - - lighting_state->shininess = 0.0f; - /* Use the same defaults as the GL spec... */ alpha_state->alpha_func = COGL_PIPELINE_ALPHA_FUNC_ALWAYS; alpha_state->alpha_func_reference = 0.0;