mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
Remove fog support
Fog is explicitly deprecated in favour of CoglSnippet API, and in nowhere we are using this deprecated feature, which means we can simply drop it without any sort of replacement. https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
This commit is contained in:
parent
f0b9654deb
commit
c829fd3374
@ -114,8 +114,6 @@ struct _ClutterStagePrivate
|
|||||||
CoglMatrix view;
|
CoglMatrix view;
|
||||||
float viewport[4];
|
float viewport[4];
|
||||||
|
|
||||||
ClutterFog fog;
|
|
||||||
|
|
||||||
gchar *title;
|
gchar *title;
|
||||||
ClutterActor *key_focused_actor;
|
ClutterActor *key_focused_actor;
|
||||||
|
|
||||||
@ -154,7 +152,6 @@ struct _ClutterStagePrivate
|
|||||||
guint is_fullscreen : 1;
|
guint is_fullscreen : 1;
|
||||||
guint is_cursor_visible : 1;
|
guint is_cursor_visible : 1;
|
||||||
guint is_user_resizable : 1;
|
guint is_user_resizable : 1;
|
||||||
guint use_fog : 1;
|
|
||||||
guint throttle_motion_events : 1;
|
guint throttle_motion_events : 1;
|
||||||
guint use_alpha : 1;
|
guint use_alpha : 1;
|
||||||
guint min_size_changed : 1;
|
guint min_size_changed : 1;
|
||||||
@ -175,8 +172,6 @@ enum
|
|||||||
PROP_PERSPECTIVE,
|
PROP_PERSPECTIVE,
|
||||||
PROP_TITLE,
|
PROP_TITLE,
|
||||||
PROP_USER_RESIZABLE,
|
PROP_USER_RESIZABLE,
|
||||||
PROP_USE_FOG,
|
|
||||||
PROP_FOG,
|
|
||||||
PROP_USE_ALPHA,
|
PROP_USE_ALPHA,
|
||||||
PROP_KEY_FOCUS,
|
PROP_KEY_FOCUS,
|
||||||
PROP_NO_CLEAR_HINT,
|
PROP_NO_CLEAR_HINT,
|
||||||
@ -1727,14 +1722,6 @@ clutter_stage_set_property (GObject *object,
|
|||||||
clutter_stage_set_user_resizable (stage, g_value_get_boolean (value));
|
clutter_stage_set_user_resizable (stage, g_value_get_boolean (value));
|
||||||
break;
|
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:
|
case PROP_USE_ALPHA:
|
||||||
clutter_stage_set_use_alpha (stage, g_value_get_boolean (value));
|
clutter_stage_set_use_alpha (stage, g_value_get_boolean (value));
|
||||||
break;
|
break;
|
||||||
@ -1801,14 +1788,6 @@ clutter_stage_get_property (GObject *gobject,
|
|||||||
g_value_set_boolean (value, priv->is_user_resizable);
|
g_value_set_boolean (value, priv->is_user_resizable);
|
||||||
break;
|
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:
|
case PROP_USE_ALPHA:
|
||||||
g_value_set_boolean (value, priv->use_alpha);
|
g_value_set_boolean (value, priv->use_alpha);
|
||||||
break;
|
break;
|
||||||
@ -2035,41 +2014,6 @@ clutter_stage_class_init (ClutterStageClass *klass)
|
|||||||
CLUTTER_PARAM_READWRITE);
|
CLUTTER_PARAM_READWRITE);
|
||||||
g_object_class_install_property (gobject_class, PROP_TITLE, pspec);
|
g_object_class_install_property (gobject_class, PROP_TITLE, pspec);
|
||||||
|
|
||||||
/**
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
pspec = g_param_spec_boolean ("use-fog",
|
|
||||||
P_("Use Fog"),
|
|
||||||
P_("Whether to enable depth cueing"),
|
|
||||||
FALSE,
|
|
||||||
CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED);
|
|
||||||
g_object_class_install_property (gobject_class, PROP_USE_FOG, pspec);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
pspec = g_param_spec_boxed ("fog",
|
|
||||||
P_("Fog"),
|
|
||||||
P_("Settings for the depth cueing"),
|
|
||||||
CLUTTER_TYPE_FOG,
|
|
||||||
CLUTTER_PARAM_READWRITE | G_PARAM_DEPRECATED);
|
|
||||||
g_object_class_install_property (gobject_class, PROP_FOG, pspec);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterStage:use-alpha:
|
* ClutterStage:use-alpha:
|
||||||
*
|
*
|
||||||
@ -2322,7 +2266,6 @@ clutter_stage_init (ClutterStage *self)
|
|||||||
priv->is_fullscreen = FALSE;
|
priv->is_fullscreen = FALSE;
|
||||||
priv->is_user_resizable = FALSE;
|
priv->is_user_resizable = FALSE;
|
||||||
priv->is_cursor_visible = TRUE;
|
priv->is_cursor_visible = TRUE;
|
||||||
priv->use_fog = FALSE;
|
|
||||||
priv->throttle_motion_events = TRUE;
|
priv->throttle_motion_events = TRUE;
|
||||||
priv->min_size_changed = FALSE;
|
priv->min_size_changed = FALSE;
|
||||||
priv->sync_delay = -1;
|
priv->sync_delay = -1;
|
||||||
@ -2360,11 +2303,6 @@ clutter_stage_init (ClutterStage *self)
|
|||||||
geom.width,
|
geom.width,
|
||||||
geom.height);
|
geom.height);
|
||||||
|
|
||||||
|
|
||||||
/* FIXME - remove for 2.0 */
|
|
||||||
priv->fog.z_near = 1.0;
|
|
||||||
priv->fog.z_far = 2.0;
|
|
||||||
|
|
||||||
priv->relayout_pending = TRUE;
|
priv->relayout_pending = TRUE;
|
||||||
|
|
||||||
clutter_actor_set_reactive (CLUTTER_ACTOR (self), TRUE);
|
clutter_actor_set_reactive (CLUTTER_ACTOR (self), TRUE);
|
||||||
@ -3257,136 +3195,6 @@ clutter_stage_get_key_focus (ClutterStage *stage)
|
|||||||
return CLUTTER_ACTOR (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 ******/
|
/*** Perspective boxed type ******/
|
||||||
|
|
||||||
static gpointer
|
static gpointer
|
||||||
@ -3409,24 +3217,6 @@ G_DEFINE_BOXED_TYPE (ClutterPerspective, clutter_perspective,
|
|||||||
clutter_perspective_copy,
|
clutter_perspective_copy,
|
||||||
clutter_perspective_free);
|
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:
|
* clutter_stage_new:
|
||||||
*
|
*
|
||||||
|
@ -115,26 +115,6 @@ struct _ClutterPerspective
|
|||||||
gfloat z_far;
|
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)
|
* ClutterFrameInfo: (skip)
|
||||||
*/
|
*/
|
||||||
@ -153,8 +133,6 @@ typedef struct _ClutterCapture
|
|||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
GType clutter_perspective_get_type (void) G_GNUC_CONST;
|
GType clutter_perspective_get_type (void) G_GNUC_CONST;
|
||||||
CLUTTER_DEPRECATED
|
|
||||||
GType clutter_fog_get_type (void) G_GNUC_CONST;
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
GType clutter_stage_get_type (void) G_GNUC_CONST;
|
GType clutter_stage_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define CLUTTER_TYPE_ACTOR_BOX (clutter_actor_box_get_type ())
|
#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_GEOMETRY (clutter_geometry_get_type ())
|
||||||
#define CLUTTER_TYPE_KNOT (clutter_knot_get_type ())
|
#define CLUTTER_TYPE_KNOT (clutter_knot_get_type ())
|
||||||
#define CLUTTER_TYPE_MARGIN (clutter_margin_get_type ())
|
#define CLUTTER_TYPE_MARGIN (clutter_margin_get_type ())
|
||||||
@ -113,7 +112,6 @@ typedef union _ClutterEvent ClutterEvent;
|
|||||||
*/
|
*/
|
||||||
typedef struct _ClutterEventSequence ClutterEventSequence;
|
typedef struct _ClutterEventSequence ClutterEventSequence;
|
||||||
|
|
||||||
typedef struct _ClutterFog ClutterFog; /* deprecated */
|
|
||||||
typedef struct _ClutterBehaviour ClutterBehaviour; /* deprecated */
|
typedef struct _ClutterBehaviour ClutterBehaviour; /* deprecated */
|
||||||
typedef struct _ClutterShader ClutterShader; /* deprecated */
|
typedef struct _ClutterShader ClutterShader; /* deprecated */
|
||||||
|
|
||||||
|
@ -74,20 +74,6 @@ gboolean clutter_stage_is_default (ClutterStage *stage);
|
|||||||
CLUTTER_DEPRECATED_FOR(clutter_actor_queue_redraw)
|
CLUTTER_DEPRECATED_FOR(clutter_actor_queue_redraw)
|
||||||
void clutter_stage_queue_redraw (ClutterStage *stage);
|
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)
|
CLUTTER_DEPRECATED_FOR(clutter_actor_set_background_color)
|
||||||
void clutter_stage_set_color (ClutterStage *stage,
|
void clutter_stage_set_color (ClutterStage *stage,
|
||||||
|
@ -54,7 +54,6 @@ test_texture_quality_main (int argc, char *argv[])
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterActor *image;
|
ClutterActor *image;
|
||||||
ClutterColor stage_color = { 0x12, 0x34, 0x56, 0xff };
|
ClutterColor stage_color = { 0x12, 0x34, 0x56, 0xff };
|
||||||
ClutterFog stage_fog = { 10.0, -50.0 };
|
|
||||||
GError *error;
|
GError *error;
|
||||||
gchar *file;
|
gchar *file;
|
||||||
|
|
||||||
@ -63,8 +62,6 @@ test_texture_quality_main (int argc, char *argv[])
|
|||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
clutter_actor_set_background_color (stage, &stage_color);
|
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,
|
g_signal_connect (stage,
|
||||||
"destroy", G_CALLBACK (clutter_main_quit),
|
"destroy", G_CALLBACK (clutter_main_quit),
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -152,8 +152,6 @@ struct _CoglContext
|
|||||||
GArray *texture_units;
|
GArray *texture_units;
|
||||||
int active_texture_unit;
|
int active_texture_unit;
|
||||||
|
|
||||||
CoglPipelineFogState legacy_fog_state;
|
|
||||||
|
|
||||||
/* Pipelines */
|
/* Pipelines */
|
||||||
CoglPipeline *opaque_color_pipeline; /* used for set_source_color */
|
CoglPipeline *opaque_color_pipeline; /* used for set_source_color */
|
||||||
CoglPipeline *blended_color_pipeline; /* used for set_source_color */
|
CoglPipeline *blended_color_pipeline; /* used for set_source_color */
|
||||||
|
@ -310,8 +310,6 @@ cogl_context_new (CoglDisplay *display,
|
|||||||
GE (context, glActiveTexture (GL_TEXTURE1));
|
GE (context, glActiveTexture (GL_TEXTURE1));
|
||||||
}
|
}
|
||||||
|
|
||||||
context->legacy_fog_state.enabled = FALSE;
|
|
||||||
|
|
||||||
context->opaque_color_pipeline = cogl_pipeline_new (context);
|
context->opaque_color_pipeline = cogl_pipeline_new (context);
|
||||||
context->blended_color_pipeline = cogl_pipeline_new (context);
|
context->blended_color_pipeline = cogl_pipeline_new (context);
|
||||||
context->texture_pipeline = cogl_pipeline_new (context);
|
context->texture_pipeline = cogl_pipeline_new (context);
|
||||||
|
@ -83,7 +83,6 @@ typedef enum
|
|||||||
COGL_PIPELINE_STATE_BLEND_INDEX,
|
COGL_PIPELINE_STATE_BLEND_INDEX,
|
||||||
COGL_PIPELINE_STATE_USER_SHADER_INDEX,
|
COGL_PIPELINE_STATE_USER_SHADER_INDEX,
|
||||||
COGL_PIPELINE_STATE_DEPTH_INDEX,
|
COGL_PIPELINE_STATE_DEPTH_INDEX,
|
||||||
COGL_PIPELINE_STATE_FOG_INDEX,
|
|
||||||
COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE_INDEX,
|
COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE_INDEX,
|
||||||
COGL_PIPELINE_STATE_POINT_SIZE_INDEX,
|
COGL_PIPELINE_STATE_POINT_SIZE_INDEX,
|
||||||
COGL_PIPELINE_STATE_PER_VERTEX_POINT_SIZE_INDEX,
|
COGL_PIPELINE_STATE_PER_VERTEX_POINT_SIZE_INDEX,
|
||||||
@ -132,8 +131,6 @@ typedef enum _CoglPipelineState
|
|||||||
1L<<COGL_PIPELINE_STATE_USER_SHADER_INDEX,
|
1L<<COGL_PIPELINE_STATE_USER_SHADER_INDEX,
|
||||||
COGL_PIPELINE_STATE_DEPTH =
|
COGL_PIPELINE_STATE_DEPTH =
|
||||||
1L<<COGL_PIPELINE_STATE_DEPTH_INDEX,
|
1L<<COGL_PIPELINE_STATE_DEPTH_INDEX,
|
||||||
COGL_PIPELINE_STATE_FOG =
|
|
||||||
1L<<COGL_PIPELINE_STATE_FOG_INDEX,
|
|
||||||
COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE =
|
COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE =
|
||||||
1L<<COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE_INDEX,
|
1L<<COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE_INDEX,
|
||||||
COGL_PIPELINE_STATE_POINT_SIZE =
|
COGL_PIPELINE_STATE_POINT_SIZE =
|
||||||
@ -184,7 +181,6 @@ typedef enum _CoglPipelineState
|
|||||||
COGL_PIPELINE_STATE_BLEND | \
|
COGL_PIPELINE_STATE_BLEND | \
|
||||||
COGL_PIPELINE_STATE_USER_SHADER | \
|
COGL_PIPELINE_STATE_USER_SHADER | \
|
||||||
COGL_PIPELINE_STATE_DEPTH | \
|
COGL_PIPELINE_STATE_DEPTH | \
|
||||||
COGL_PIPELINE_STATE_FOG | \
|
|
||||||
COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE | \
|
COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE | \
|
||||||
COGL_PIPELINE_STATE_POINT_SIZE | \
|
COGL_PIPELINE_STATE_POINT_SIZE | \
|
||||||
COGL_PIPELINE_STATE_PER_VERTEX_POINT_SIZE | \
|
COGL_PIPELINE_STATE_PER_VERTEX_POINT_SIZE | \
|
||||||
@ -199,7 +195,6 @@ typedef enum _CoglPipelineState
|
|||||||
COGL_PIPELINE_STATE_LIGHTING | \
|
COGL_PIPELINE_STATE_LIGHTING | \
|
||||||
COGL_PIPELINE_STATE_BLEND | \
|
COGL_PIPELINE_STATE_BLEND | \
|
||||||
COGL_PIPELINE_STATE_DEPTH | \
|
COGL_PIPELINE_STATE_DEPTH | \
|
||||||
COGL_PIPELINE_STATE_FOG | \
|
|
||||||
COGL_PIPELINE_STATE_LOGIC_OPS | \
|
COGL_PIPELINE_STATE_LOGIC_OPS | \
|
||||||
COGL_PIPELINE_STATE_CULL_FACE | \
|
COGL_PIPELINE_STATE_CULL_FACE | \
|
||||||
COGL_PIPELINE_STATE_UNIFORMS | \
|
COGL_PIPELINE_STATE_UNIFORMS | \
|
||||||
@ -255,16 +250,6 @@ typedef struct
|
|||||||
GLint blend_dst_factor_rgb;
|
GLint blend_dst_factor_rgb;
|
||||||
} CoglPipelineBlendState;
|
} CoglPipelineBlendState;
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
gboolean enabled;
|
|
||||||
CoglColor color;
|
|
||||||
CoglFogMode mode;
|
|
||||||
float density;
|
|
||||||
float z_near;
|
|
||||||
float z_far;
|
|
||||||
} CoglPipelineFogState;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CoglColorMask color_mask;
|
CoglColorMask color_mask;
|
||||||
@ -297,7 +282,6 @@ typedef struct
|
|||||||
CoglPipelineBlendState blend_state;
|
CoglPipelineBlendState blend_state;
|
||||||
CoglHandle user_program;
|
CoglHandle user_program;
|
||||||
CoglDepthState depth_state;
|
CoglDepthState depth_state;
|
||||||
CoglPipelineFogState fog_state;
|
|
||||||
float point_size;
|
float point_size;
|
||||||
unsigned int non_zero_point_size : 1;
|
unsigned int non_zero_point_size : 1;
|
||||||
unsigned int per_vertex_point_size : 1;
|
unsigned int per_vertex_point_size : 1;
|
||||||
@ -868,9 +852,6 @@ void
|
|||||||
_cogl_pipeline_set_blend_enabled (CoglPipeline *pipeline,
|
_cogl_pipeline_set_blend_enabled (CoglPipeline *pipeline,
|
||||||
CoglPipelineBlendEnable enable);
|
CoglPipelineBlendEnable enable);
|
||||||
|
|
||||||
gboolean
|
|
||||||
_cogl_pipeline_get_fog_enabled (CoglPipeline *pipeline);
|
|
||||||
|
|
||||||
#ifdef COGL_DEBUG_ENABLED
|
#ifdef COGL_DEBUG_ENABLED
|
||||||
void
|
void
|
||||||
_cogl_pipeline_set_static_breadcrumb (CoglPipeline *pipeline,
|
_cogl_pipeline_set_static_breadcrumb (CoglPipeline *pipeline,
|
||||||
|
@ -49,10 +49,6 @@ _cogl_pipeline_has_non_layer_vertex_snippets (CoglPipeline *pipeline);
|
|||||||
gboolean
|
gboolean
|
||||||
_cogl_pipeline_has_non_layer_fragment_snippets (CoglPipeline *pipeline);
|
_cogl_pipeline_has_non_layer_fragment_snippets (CoglPipeline *pipeline);
|
||||||
|
|
||||||
void
|
|
||||||
_cogl_pipeline_set_fog_state (CoglPipeline *pipeline,
|
|
||||||
const CoglPipelineFogState *fog_state);
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_cogl_pipeline_color_equal (CoglPipeline *authority0,
|
_cogl_pipeline_color_equal (CoglPipeline *authority0,
|
||||||
CoglPipeline *authority1);
|
CoglPipeline *authority1);
|
||||||
@ -77,10 +73,6 @@ gboolean
|
|||||||
_cogl_pipeline_depth_state_equal (CoglPipeline *authority0,
|
_cogl_pipeline_depth_state_equal (CoglPipeline *authority0,
|
||||||
CoglPipeline *authority1);
|
CoglPipeline *authority1);
|
||||||
|
|
||||||
gboolean
|
|
||||||
_cogl_pipeline_fog_state_equal (CoglPipeline *authority0,
|
|
||||||
CoglPipeline *authority1);
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_cogl_pipeline_non_zero_point_size_equal (CoglPipeline *authority0,
|
_cogl_pipeline_non_zero_point_size_equal (CoglPipeline *authority0,
|
||||||
CoglPipeline *authority1);
|
CoglPipeline *authority1);
|
||||||
@ -152,10 +144,6 @@ void
|
|||||||
_cogl_pipeline_hash_depth_state (CoglPipeline *authority,
|
_cogl_pipeline_hash_depth_state (CoglPipeline *authority,
|
||||||
CoglPipelineHashState *state);
|
CoglPipelineHashState *state);
|
||||||
|
|
||||||
void
|
|
||||||
_cogl_pipeline_hash_fog_state (CoglPipeline *authority,
|
|
||||||
CoglPipelineHashState *state);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_pipeline_hash_non_zero_point_size_state (CoglPipeline *authority,
|
_cogl_pipeline_hash_non_zero_point_size_state (CoglPipeline *authority,
|
||||||
CoglPipelineHashState *state);
|
CoglPipelineHashState *state);
|
||||||
|
@ -177,24 +177,6 @@ _cogl_pipeline_depth_state_equal (CoglPipeline *authority0,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
_cogl_pipeline_fog_state_equal (CoglPipeline *authority0,
|
|
||||||
CoglPipeline *authority1)
|
|
||||||
{
|
|
||||||
CoglPipelineFogState *fog_state0 = &authority0->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
|
gboolean
|
||||||
_cogl_pipeline_non_zero_point_size_equal (CoglPipeline *authority0,
|
_cogl_pipeline_non_zero_point_size_equal (CoglPipeline *authority0,
|
||||||
CoglPipeline *authority1)
|
CoglPipeline *authority1)
|
||||||
@ -1246,41 +1228,6 @@ cogl_pipeline_set_color_mask (CoglPipeline *pipeline,
|
|||||||
_cogl_pipeline_logic_ops_state_equal);
|
_cogl_pipeline_logic_ops_state_equal);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_cogl_pipeline_set_fog_state (CoglPipeline *pipeline,
|
|
||||||
const CoglPipelineFogState *fog_state)
|
|
||||||
{
|
|
||||||
CoglPipelineState state = COGL_PIPELINE_STATE_FOG;
|
|
||||||
CoglPipeline *authority;
|
|
||||||
CoglPipelineFogState *current_fog_state;
|
|
||||||
|
|
||||||
_COGL_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
|
void
|
||||||
cogl_pipeline_set_cull_face_mode (CoglPipeline *pipeline,
|
cogl_pipeline_set_cull_face_mode (CoglPipeline *pipeline,
|
||||||
CoglPipelineCullFaceMode cull_face_mode)
|
CoglPipelineCullFaceMode cull_face_mode)
|
||||||
@ -1904,23 +1851,6 @@ _cogl_pipeline_hash_depth_state (CoglPipeline *authority,
|
|||||||
state->hash = hash;
|
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
|
void
|
||||||
_cogl_pipeline_hash_non_zero_point_size_state (CoglPipeline *authority,
|
_cogl_pipeline_hash_non_zero_point_size_state (CoglPipeline *authority,
|
||||||
CoglPipelineHashState *state)
|
CoglPipelineHashState *state)
|
||||||
|
@ -1014,13 +1014,6 @@ _cogl_pipeline_copy_differences (CoglPipeline *dest,
|
|||||||
sizeof (CoglDepthState));
|
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)
|
if (differences & COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE)
|
||||||
big_state->non_zero_point_size = src->big_state->non_zero_point_size;
|
big_state->non_zero_point_size = src->big_state->non_zero_point_size;
|
||||||
|
|
||||||
@ -1143,13 +1136,6 @@ _cogl_pipeline_init_multi_property_sparse_state (CoglPipeline *pipeline,
|
|||||||
sizeof (CoglDepthState));
|
sizeof (CoglDepthState));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case COGL_PIPELINE_STATE_FOG:
|
|
||||||
{
|
|
||||||
memcpy (&pipeline->big_state->fog_state,
|
|
||||||
&authority->big_state->fog_state,
|
|
||||||
sizeof (CoglPipelineFogState));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case COGL_PIPELINE_STATE_LOGIC_OPS:
|
case COGL_PIPELINE_STATE_LOGIC_OPS:
|
||||||
{
|
{
|
||||||
memcpy (&pipeline->big_state->logic_ops_state,
|
memcpy (&pipeline->big_state->logic_ops_state,
|
||||||
@ -2298,11 +2284,6 @@ _cogl_pipeline_equal (CoglPipeline *pipeline0,
|
|||||||
authorities1[bit]))
|
authorities1[bit]))
|
||||||
goto done;
|
goto done;
|
||||||
break;
|
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:
|
case COGL_PIPELINE_STATE_CULL_FACE_INDEX:
|
||||||
if (!_cogl_pipeline_cull_face_state_equal (authorities0[bit],
|
if (!_cogl_pipeline_cull_face_state_equal (authorities0[bit],
|
||||||
authorities1[bit]))
|
authorities1[bit]))
|
||||||
@ -2441,18 +2422,6 @@ _cogl_pipeline_update_authority (CoglPipeline *pipeline,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
_cogl_pipeline_get_fog_enabled (CoglPipeline *pipeline)
|
|
||||||
{
|
|
||||||
CoglPipeline *authority;
|
|
||||||
|
|
||||||
_COGL_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
|
unsigned long
|
||||||
_cogl_pipeline_get_age (CoglPipeline *pipeline)
|
_cogl_pipeline_get_age (CoglPipeline *pipeline)
|
||||||
{
|
{
|
||||||
@ -2614,9 +2583,6 @@ _cogl_pipeline_apply_legacy_state (CoglPipeline *pipeline)
|
|||||||
cogl_pipeline_set_depth_state (pipeline, &depth_state, NULL);
|
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)
|
if (ctx->legacy_backface_culling_enabled)
|
||||||
cogl_pipeline_set_cull_face_mode (pipeline,
|
cogl_pipeline_set_cull_face_mode (pipeline,
|
||||||
COGL_PIPELINE_CULL_FACE_MODE_BACK);
|
COGL_PIPELINE_CULL_FACE_MODE_BACK);
|
||||||
@ -2766,8 +2732,6 @@ _cogl_pipeline_init_state_hash_functions (void)
|
|||||||
_cogl_pipeline_hash_user_shader_state;
|
_cogl_pipeline_hash_user_shader_state;
|
||||||
state_hash_functions[COGL_PIPELINE_STATE_DEPTH_INDEX] =
|
state_hash_functions[COGL_PIPELINE_STATE_DEPTH_INDEX] =
|
||||||
_cogl_pipeline_hash_depth_state;
|
_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] =
|
state_hash_functions[COGL_PIPELINE_STATE_CULL_FACE_INDEX] =
|
||||||
_cogl_pipeline_hash_cull_face_state;
|
_cogl_pipeline_hash_cull_face_state;
|
||||||
state_hash_functions[COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE_INDEX] =
|
state_hash_functions[COGL_PIPELINE_STATE_NON_ZERO_POINT_SIZE_INDEX] =
|
||||||
@ -2787,7 +2751,7 @@ _cogl_pipeline_init_state_hash_functions (void)
|
|||||||
|
|
||||||
{
|
{
|
||||||
/* So we get a big error if we forget to update this code! */
|
/* So we get a big error if we forget to update this code! */
|
||||||
_COGL_STATIC_ASSERT (COGL_PIPELINE_STATE_SPARSE_COUNT == 18,
|
_COGL_STATIC_ASSERT (COGL_PIPELINE_STATE_SPARSE_COUNT == 17,
|
||||||
"Make sure to install a hash function for "
|
"Make sure to install a hash function for "
|
||||||
"newly added pipeline state and update assert "
|
"newly added pipeline state and update assert "
|
||||||
"in _cogl_pipeline_init_state_hash_functions");
|
"in _cogl_pipeline_init_state_hash_functions");
|
||||||
|
@ -476,41 +476,6 @@ typedef enum
|
|||||||
COGL_TEXTURE_NO_ATLAS = 1 << 2
|
COGL_TEXTURE_NO_ATLAS = 1 << 2
|
||||||
} CoglTextureFlags;
|
} 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:
|
* COGL_BLEND_STRING_ERROR:
|
||||||
*
|
*
|
||||||
|
@ -279,37 +279,6 @@ cogl_get_bitmasks (int *red,
|
|||||||
*alpha = cogl_framebuffer_get_alpha_bits (framebuffer);
|
*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
|
void
|
||||||
cogl_flush (void)
|
cogl_flush (void)
|
||||||
{
|
{
|
||||||
|
@ -187,8 +187,6 @@ cogl_depth_state_set_range
|
|||||||
cogl_depth_state_set_write_enabled
|
cogl_depth_state_set_write_enabled
|
||||||
cogl_depth_test_function_get_type
|
cogl_depth_test_function_get_type
|
||||||
|
|
||||||
cogl_disable_fog
|
|
||||||
|
|
||||||
#ifdef COGL_HAS_GTYPE_SUPPORT
|
#ifdef COGL_HAS_GTYPE_SUPPORT
|
||||||
cogl_display_get_gtype
|
cogl_display_get_gtype
|
||||||
#endif
|
#endif
|
||||||
@ -232,8 +230,6 @@ cogl_fixed_sin
|
|||||||
cogl_fixed_sqrt
|
cogl_fixed_sqrt
|
||||||
cogl_fixed_tan
|
cogl_fixed_tan
|
||||||
|
|
||||||
cogl_fog_mode_get_type
|
|
||||||
|
|
||||||
cogl_foreach_feature
|
cogl_foreach_feature
|
||||||
|
|
||||||
cogl_flush
|
cogl_flush
|
||||||
@ -825,7 +821,6 @@ cogl_set_depth_test_enabled
|
|||||||
#ifndef COGL_DISABLE_DEPRECATED
|
#ifndef COGL_DISABLE_DEPRECATED
|
||||||
cogl_set_draw_buffer
|
cogl_set_draw_buffer
|
||||||
#endif
|
#endif
|
||||||
cogl_set_fog
|
|
||||||
#ifdef COGL_HAS_SDL_SUPPORT
|
#ifdef COGL_HAS_SDL_SUPPORT
|
||||||
cogl_sdl_context_new
|
cogl_sdl_context_new
|
||||||
cogl_sdl_handle_event
|
cogl_sdl_handle_event
|
||||||
|
@ -496,53 +496,6 @@ COGL_DEPRECATED_FOR (cogl_pipeline_get_cull_face_mode)
|
|||||||
gboolean
|
gboolean
|
||||||
cogl_get_backface_culling_enabled (void);
|
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().
|
|
||||||
*
|
|
||||||
* <note>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.</note>
|
|
||||||
*
|
|
||||||
* 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:
|
* cogl_clear:
|
||||||
* @color: Background color to clear to
|
* @color: Background color to clear to
|
||||||
@ -819,8 +772,7 @@ cogl_flush (void);
|
|||||||
*
|
*
|
||||||
* The result is that the OpenGL modelview matrix will be setup; the state
|
* The result is that the OpenGL modelview matrix will be setup; the state
|
||||||
* corresponding to the current source material will be set up and other world
|
* corresponding to the current source material will be set up and other world
|
||||||
* state such as backface culling, depth and fogging enabledness will be sent
|
* state such as backface culling and depth enabledness will be sent to OpenGL.
|
||||||
* to OpenGL.
|
|
||||||
*
|
*
|
||||||
* <note>No special material state is flushed, so if you want Cogl to setup a
|
* <note>No special material state is flushed, so if you want Cogl to setup a
|
||||||
* simplified material state it is your responsibility to set a simple source
|
* simplified material state it is your responsibility to set a simple source
|
||||||
|
@ -65,10 +65,6 @@ COGL_EXT_BEGIN (fixed_function_core,
|
|||||||
"\0")
|
"\0")
|
||||||
COGL_EXT_FUNCTION (void, glAlphaFunc,
|
COGL_EXT_FUNCTION (void, glAlphaFunc,
|
||||||
(GLenum func, GLclampf ref))
|
(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,
|
COGL_EXT_FUNCTION (void, glLoadMatrixf,
|
||||||
(const GLfloat *m))
|
(const GLfloat *m))
|
||||||
COGL_EXT_FUNCTION (void, glMaterialfv,
|
COGL_EXT_FUNCTION (void, glMaterialfv,
|
||||||
|
Loading…
Reference in New Issue
Block a user