diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c index fd2d3008c..eabcaeaf0 100644 --- a/clutter/clutter/clutter-stage.c +++ b/clutter/clutter/clutter-stage.c @@ -129,8 +129,6 @@ struct _ClutterStagePrivate CoglMatrix view; float viewport[4]; - ClutterFog fog; - gchar *title; ClutterActor *key_focused_actor; @@ -173,7 +171,6 @@ struct _ClutterStagePrivate guint relayout_pending : 1; guint redraw_pending : 1; guint is_cursor_visible : 1; - guint use_fog : 1; guint throttle_motion_events : 1; guint use_alpha : 1; guint min_size_changed : 1; @@ -191,8 +188,6 @@ enum PROP_CURSOR_VISIBLE, PROP_PERSPECTIVE, PROP_TITLE, - PROP_USE_FOG, - PROP_FOG, PROP_USE_ALPHA, PROP_KEY_FOCUS, PROP_NO_CLEAR_HINT, @@ -1801,14 +1796,6 @@ clutter_stage_set_property (GObject *object, clutter_stage_set_title (stage, g_value_get_string (value)); break; - case PROP_USE_FOG: - clutter_stage_set_use_fog (stage, g_value_get_boolean (value)); - break; - - case PROP_FOG: - clutter_stage_set_fog (stage, g_value_get_boxed (value)); - break; - case PROP_USE_ALPHA: clutter_stage_set_use_alpha (stage, g_value_get_boolean (value)); break; @@ -1863,14 +1850,6 @@ clutter_stage_get_property (GObject *gobject, g_value_set_string (value, priv->title); break; - case PROP_USE_FOG: - g_value_set_boolean (value, priv->use_fog); - break; - - case PROP_FOG: - g_value_set_boxed (value, &priv->fog); - break; - case PROP_USE_ALPHA: g_value_set_boolean (value, priv->use_alpha); break; @@ -2056,41 +2035,6 @@ clutter_stage_class_init (ClutterStageClass *klass) NULL, CLUTTER_PARAM_READWRITE); - /** - * ClutterStage:use-fog: - * - * Whether the stage should use a linear GL "fog" in creating the - * depth-cueing effect, to enhance the perception of depth by fading - * actors farther from the viewpoint. - * - * Since: 0.6 - * - * Deprecated: 1.10: This property does not do anything. - */ - obj_props[PROP_USE_FOG] = - g_param_spec_boolean ("use-fog", - P_("Use Fog"), - P_("Whether to enable depth cueing"), - FALSE, - CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED); - - /** - * ClutterStage:fog: - * - * The settings for the GL "fog", used only if #ClutterStage:use-fog - * is set to %TRUE - * - * Since: 1.0 - * - * Deprecated: 1.10: This property does not do anything. - */ - obj_props[PROP_FOG] = - g_param_spec_boxed ("fog", - P_("Fog"), - P_("Settings for the depth cueing"), - CLUTTER_TYPE_FOG, - CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED); - /** * ClutterStage:use-alpha: * @@ -2328,7 +2272,6 @@ clutter_stage_init (ClutterStage *self) priv->event_queue = g_queue_new (); priv->is_cursor_visible = TRUE; - priv->use_fog = FALSE; priv->throttle_motion_events = TRUE; priv->min_size_changed = FALSE; priv->sync_delay = -1; @@ -2337,10 +2280,6 @@ clutter_stage_init (ClutterStage *self) clutter_actor_set_background_color (CLUTTER_ACTOR (self), &default_stage_color); - /* FIXME - remove for 2.0 */ - priv->fog.z_near = 1.0; - priv->fog.z_far = 2.0; - priv->relayout_pending = TRUE; clutter_actor_set_reactive (CLUTTER_ACTOR (self), TRUE); @@ -3078,136 +3017,6 @@ clutter_stage_get_key_focus (ClutterStage *stage) return CLUTTER_ACTOR (stage); } -/** - * clutter_stage_get_use_fog: - * @stage: the #ClutterStage - * - * Gets whether the depth cueing effect is enabled on @stage. - * - * Return value: %TRUE if the depth cueing effect is enabled - * - * Since: 0.6 - * - * Deprecated: 1.10: This function will always return %FALSE - */ -gboolean -clutter_stage_get_use_fog (ClutterStage *stage) -{ - g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE); - - return stage->priv->use_fog; -} - -/** - * clutter_stage_set_use_fog: - * @stage: the #ClutterStage - * @fog: %TRUE for enabling the depth cueing effect - * - * Sets whether the depth cueing effect on the stage should be enabled - * or not. - * - * Depth cueing is a 3D effect that makes actors farther away from the - * viewing point less opaque, by fading them with the stage color. - - * The parameters of the GL fog used can be changed using the - * clutter_stage_set_fog() function. - * - * Since: 0.6 - * - * Deprecated: 1.10: Calling this function produces no visible effect - */ -void -clutter_stage_set_use_fog (ClutterStage *stage, - gboolean fog) -{ -} - -/** - * clutter_stage_set_fog: - * @stage: the #ClutterStage - * @fog: a #ClutterFog structure - * - * Sets the fog (also known as "depth cueing") settings for the @stage. - * - * A #ClutterStage will only use a linear fog progression, which - * depends solely on the distance from the viewer. The cogl_set_fog() - * function in COGL exposes more of the underlying implementation, - * and allows changing the for progression function. It can be directly - * used by disabling the #ClutterStage:use-fog property and connecting - * a signal handler to the #ClutterActor::paint signal on the @stage, - * like: - * - * |[ - * clutter_stage_set_use_fog (stage, FALSE); - * g_signal_connect (stage, "paint", G_CALLBACK (on_stage_paint), NULL); - * ]| - * - * The paint signal handler will call cogl_set_fog() with the - * desired settings: - * - * |[ - * static void - * on_stage_paint (ClutterActor *actor) - * { - * ClutterColor stage_color = { 0, }; - * CoglColor fog_color = { 0, }; - * - * // set the fog color to the stage background color - * clutter_stage_get_color (CLUTTER_STAGE (actor), &stage_color); - * cogl_color_init_from_4ub (&fog_color, - * stage_color.red, - * stage_color.green, - * stage_color.blue, - * stage_color.alpha); - * - * // enable fog // - * cogl_set_fog (&fog_color, - * COGL_FOG_MODE_EXPONENTIAL, // mode - * 0.5, // density - * 5.0, 30.0); // z_near and z_far - * } - * ]| - * - * The fogging functions only work correctly when the visible actors use - * unmultiplied alpha colors. By default Cogl will premultiply textures and - * cogl_set_source_color() will premultiply colors, so unless you explicitly - * load your textures requesting an unmultiplied internal format and use - * cogl_material_set_color() you can only use fogging with fully opaque actors. - * Support for premultiplied colors will improve in the future when we can - * depend on fragment shaders. - * - * Since: 0.6 - * - * Deprecated: 1.10: Fog settings are ignored. - */ -void -clutter_stage_set_fog (ClutterStage *stage, - ClutterFog *fog) -{ -} - -/** - * clutter_stage_get_fog: - * @stage: the #ClutterStage - * @fog: (out): return location for a #ClutterFog structure - * - * Retrieves the current depth cueing settings from the stage. - * - * Since: 0.6 - * - * Deprecated: 1.10: This function will always return the default - * values of #ClutterFog - */ -void -clutter_stage_get_fog (ClutterStage *stage, - ClutterFog *fog) -{ - g_return_if_fail (CLUTTER_IS_STAGE (stage)); - g_return_if_fail (fog != NULL); - - *fog = stage->priv->fog; -} - /*** Perspective boxed type ******/ static gpointer @@ -3230,24 +3039,6 @@ G_DEFINE_BOXED_TYPE (ClutterPerspective, clutter_perspective, clutter_perspective_copy, clutter_perspective_free); -static gpointer -clutter_fog_copy (gpointer data) -{ - if (G_LIKELY (data)) - return g_slice_dup (ClutterFog, data); - - return NULL; -} - -static void -clutter_fog_free (gpointer data) -{ - if (G_LIKELY (data)) - g_slice_free (ClutterFog, data); -} - -G_DEFINE_BOXED_TYPE (ClutterFog, clutter_fog, clutter_fog_copy, clutter_fog_free); - /** * clutter_stage_new: * diff --git a/clutter/clutter/clutter-stage.h b/clutter/clutter/clutter-stage.h index c28904bd0..9579f1676 100644 --- a/clutter/clutter/clutter-stage.h +++ b/clutter/clutter/clutter-stage.h @@ -115,26 +115,6 @@ struct _ClutterPerspective gfloat z_far; }; -/** - * ClutterFog: - * @z_near: starting distance from the viewer to the near clipping - * plane (always positive) - * @z_far: final distance from the viewer to the far clipping - * plane (always positive) - * - * Fog settings used to create the depth cueing effect. - * - * Since: 0.6 - * - * Deprecated: 1.10: The fog-related API in #ClutterStage has been - * deprecated as well. - */ -struct _ClutterFog -{ - gfloat z_near; - gfloat z_far; -}; - /** * ClutterFrameInfo: (skip) */ @@ -153,8 +133,6 @@ typedef struct _ClutterCapture CLUTTER_EXPORT GType clutter_perspective_get_type (void) G_GNUC_CONST; -CLUTTER_DEPRECATED -GType clutter_fog_get_type (void) G_GNUC_CONST; CLUTTER_EXPORT GType clutter_stage_get_type (void) G_GNUC_CONST; diff --git a/clutter/clutter/clutter-types.h b/clutter/clutter/clutter-types.h index 050802827..80e4f6768 100644 --- a/clutter/clutter/clutter-types.h +++ b/clutter/clutter/clutter-types.h @@ -36,7 +36,6 @@ G_BEGIN_DECLS #define CLUTTER_TYPE_ACTOR_BOX (clutter_actor_box_get_type ()) -#define CLUTTER_TYPE_FOG (clutter_fog_get_type ()) #define CLUTTER_TYPE_GEOMETRY (clutter_geometry_get_type ()) #define CLUTTER_TYPE_KNOT (clutter_knot_get_type ()) #define CLUTTER_TYPE_MARGIN (clutter_margin_get_type ()) @@ -113,7 +112,6 @@ typedef union _ClutterEvent ClutterEvent; */ typedef struct _ClutterEventSequence ClutterEventSequence; -typedef struct _ClutterFog ClutterFog; /* deprecated */ typedef struct _ClutterBehaviour ClutterBehaviour; /* deprecated */ typedef struct _ClutterShader ClutterShader; /* deprecated */ diff --git a/clutter/clutter/deprecated/clutter-stage.h b/clutter/clutter/deprecated/clutter-stage.h index 4395f9439..20b103cf0 100644 --- a/clutter/clutter/deprecated/clutter-stage.h +++ b/clutter/clutter/deprecated/clutter-stage.h @@ -74,20 +74,6 @@ gboolean clutter_stage_is_default (ClutterStage *stage); CLUTTER_DEPRECATED_FOR(clutter_actor_queue_redraw) void clutter_stage_queue_redraw (ClutterStage *stage); -CLUTTER_DEPRECATED -void clutter_stage_set_use_fog (ClutterStage *stage, - gboolean fog); - -CLUTTER_DEPRECATED -gboolean clutter_stage_get_use_fog (ClutterStage *stage); - -CLUTTER_DEPRECATED -void clutter_stage_set_fog (ClutterStage *stage, - ClutterFog *fog); - -CLUTTER_DEPRECATED -void clutter_stage_get_fog (ClutterStage *stage, - ClutterFog *fog); CLUTTER_DEPRECATED_FOR(clutter_actor_set_background_color) void clutter_stage_set_color (ClutterStage *stage, diff --git a/cogl/cogl/cogl-context-private.h b/cogl/cogl/cogl-context-private.h index 13087e881..1ce19b23a 100644 --- a/cogl/cogl/cogl-context-private.h +++ b/cogl/cogl/cogl-context-private.h @@ -147,8 +147,6 @@ struct _CoglContext GArray *texture_units; int active_texture_unit; - CoglPipelineFogState legacy_fog_state; - /* Pipelines */ CoglPipeline *opaque_color_pipeline; /* used for set_source_color */ CoglPipeline *blended_color_pipeline; /* used for set_source_color */ diff --git a/cogl/cogl/cogl-context.c b/cogl/cogl/cogl-context.c index b57800e97..ff27e4b23 100644 --- a/cogl/cogl/cogl-context.c +++ b/cogl/cogl/cogl-context.c @@ -262,8 +262,6 @@ cogl_context_new (CoglDisplay *display, GE (context, glActiveTexture (GL_TEXTURE1)); } - context->legacy_fog_state.enabled = FALSE; - context->opaque_color_pipeline = cogl_pipeline_new (context); context->blended_color_pipeline = cogl_pipeline_new (context); context->texture_pipeline = cogl_pipeline_new (context); diff --git a/cogl/cogl/cogl-pipeline-private.h b/cogl/cogl/cogl-pipeline-private.h index 3db0b37dc..533e003f4 100644 --- a/cogl/cogl/cogl-pipeline-private.h +++ b/cogl/cogl/cogl-pipeline-private.h @@ -83,7 +83,6 @@ typedef enum COGL_PIPELINE_STATE_BLEND_INDEX, COGL_PIPELINE_STATE_USER_SHADER_INDEX, COGL_PIPELINE_STATE_DEPTH_INDEX, - COGL_PIPELINE_STATE_FOG_INDEX, COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE_INDEX, COGL_PIPELINE_STATE_POINT_SIZE_INDEX, COGL_PIPELINE_STATE_PER_VERTEX_POINT_SIZE_INDEX, @@ -131,8 +130,6 @@ typedef enum _CoglPipelineState 1L<big_state->fog_state; - CoglPipelineFogState *fog_state1 = &authority1->big_state->fog_state; - - if (fog_state0->enabled == fog_state1->enabled && - cogl_color_equal (&fog_state0->color, &fog_state1->color) && - fog_state0->mode == fog_state1->mode && - fog_state0->density == fog_state1->density && - fog_state0->z_near == fog_state1->z_near && - fog_state0->z_far == fog_state1->z_far) - return TRUE; - else - return FALSE; -} - gboolean _cogl_pipeline_non_zero_point_size_equal (CoglPipeline *authority0, CoglPipeline *authority1) @@ -1192,41 +1174,6 @@ cogl_pipeline_get_depth_state (CoglPipeline *pipeline, *state = authority->big_state->depth_state; } -void -_cogl_pipeline_set_fog_state (CoglPipeline *pipeline, - const CoglPipelineFogState *fog_state) -{ - CoglPipelineState state = COGL_PIPELINE_STATE_FOG; - CoglPipeline *authority; - CoglPipelineFogState *current_fog_state; - - g_return_if_fail (cogl_is_pipeline (pipeline)); - - authority = _cogl_pipeline_get_authority (pipeline, state); - - current_fog_state = &authority->big_state->fog_state; - - if (current_fog_state->enabled == fog_state->enabled && - cogl_color_equal (¤t_fog_state->color, &fog_state->color) && - current_fog_state->mode == fog_state->mode && - current_fog_state->density == fog_state->density && - current_fog_state->z_near == fog_state->z_near && - current_fog_state->z_far == fog_state->z_far) - return; - - /* - 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 - * changed, then initialize that state from the current authority. - */ - _cogl_pipeline_pre_change_notify (pipeline, state, NULL, FALSE); - - pipeline->big_state->fog_state = *fog_state; - - _cogl_pipeline_update_authority (pipeline, authority, state, - _cogl_pipeline_fog_state_equal); -} - void cogl_pipeline_set_cull_face_mode (CoglPipeline *pipeline, CoglPipelineCullFaceMode cull_face_mode) @@ -1850,23 +1797,6 @@ _cogl_pipeline_hash_depth_state (CoglPipeline *authority, state->hash = hash; } -void -_cogl_pipeline_hash_fog_state (CoglPipeline *authority, - CoglPipelineHashState *state) -{ - CoglPipelineFogState *fog_state = &authority->big_state->fog_state; - unsigned long hash = state->hash; - - if (!fog_state->enabled) - hash = _cogl_util_one_at_a_time_hash (hash, &fog_state->enabled, - sizeof (fog_state->enabled)); - else - hash = _cogl_util_one_at_a_time_hash (hash, &fog_state, - sizeof (CoglPipelineFogState)); - - state->hash = hash; -} - void _cogl_pipeline_hash_non_zero_point_size_state (CoglPipeline *authority, CoglPipelineHashState *state) diff --git a/cogl/cogl/cogl-pipeline.c b/cogl/cogl/cogl-pipeline.c index 0f98641ed..5dcc86bde 100644 --- a/cogl/cogl/cogl-pipeline.c +++ b/cogl/cogl/cogl-pipeline.c @@ -1002,13 +1002,6 @@ _cogl_pipeline_copy_differences (CoglPipeline *dest, sizeof (CoglDepthState)); } - if (differences & COGL_PIPELINE_STATE_FOG) - { - memcpy (&big_state->fog_state, - &src->big_state->fog_state, - sizeof (CoglPipelineFogState)); - } - if (differences & COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE) big_state->non_zero_point_size = src->big_state->non_zero_point_size; @@ -1124,13 +1117,6 @@ _cogl_pipeline_init_multi_property_sparse_state (CoglPipeline *pipeline, sizeof (CoglDepthState)); break; } - case COGL_PIPELINE_STATE_FOG: - { - memcpy (&pipeline->big_state->fog_state, - &authority->big_state->fog_state, - sizeof (CoglPipelineFogState)); - break; - } case COGL_PIPELINE_STATE_CULL_FACE: { memcpy (&pipeline->big_state->cull_face_state, @@ -2258,11 +2244,6 @@ _cogl_pipeline_equal (CoglPipeline *pipeline0, authorities1[bit])) goto done; break; - case COGL_PIPELINE_STATE_FOG_INDEX: - if (!_cogl_pipeline_fog_state_equal (authorities0[bit], - authorities1[bit])) - goto done; - break; case COGL_PIPELINE_STATE_CULL_FACE_INDEX: if (!_cogl_pipeline_cull_face_state_equal (authorities0[bit], authorities1[bit])) @@ -2396,18 +2377,6 @@ _cogl_pipeline_update_authority (CoglPipeline *pipeline, } } -gboolean -_cogl_pipeline_get_fog_enabled (CoglPipeline *pipeline) -{ - CoglPipeline *authority; - - g_return_val_if_fail (cogl_is_pipeline (pipeline), FALSE); - - authority = - _cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_FOG); - return authority->big_state->fog_state.enabled; -} - unsigned long _cogl_pipeline_get_age (CoglPipeline *pipeline) { @@ -2569,9 +2538,6 @@ _cogl_pipeline_apply_legacy_state (CoglPipeline *pipeline) cogl_pipeline_set_depth_state (pipeline, &depth_state, NULL); } - if (ctx->legacy_fog_state.enabled) - _cogl_pipeline_set_fog_state (pipeline, &ctx->legacy_fog_state); - if (ctx->legacy_backface_culling_enabled) cogl_pipeline_set_cull_face_mode (pipeline, COGL_PIPELINE_CULL_FACE_MODE_BACK); @@ -2719,8 +2685,6 @@ _cogl_pipeline_init_state_hash_functions (void) _cogl_pipeline_hash_user_shader_state; state_hash_functions[COGL_PIPELINE_STATE_DEPTH_INDEX] = _cogl_pipeline_hash_depth_state; - state_hash_functions[COGL_PIPELINE_STATE_FOG_INDEX] = - _cogl_pipeline_hash_fog_state; state_hash_functions[COGL_PIPELINE_STATE_CULL_FACE_INDEX] = _cogl_pipeline_hash_cull_face_state; state_hash_functions[COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE_INDEX] = @@ -2738,7 +2702,7 @@ _cogl_pipeline_init_state_hash_functions (void) { /* So we get a big error if we forget to update this code! */ - _COGL_STATIC_ASSERT (COGL_PIPELINE_STATE_SPARSE_COUNT == 17, + _COGL_STATIC_ASSERT (COGL_PIPELINE_STATE_SPARSE_COUNT == 16, "Make sure to install a hash function for " "newly added pipeline state and update assert " "in _cogl_pipeline_init_state_hash_functions"); diff --git a/cogl/cogl/cogl-types.h b/cogl/cogl/cogl-types.h index da30242cc..62771d66e 100644 --- a/cogl/cogl/cogl-types.h +++ b/cogl/cogl/cogl-types.h @@ -254,41 +254,6 @@ typedef enum COGL_TEXTURE_NO_ATLAS = 1 << 2 } CoglTextureFlags; -/** - * CoglFogMode: - * @COGL_FOG_MODE_LINEAR: Calculates the fog blend factor as: - * |[ - * f = end - eye_distance / end - start - * ]| - * @COGL_FOG_MODE_EXPONENTIAL: Calculates the fog blend factor as: - * |[ - * f = e ^ -(density * eye_distance) - * ]| - * @COGL_FOG_MODE_EXPONENTIAL_SQUARED: Calculates the fog blend factor as: - * |[ - * f = e ^ -(density * eye_distance)^2 - * ]| - * - * The fog mode determines the equation used to calculate the fogging blend - * factor while fogging is enabled. The simplest %COGL_FOG_MODE_LINEAR mode - * determines f as: - * - * |[ - * f = end - eye_distance / end - start - * ]| - * - * Where eye_distance is the distance of the current fragment in eye - * coordinates from the origin. - * - * Since: 1.0 - */ -typedef enum -{ - COGL_FOG_MODE_LINEAR, - COGL_FOG_MODE_EXPONENTIAL, - COGL_FOG_MODE_EXPONENTIAL_SQUARED -} CoglFogMode; - /** * COGL_BLEND_STRING_ERROR: * diff --git a/cogl/cogl/cogl.c b/cogl/cogl/cogl.c index c90a9bde1..19217f692 100644 --- a/cogl/cogl/cogl.c +++ b/cogl/cogl/cogl.c @@ -279,37 +279,6 @@ cogl_get_bitmasks (int *red, *alpha = cogl_framebuffer_get_alpha_bits (framebuffer); } -void -cogl_set_fog (const CoglColor *fog_color, - CoglFogMode mode, - float density, - float z_near, - float z_far) -{ - _COGL_GET_CONTEXT (ctx, NO_RETVAL); - - if (ctx->legacy_fog_state.enabled == FALSE) - ctx->legacy_state_set++; - - ctx->legacy_fog_state.enabled = TRUE; - ctx->legacy_fog_state.color = *fog_color; - ctx->legacy_fog_state.mode = mode; - ctx->legacy_fog_state.density = density; - ctx->legacy_fog_state.z_near = z_near; - ctx->legacy_fog_state.z_far = z_far; -} - -void -cogl_disable_fog (void) -{ - _COGL_GET_CONTEXT (ctx, NO_RETVAL); - - if (ctx->legacy_fog_state.enabled == TRUE) - ctx->legacy_state_set--; - - ctx->legacy_fog_state.enabled = FALSE; -} - void cogl_flush (void) { diff --git a/cogl/cogl/cogl.symbols b/cogl/cogl/cogl.symbols index df268d81d..38c205ff3 100644 --- a/cogl/cogl/cogl.symbols +++ b/cogl/cogl/cogl.symbols @@ -184,8 +184,6 @@ cogl_depth_state_set_range cogl_depth_state_set_write_enabled cogl_depth_test_function_get_type -cogl_disable_fog - #ifdef COGL_HAS_GTYPE_SUPPORT cogl_display_get_gtype #endif @@ -223,8 +221,6 @@ cogl_fixed_sin cogl_fixed_sqrt cogl_fixed_tan -cogl_fog_mode_get_type - cogl_foreach_feature cogl_flush @@ -797,7 +793,6 @@ cogl_set_depth_test_enabled #ifndef COGL_DISABLE_DEPRECATED cogl_set_draw_buffer #endif -cogl_set_fog #ifdef COGL_HAS_SDL_SUPPORT cogl_sdl_context_new cogl_sdl_handle_event diff --git a/cogl/cogl/cogl1-context.h b/cogl/cogl/cogl1-context.h index d9837f950..7c3908bbd 100644 --- a/cogl/cogl/cogl1-context.h +++ b/cogl/cogl/cogl1-context.h @@ -496,53 +496,6 @@ COGL_DEPRECATED_FOR (cogl_pipeline_get_cull_face_mode) gboolean cogl_get_backface_culling_enabled (void); -/** - * cogl_set_fog: - * @fog_color: The color of the fog - * @mode: A #CoglFogMode that determines the equation used to calculate the - * fogging blend factor. - * @density: Used by %COGL_FOG_MODE_EXPONENTIAL and by - * %COGL_FOG_MODE_EXPONENTIAL_SQUARED equations. - * @z_near: Position along Z axis where no fogging should be applied - * @z_far: Position along Z axis where full fogging should be applied - * - * Enables fogging. Fogging causes vertices that are further away from the eye - * to be rendered with a different color. The color is determined according to - * the chosen fog mode; at it's simplest the color is linearly interpolated so - * that vertices at @z_near are drawn fully with their original color and - * vertices at @z_far are drawn fully with @fog_color. Fogging will remain - * enabled until you call cogl_disable_fog(). - * - * The fogging functions only work correctly when primitives use - * unmultiplied alpha colors. By default Cogl will premultiply textures - * and cogl_set_source_color() will premultiply colors, so unless you - * explicitly load your textures requesting an unmultiplied internal format - * and use cogl_material_set_color() you can only use fogging with fully - * opaque primitives. This might improve in the future when we can depend - * on fragment shaders. - * - * Deprecated: 1.16: Use #CoglSnippet shader api for fog - */ -COGL_DEPRECATED_FOR (cogl_snippet_API) -void -cogl_set_fog (const CoglColor *fog_color, - CoglFogMode mode, - float density, - float z_near, - float z_far); - -/** - * cogl_disable_fog: - * - * This function disables fogging, so primitives drawn afterwards will not be - * blended with any previously set fog color. - * - * Deprecated: 1.16: Use #CoglSnippet shader api for fog - */ -COGL_DEPRECATED_FOR (cogl_snippet_API) -void -cogl_disable_fog (void); - /** * cogl_clear: * @color: Background color to clear to diff --git a/cogl/cogl/gl-prototypes/cogl-fixed-functions.h b/cogl/cogl/gl-prototypes/cogl-fixed-functions.h index 5c11fedf4..b153d2c9b 100644 --- a/cogl/cogl/gl-prototypes/cogl-fixed-functions.h +++ b/cogl/cogl/gl-prototypes/cogl-fixed-functions.h @@ -65,10 +65,6 @@ COGL_EXT_BEGIN (fixed_function_core, "\0") COGL_EXT_FUNCTION (void, glAlphaFunc, (GLenum func, GLclampf ref)) -COGL_EXT_FUNCTION (void, glFogf, - (GLenum pname, GLfloat param)) -COGL_EXT_FUNCTION (void, glFogfv, - (GLenum pname, const GLfloat *params)) COGL_EXT_FUNCTION (void, glLoadMatrixf, (const GLfloat *m)) COGL_EXT_FUNCTION (void, glMaterialfv, diff --git a/src/tests/clutter/interactive/test-texture-quality.c b/src/tests/clutter/interactive/test-texture-quality.c index 91c0f0dc6..749112c65 100644 --- a/src/tests/clutter/interactive/test-texture-quality.c +++ b/src/tests/clutter/interactive/test-texture-quality.c @@ -54,7 +54,6 @@ test_texture_quality_main (int argc, char *argv[]) ClutterActor *stage; ClutterActor *image; ClutterColor stage_color = { 0x12, 0x34, 0x56, 0xff }; - ClutterFog stage_fog = { 10.0, -50.0 }; GError *error; gchar *file; @@ -63,8 +62,6 @@ test_texture_quality_main (int argc, char *argv[]) stage = clutter_stage_new (); clutter_actor_set_background_color (stage, &stage_color); - clutter_stage_set_use_fog (CLUTTER_STAGE (stage), TRUE); - clutter_stage_set_fog (CLUTTER_STAGE (stage), &stage_fog); g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);