mirror of
https://github.com/brl/mutter.git
synced 2025-02-17 21:54:10 +00:00
cogl: Remove CoglBool, use gboolean instead
This basically reverts commit 54735dec, which tried to avoid the GLib-defined types in favor the standard C ones. One exception to this is the bool type, for which the commit introduces a new type CoglBool. Let's just get rid of this type in favor of having consistency with the GLib types. Note by the way that neither CoglBool nor gboolean (which has a size of `int`) are completely compatible with bool (size `char`). https://gitlab.gnome.org/GNOME/mutter/merge_requests/321
This commit is contained in:
parent
6fe46cac60
commit
a81435ab5f
@ -678,8 +678,8 @@ static gboolean
|
|||||||
check_onscreen_template (CoglRenderer *renderer,
|
check_onscreen_template (CoglRenderer *renderer,
|
||||||
CoglSwapChain *swap_chain,
|
CoglSwapChain *swap_chain,
|
||||||
CoglOnscreenTemplate *onscreen_template,
|
CoglOnscreenTemplate *onscreen_template,
|
||||||
CoglBool enable_argb,
|
gboolean enable_argb,
|
||||||
CoglBool enable_stereo,
|
gboolean enable_stereo,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GError *internal_error = NULL;
|
GError *internal_error = NULL;
|
||||||
|
@ -47,7 +47,7 @@ typedef struct _CoglPangoDisplayListRectangle CoglPangoDisplayListRectangle;
|
|||||||
|
|
||||||
struct _CoglPangoDisplayList
|
struct _CoglPangoDisplayList
|
||||||
{
|
{
|
||||||
CoglBool color_override;
|
gboolean color_override;
|
||||||
CoglColor color;
|
CoglColor color;
|
||||||
GSList *nodes;
|
GSList *nodes;
|
||||||
GSList *last_node;
|
GSList *last_node;
|
||||||
@ -65,7 +65,7 @@ struct _CoglPangoDisplayListNode
|
|||||||
{
|
{
|
||||||
CoglPangoDisplayListNodeType type;
|
CoglPangoDisplayListNodeType type;
|
||||||
|
|
||||||
CoglBool color_override;
|
gboolean color_override;
|
||||||
CoglColor color;
|
CoglColor color;
|
||||||
|
|
||||||
CoglPipeline *pipeline;
|
CoglPipeline *pipeline;
|
||||||
@ -273,7 +273,7 @@ emit_vertex_buffer_geometry (CoglFramebuffer *fb,
|
|||||||
CoglAttributeBuffer *buffer;
|
CoglAttributeBuffer *buffer;
|
||||||
CoglVertexP2T2 *verts, *v;
|
CoglVertexP2T2 *verts, *v;
|
||||||
int n_verts;
|
int n_verts;
|
||||||
CoglBool allocated = FALSE;
|
gboolean allocated = FALSE;
|
||||||
CoglAttribute *attributes[2];
|
CoglAttribute *attributes[2];
|
||||||
CoglPrimitive *prim;
|
CoglPrimitive *prim;
|
||||||
int i;
|
int i;
|
||||||
|
@ -153,7 +153,7 @@ cogl_pango_font_map_clear_glyph_cache (CoglPangoFontMap *fm)
|
|||||||
|
|
||||||
void
|
void
|
||||||
cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *fm,
|
cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *fm,
|
||||||
CoglBool value)
|
gboolean value)
|
||||||
{
|
{
|
||||||
PangoRenderer *renderer = _cogl_pango_font_map_get_renderer (fm);
|
PangoRenderer *renderer = _cogl_pango_font_map_get_renderer (fm);
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *fm,
|
|||||||
value);
|
value);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_pango_font_map_get_use_mipmapping (CoglPangoFontMap *fm)
|
cogl_pango_font_map_get_use_mipmapping (CoglPangoFontMap *fm)
|
||||||
{
|
{
|
||||||
PangoRenderer *renderer = _cogl_pango_font_map_get_renderer (fm);
|
PangoRenderer *renderer = _cogl_pango_font_map_get_renderer (fm);
|
||||||
|
@ -54,16 +54,16 @@ struct _CoglPangoGlyphCache
|
|||||||
/* TRUE if we've ever stored a texture in the global atlas. This is
|
/* TRUE if we've ever stored a texture in the global atlas. This is
|
||||||
used to make sure we only register one callback to listen for
|
used to make sure we only register one callback to listen for
|
||||||
global atlas reorganizations */
|
global atlas reorganizations */
|
||||||
CoglBool using_global_atlas;
|
gboolean using_global_atlas;
|
||||||
|
|
||||||
/* True if some of the glyphs are dirty. This is used as an
|
/* True if some of the glyphs are dirty. This is used as an
|
||||||
optimization in _cogl_pango_glyph_cache_set_dirty_glyphs to avoid
|
optimization in _cogl_pango_glyph_cache_set_dirty_glyphs to avoid
|
||||||
iterating the hash table if we know none of them are dirty */
|
iterating the hash table if we know none of them are dirty */
|
||||||
CoglBool has_dirty_glyphs;
|
gboolean has_dirty_glyphs;
|
||||||
|
|
||||||
/* Whether mipmapping is being used for this cache. This only
|
/* Whether mipmapping is being used for this cache. This only
|
||||||
affects whether we decide to put the glyph in the global atlas */
|
affects whether we decide to put the glyph in the global atlas */
|
||||||
CoglBool use_mipmapping;
|
gboolean use_mipmapping;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _CoglPangoGlyphCacheKey
|
struct _CoglPangoGlyphCacheKey
|
||||||
@ -100,7 +100,7 @@ cogl_pango_glyph_cache_hash_func (const void *key)
|
|||||||
return GPOINTER_TO_UINT (cache_key->font) ^ cache_key->glyph;
|
return GPOINTER_TO_UINT (cache_key->font) ^ cache_key->glyph;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
cogl_pango_glyph_cache_equal_func (const void *a, const void *b)
|
cogl_pango_glyph_cache_equal_func (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
const CoglPangoGlyphCacheKey *key_a
|
const CoglPangoGlyphCacheKey *key_a
|
||||||
@ -117,7 +117,7 @@ cogl_pango_glyph_cache_equal_func (const void *a, const void *b)
|
|||||||
|
|
||||||
CoglPangoGlyphCache *
|
CoglPangoGlyphCache *
|
||||||
cogl_pango_glyph_cache_new (CoglContext *ctx,
|
cogl_pango_glyph_cache_new (CoglContext *ctx,
|
||||||
CoglBool use_mipmapping)
|
gboolean use_mipmapping)
|
||||||
{
|
{
|
||||||
CoglPangoGlyphCache *cache;
|
CoglPangoGlyphCache *cache;
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ cogl_pango_glyph_cache_update_position_cb (void *user_data,
|
|||||||
value->dirty = TRUE;
|
value->dirty = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
cogl_pango_glyph_cache_add_to_global_atlas (CoglPangoGlyphCache *cache,
|
cogl_pango_glyph_cache_add_to_global_atlas (CoglPangoGlyphCache *cache,
|
||||||
PangoFont *font,
|
PangoFont *font,
|
||||||
PangoGlyph glyph,
|
PangoGlyph glyph,
|
||||||
@ -259,7 +259,7 @@ cogl_pango_glyph_cache_add_to_global_atlas (CoglPangoGlyphCache *cache,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
cogl_pango_glyph_cache_add_to_local_atlas (CoglPangoGlyphCache *cache,
|
cogl_pango_glyph_cache_add_to_local_atlas (CoglPangoGlyphCache *cache,
|
||||||
PangoFont *font,
|
PangoFont *font,
|
||||||
PangoGlyph glyph,
|
PangoGlyph glyph,
|
||||||
@ -309,7 +309,7 @@ cogl_pango_glyph_cache_add_to_local_atlas (CoglPangoGlyphCache *cache,
|
|||||||
|
|
||||||
CoglPangoGlyphCacheValue *
|
CoglPangoGlyphCacheValue *
|
||||||
cogl_pango_glyph_cache_lookup (CoglPangoGlyphCache *cache,
|
cogl_pango_glyph_cache_lookup (CoglPangoGlyphCache *cache,
|
||||||
CoglBool create,
|
gboolean create,
|
||||||
PangoFont *font,
|
PangoFont *font,
|
||||||
PangoGlyph glyph)
|
PangoGlyph glyph)
|
||||||
{
|
{
|
||||||
|
@ -58,7 +58,7 @@ struct _CoglPangoGlyphCacheValue
|
|||||||
|
|
||||||
/* This will be set to TRUE when the glyph atlas is reorganized
|
/* This will be set to TRUE when the glyph atlas is reorganized
|
||||||
which means the glyph will need to be redrawn */
|
which means the glyph will need to be redrawn */
|
||||||
CoglBool dirty;
|
gboolean dirty;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (* CoglPangoGlyphCacheDirtyFunc) (PangoFont *font,
|
typedef void (* CoglPangoGlyphCacheDirtyFunc) (PangoFont *font,
|
||||||
@ -67,14 +67,14 @@ typedef void (* CoglPangoGlyphCacheDirtyFunc) (PangoFont *font,
|
|||||||
|
|
||||||
CoglPangoGlyphCache *
|
CoglPangoGlyphCache *
|
||||||
cogl_pango_glyph_cache_new (CoglContext *ctx,
|
cogl_pango_glyph_cache_new (CoglContext *ctx,
|
||||||
CoglBool use_mipmapping);
|
gboolean use_mipmapping);
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_pango_glyph_cache_free (CoglPangoGlyphCache *cache);
|
cogl_pango_glyph_cache_free (CoglPangoGlyphCache *cache);
|
||||||
|
|
||||||
CoglPangoGlyphCacheValue *
|
CoglPangoGlyphCacheValue *
|
||||||
cogl_pango_glyph_cache_lookup (CoglPangoGlyphCache *cache,
|
cogl_pango_glyph_cache_lookup (CoglPangoGlyphCache *cache,
|
||||||
CoglBool create,
|
gboolean create,
|
||||||
PangoFont *font,
|
PangoFont *font,
|
||||||
PangoGlyph glyph);
|
PangoGlyph glyph);
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ _cogl_pango_pipeline_cache_value_destroy (void *data)
|
|||||||
|
|
||||||
CoglPangoPipelineCache *
|
CoglPangoPipelineCache *
|
||||||
_cogl_pango_pipeline_cache_new (CoglContext *ctx,
|
_cogl_pango_pipeline_cache_new (CoglContext *ctx,
|
||||||
CoglBool use_mipmapping)
|
gboolean use_mipmapping)
|
||||||
{
|
{
|
||||||
CoglPangoPipelineCache *cache = g_new (CoglPangoPipelineCache, 1);
|
CoglPangoPipelineCache *cache = g_new (CoglPangoPipelineCache, 1);
|
||||||
|
|
||||||
|
@ -49,13 +49,13 @@ typedef struct _CoglPangoPipelineCache
|
|||||||
CoglPipeline *base_texture_alpha_pipeline;
|
CoglPipeline *base_texture_alpha_pipeline;
|
||||||
CoglPipeline *base_texture_rgba_pipeline;
|
CoglPipeline *base_texture_rgba_pipeline;
|
||||||
|
|
||||||
CoglBool use_mipmapping;
|
gboolean use_mipmapping;
|
||||||
} CoglPangoPipelineCache;
|
} CoglPangoPipelineCache;
|
||||||
|
|
||||||
|
|
||||||
CoglPangoPipelineCache *
|
CoglPangoPipelineCache *
|
||||||
_cogl_pango_pipeline_cache_new (CoglContext *ctx,
|
_cogl_pango_pipeline_cache_new (CoglContext *ctx,
|
||||||
CoglBool use_mipmapping);
|
gboolean use_mipmapping);
|
||||||
|
|
||||||
/* Returns a pipeline that can be used to render glyphs in the given
|
/* Returns a pipeline that can be used to render glyphs in the given
|
||||||
texture. The pipeline has a new reference so it is up to the caller
|
texture. The pipeline has a new reference so it is up to the caller
|
||||||
|
@ -48,8 +48,8 @@ _cogl_pango_renderer_clear_glyph_cache (CoglPangoRenderer *renderer);
|
|||||||
|
|
||||||
void
|
void
|
||||||
_cogl_pango_renderer_set_use_mipmapping (CoglPangoRenderer *renderer,
|
_cogl_pango_renderer_set_use_mipmapping (CoglPangoRenderer *renderer,
|
||||||
CoglBool value);
|
gboolean value);
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pango_renderer_get_use_mipmapping (CoglPangoRenderer *renderer);
|
_cogl_pango_renderer_get_use_mipmapping (CoglPangoRenderer *renderer);
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ struct _CoglPangoRenderer
|
|||||||
CoglPangoRendererCaches no_mipmap_caches;
|
CoglPangoRendererCaches no_mipmap_caches;
|
||||||
CoglPangoRendererCaches mipmap_caches;
|
CoglPangoRendererCaches mipmap_caches;
|
||||||
|
|
||||||
CoglBool use_mipmapping;
|
gboolean use_mipmapping;
|
||||||
|
|
||||||
/* The current display list that is being built */
|
/* The current display list that is being built */
|
||||||
CoglPangoDisplayList *display_list;
|
CoglPangoDisplayList *display_list;
|
||||||
@ -102,7 +102,7 @@ struct _CoglPangoLayoutQdata
|
|||||||
/* Whether mipmapping was previously used to render this layout. We
|
/* Whether mipmapping was previously used to render this layout. We
|
||||||
need to regenerate the display list if the mipmapping value is
|
need to regenerate the display list if the mipmapping value is
|
||||||
changed because it will be using a different set of textures */
|
changed because it will be using a different set of textures */
|
||||||
CoglBool mipmapping_used;
|
gboolean mipmapping_used;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -534,12 +534,12 @@ _cogl_pango_renderer_clear_glyph_cache (CoglPangoRenderer *renderer)
|
|||||||
|
|
||||||
void
|
void
|
||||||
_cogl_pango_renderer_set_use_mipmapping (CoglPangoRenderer *renderer,
|
_cogl_pango_renderer_set_use_mipmapping (CoglPangoRenderer *renderer,
|
||||||
CoglBool value)
|
gboolean value)
|
||||||
{
|
{
|
||||||
renderer->use_mipmapping = value;
|
renderer->use_mipmapping = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pango_renderer_get_use_mipmapping (CoglPangoRenderer *renderer)
|
_cogl_pango_renderer_get_use_mipmapping (CoglPangoRenderer *renderer)
|
||||||
{
|
{
|
||||||
return renderer->use_mipmapping;
|
return renderer->use_mipmapping;
|
||||||
@ -547,7 +547,7 @@ _cogl_pango_renderer_get_use_mipmapping (CoglPangoRenderer *renderer)
|
|||||||
|
|
||||||
static CoglPangoGlyphCacheValue *
|
static CoglPangoGlyphCacheValue *
|
||||||
cogl_pango_renderer_get_cached_glyph (PangoRenderer *renderer,
|
cogl_pango_renderer_get_cached_glyph (PangoRenderer *renderer,
|
||||||
CoglBool create,
|
gboolean create,
|
||||||
PangoFont *font,
|
PangoFont *font,
|
||||||
PangoGlyph glyph)
|
PangoGlyph glyph)
|
||||||
{
|
{
|
||||||
|
@ -144,7 +144,7 @@ cogl_pango_ensure_glyph_cache_for_layout (PangoLayout *layout);
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *font_map,
|
cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *font_map,
|
||||||
CoglBool value);
|
gboolean value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_pango_font_map_get_use_mipmapping:
|
* cogl_pango_font_map_get_use_mipmapping:
|
||||||
@ -157,7 +157,7 @@ cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *font_map,
|
|||||||
*
|
*
|
||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_pango_font_map_get_use_mipmapping (CoglPangoFontMap *font_map);
|
cogl_pango_font_map_get_use_mipmapping (CoglPangoFontMap *font_map);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -96,7 +96,7 @@ cogl_path_copy (CoglPath *path);
|
|||||||
*
|
*
|
||||||
* Since: 2.0
|
* Since: 2.0
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_path (void *object);
|
cogl_is_path (void *object);
|
||||||
|
|
||||||
#define cogl_path_move_to cogl2_path_move_to
|
#define cogl_path_move_to cogl2_path_move_to
|
||||||
|
@ -105,13 +105,13 @@ struct _CoglPathData
|
|||||||
case and divert to the journal or a rectangle clip. If it is TRUE
|
case and divert to the journal or a rectangle clip. If it is TRUE
|
||||||
then the entire path can be described by calling
|
then the entire path can be described by calling
|
||||||
_cogl_path_get_bounds */
|
_cogl_path_get_bounds */
|
||||||
CoglBool is_rectangle;
|
gboolean is_rectangle;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_add_path_to_stencil_buffer (CoglPath *path,
|
_cogl_add_path_to_stencil_buffer (CoglPath *path,
|
||||||
CoglBool merge,
|
gboolean merge,
|
||||||
CoglBool need_clear);
|
gboolean need_clear);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_path_get_bounds (CoglPath *path,
|
_cogl_path_get_bounds (CoglPath *path,
|
||||||
@ -120,7 +120,7 @@ _cogl_path_get_bounds (CoglPath *path,
|
|||||||
float *max_x,
|
float *max_x,
|
||||||
float *max_y);
|
float *max_y);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_path_is_rectangle (CoglPath *path);
|
_cogl_path_is_rectangle (CoglPath *path);
|
||||||
|
|
||||||
#endif /* __COGL_PATH_PRIVATE_H */
|
#endif /* __COGL_PATH_PRIVATE_H */
|
||||||
|
@ -169,7 +169,7 @@ cogl2_path_get_fill_rule (CoglPath *path)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
_cogl_path_add_node (CoglPath *path,
|
_cogl_path_add_node (CoglPath *path,
|
||||||
CoglBool new_sub_path,
|
gboolean new_sub_path,
|
||||||
float x,
|
float x,
|
||||||
float y)
|
float y)
|
||||||
{
|
{
|
||||||
@ -299,7 +299,7 @@ _cogl_path_fill_nodes_with_clipped_rectangle (CoglPath *path,
|
|||||||
/* We need at least three stencil bits to combine clips */
|
/* We need at least three stencil bits to combine clips */
|
||||||
if (_cogl_framebuffer_get_stencil_bits (framebuffer) >= 3)
|
if (_cogl_framebuffer_get_stencil_bits (framebuffer) >= 3)
|
||||||
{
|
{
|
||||||
static CoglBool seen_warning = FALSE;
|
static gboolean seen_warning = FALSE;
|
||||||
|
|
||||||
if (!seen_warning)
|
if (!seen_warning)
|
||||||
{
|
{
|
||||||
@ -320,10 +320,10 @@ _cogl_path_fill_nodes_with_clipped_rectangle (CoglPath *path,
|
|||||||
cogl_framebuffer_pop_clip (framebuffer);
|
cogl_framebuffer_pop_clip (framebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
validate_layer_cb (CoglPipelineLayer *layer, void *user_data)
|
validate_layer_cb (CoglPipelineLayer *layer, void *user_data)
|
||||||
{
|
{
|
||||||
CoglBool *needs_fallback = user_data;
|
gboolean *needs_fallback = user_data;
|
||||||
CoglTexture *texture = _cogl_pipeline_layer_get_texture (layer);
|
CoglTexture *texture = _cogl_pipeline_layer_get_texture (layer);
|
||||||
|
|
||||||
/* If any of the layers of the current pipeline contain sliced
|
/* If any of the layers of the current pipeline contain sliced
|
||||||
@ -365,7 +365,7 @@ _cogl_path_fill_nodes (CoglPath *path,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CoglBool needs_fallback = FALSE;
|
gboolean needs_fallback = FALSE;
|
||||||
CoglPrimitive *primitive;
|
CoglPrimitive *primitive;
|
||||||
|
|
||||||
_cogl_pipeline_foreach_layer_internal (pipeline,
|
_cogl_pipeline_foreach_layer_internal (pipeline,
|
||||||
@ -538,7 +538,7 @@ cogl2_path_rectangle (CoglPath *path,
|
|||||||
float x_2,
|
float x_2,
|
||||||
float y_2)
|
float y_2)
|
||||||
{
|
{
|
||||||
CoglBool is_rectangle;
|
gboolean is_rectangle;
|
||||||
|
|
||||||
/* If the path was previously empty and the rectangle isn't mirrored
|
/* If the path was previously empty and the rectangle isn't mirrored
|
||||||
then we'll record that this is a simple rectangle path so that we
|
then we'll record that this is a simple rectangle path so that we
|
||||||
@ -556,7 +556,7 @@ cogl2_path_rectangle (CoglPath *path,
|
|||||||
path->data->is_rectangle = is_rectangle;
|
path->data->is_rectangle = is_rectangle;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_path_is_rectangle (CoglPath *path)
|
_cogl_path_is_rectangle (CoglPath *path)
|
||||||
{
|
{
|
||||||
return path->data->is_rectangle;
|
return path->data->is_rectangle;
|
||||||
|
@ -63,7 +63,7 @@ struct _CoglAtlasTexture
|
|||||||
|
|
||||||
CoglAtlasTexture *
|
CoglAtlasTexture *
|
||||||
_cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp,
|
_cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp,
|
||||||
CoglBool can_convert_in_place);
|
gboolean can_convert_in_place);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_atlas_texture_add_reorganize_callback (CoglContext *ctx,
|
_cogl_atlas_texture_add_reorganize_callback (CoglContext *ctx,
|
||||||
@ -75,7 +75,7 @@ _cogl_atlas_texture_remove_reorganize_callback (CoglContext *ctx,
|
|||||||
GHookFunc callback,
|
GHookFunc callback,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_is_atlas_texture (void *object);
|
_cogl_is_atlas_texture (void *object);
|
||||||
|
|
||||||
#endif /* _COGL_ATLAS_TEXTURE_PRIVATE_H_ */
|
#endif /* _COGL_ATLAS_TEXTURE_PRIVATE_H_ */
|
||||||
|
@ -299,7 +299,7 @@ _cogl_atlas_texture_get_max_waste (CoglTexture *tex)
|
|||||||
return cogl_texture_get_max_waste (atlas_tex->sub_texture);
|
return cogl_texture_get_max_waste (atlas_tex->sub_texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_atlas_texture_is_sliced (CoglTexture *tex)
|
_cogl_atlas_texture_is_sliced (CoglTexture *tex)
|
||||||
{
|
{
|
||||||
CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex);
|
CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex);
|
||||||
@ -308,7 +308,7 @@ _cogl_atlas_texture_is_sliced (CoglTexture *tex)
|
|||||||
return cogl_texture_is_sliced (atlas_tex->sub_texture);
|
return cogl_texture_is_sliced (atlas_tex->sub_texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_atlas_texture_can_hardware_repeat (CoglTexture *tex)
|
_cogl_atlas_texture_can_hardware_repeat (CoglTexture *tex)
|
||||||
{
|
{
|
||||||
CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex);
|
CoglAtlasTexture *atlas_tex = COGL_ATLAS_TEXTURE (tex);
|
||||||
@ -339,7 +339,7 @@ _cogl_atlas_texture_transform_quad_coords_to_gl (CoglTexture *tex,
|
|||||||
coords);
|
coords);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_atlas_texture_get_gl_texture (CoglTexture *tex,
|
_cogl_atlas_texture_get_gl_texture (CoglTexture *tex,
|
||||||
GLuint *out_gl_handle,
|
GLuint *out_gl_handle,
|
||||||
GLenum *out_gl_target)
|
GLenum *out_gl_target)
|
||||||
@ -444,7 +444,7 @@ _cogl_atlas_texture_ensure_non_quad_rendering (CoglTexture *tex)
|
|||||||
_cogl_texture_ensure_non_quad_rendering (atlas_tex->sub_texture);
|
_cogl_texture_ensure_non_quad_rendering (atlas_tex->sub_texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_atlas_texture_set_region_with_border (CoglAtlasTexture *atlas_tex,
|
_cogl_atlas_texture_set_region_with_border (CoglAtlasTexture *atlas_tex,
|
||||||
int src_x,
|
int src_x,
|
||||||
int src_y,
|
int src_y,
|
||||||
@ -523,7 +523,7 @@ static CoglBitmap *
|
|||||||
_cogl_atlas_texture_convert_bitmap_for_upload (CoglAtlasTexture *atlas_tex,
|
_cogl_atlas_texture_convert_bitmap_for_upload (CoglAtlasTexture *atlas_tex,
|
||||||
CoglBitmap *bmp,
|
CoglBitmap *bmp,
|
||||||
CoglPixelFormat internal_format,
|
CoglPixelFormat internal_format,
|
||||||
CoglBool can_convert_in_place,
|
gboolean can_convert_in_place,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
{
|
{
|
||||||
CoglBitmap *upload_bmp;
|
CoglBitmap *upload_bmp;
|
||||||
@ -564,7 +564,7 @@ _cogl_atlas_texture_convert_bitmap_for_upload (CoglAtlasTexture *atlas_tex,
|
|||||||
return override_bmp;
|
return override_bmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_atlas_texture_set_region (CoglTexture *tex,
|
_cogl_atlas_texture_set_region (CoglTexture *tex,
|
||||||
int src_x,
|
int src_x,
|
||||||
int src_y,
|
int src_y,
|
||||||
@ -585,7 +585,7 @@ _cogl_atlas_texture_set_region (CoglTexture *tex,
|
|||||||
pixels to the border */
|
pixels to the border */
|
||||||
if (atlas_tex->atlas)
|
if (atlas_tex->atlas)
|
||||||
{
|
{
|
||||||
CoglBool ret;
|
gboolean ret;
|
||||||
CoglBitmap *upload_bmp =
|
CoglBitmap *upload_bmp =
|
||||||
_cogl_atlas_texture_convert_bitmap_for_upload (atlas_tex,
|
_cogl_atlas_texture_convert_bitmap_for_upload (atlas_tex,
|
||||||
bmp,
|
bmp,
|
||||||
@ -639,7 +639,7 @@ _cogl_atlas_texture_get_gl_format (CoglTexture *tex)
|
|||||||
return _cogl_texture_gl_get_format (atlas_tex->sub_texture);
|
return _cogl_texture_gl_get_format (atlas_tex->sub_texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_atlas_texture_can_use_format (CoglPixelFormat format)
|
_cogl_atlas_texture_can_use_format (CoglPixelFormat format)
|
||||||
{
|
{
|
||||||
/* We don't care about the ordering or the premult status and we can
|
/* We don't care about the ordering or the premult status and we can
|
||||||
@ -706,7 +706,7 @@ cogl_atlas_texture_new_with_size (CoglContext *ctx,
|
|||||||
loader);
|
loader);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
allocate_space (CoglAtlasTexture *atlas_tex,
|
allocate_space (CoglAtlasTexture *atlas_tex,
|
||||||
int width,
|
int width,
|
||||||
int height,
|
int height,
|
||||||
@ -792,7 +792,7 @@ allocate_space (CoglAtlasTexture *atlas_tex,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
allocate_with_size (CoglAtlasTexture *atlas_tex,
|
allocate_with_size (CoglAtlasTexture *atlas_tex,
|
||||||
CoglTextureLoader *loader,
|
CoglTextureLoader *loader,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
@ -817,7 +817,7 @@ allocate_with_size (CoglAtlasTexture *atlas_tex,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
allocate_from_bitmap (CoglAtlasTexture *atlas_tex,
|
allocate_from_bitmap (CoglAtlasTexture *atlas_tex,
|
||||||
CoglTextureLoader *loader,
|
CoglTextureLoader *loader,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
@ -827,7 +827,7 @@ allocate_from_bitmap (CoglAtlasTexture *atlas_tex,
|
|||||||
CoglPixelFormat bmp_format = cogl_bitmap_get_format (bmp);
|
CoglPixelFormat bmp_format = cogl_bitmap_get_format (bmp);
|
||||||
int width = cogl_bitmap_get_width (bmp);
|
int width = cogl_bitmap_get_width (bmp);
|
||||||
int height = cogl_bitmap_get_height (bmp);
|
int height = cogl_bitmap_get_height (bmp);
|
||||||
CoglBool can_convert_in_place = loader->src.bitmap.can_convert_in_place;
|
gboolean can_convert_in_place = loader->src.bitmap.can_convert_in_place;
|
||||||
CoglPixelFormat internal_format;
|
CoglPixelFormat internal_format;
|
||||||
CoglBitmap *upload_bmp;
|
CoglBitmap *upload_bmp;
|
||||||
|
|
||||||
@ -878,7 +878,7 @@ allocate_from_bitmap (CoglAtlasTexture *atlas_tex,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_atlas_texture_allocate (CoglTexture *tex,
|
_cogl_atlas_texture_allocate (CoglTexture *tex,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
{
|
{
|
||||||
@ -902,7 +902,7 @@ _cogl_atlas_texture_allocate (CoglTexture *tex,
|
|||||||
|
|
||||||
CoglAtlasTexture *
|
CoglAtlasTexture *
|
||||||
_cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp,
|
_cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp,
|
||||||
CoglBool can_convert_in_place)
|
gboolean can_convert_in_place)
|
||||||
{
|
{
|
||||||
CoglTextureLoader *loader;
|
CoglTextureLoader *loader;
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp);
|
|||||||
* Since: 1.16
|
* Since: 1.16
|
||||||
* Stability: Unstable
|
* Stability: Unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_atlas_texture (void *object);
|
cogl_is_atlas_texture (void *object);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -362,7 +362,7 @@ _cogl_atlas_notify_post_reorganize (CoglAtlas *atlas)
|
|||||||
g_hook_list_invoke (&atlas->post_reorganize_callbacks, FALSE);
|
g_hook_list_invoke (&atlas->post_reorganize_callbacks, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_atlas_reserve_space (CoglAtlas *atlas,
|
_cogl_atlas_reserve_space (CoglAtlas *atlas,
|
||||||
unsigned int width,
|
unsigned int width,
|
||||||
unsigned int height,
|
unsigned int height,
|
||||||
@ -372,7 +372,7 @@ _cogl_atlas_reserve_space (CoglAtlas *atlas,
|
|||||||
CoglRectangleMap *new_map;
|
CoglRectangleMap *new_map;
|
||||||
CoglTexture2D *new_tex;
|
CoglTexture2D *new_tex;
|
||||||
unsigned int map_width = 0, map_height = 0;
|
unsigned int map_width = 0, map_height = 0;
|
||||||
CoglBool ret;
|
gboolean ret;
|
||||||
CoglRectangleMapEntry new_position;
|
CoglRectangleMapEntry new_position;
|
||||||
|
|
||||||
/* Check if we can fit the rectangle into the existing map */
|
/* Check if we can fit the rectangle into the existing map */
|
||||||
|
@ -69,7 +69,7 @@ _cogl_atlas_new (CoglPixelFormat texture_format,
|
|||||||
CoglAtlasFlags flags,
|
CoglAtlasFlags flags,
|
||||||
CoglAtlasUpdatePositionCallback update_position_cb);
|
CoglAtlasUpdatePositionCallback update_position_cb);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_atlas_reserve_space (CoglAtlas *atlas,
|
_cogl_atlas_reserve_space (CoglAtlas *atlas,
|
||||||
unsigned int width,
|
unsigned int width,
|
||||||
unsigned int height,
|
unsigned int height,
|
||||||
@ -99,7 +99,7 @@ _cogl_atlas_remove_reorganize_callback (CoglAtlas *atlas,
|
|||||||
GHookFunc post_callback,
|
GHookFunc post_callback,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_is_atlas (void *object);
|
_cogl_is_atlas (void *object);
|
||||||
|
|
||||||
#endif /* __COGL_ATLAS_H */
|
#endif /* __COGL_ATLAS_H */
|
||||||
|
@ -139,7 +139,7 @@ cogl_attribute_buffer_new (CoglContext *context,
|
|||||||
* Since: 1.4
|
* Since: 1.4
|
||||||
* Stability: Unstable
|
* Stability: Unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_attribute_buffer (void *object);
|
cogl_is_attribute_buffer (void *object);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -55,7 +55,7 @@ typedef struct _CoglAttributeNameState
|
|||||||
const char *name;
|
const char *name;
|
||||||
CoglAttributeNameID name_id;
|
CoglAttributeNameID name_id;
|
||||||
int name_index;
|
int name_index;
|
||||||
CoglBool normalized_default;
|
gboolean normalized_default;
|
||||||
int layer_number;
|
int layer_number;
|
||||||
} CoglAttributeNameState;
|
} CoglAttributeNameState;
|
||||||
|
|
||||||
@ -64,9 +64,9 @@ struct _CoglAttribute
|
|||||||
CoglObject _parent;
|
CoglObject _parent;
|
||||||
|
|
||||||
const CoglAttributeNameState *name_state;
|
const CoglAttributeNameState *name_state;
|
||||||
CoglBool normalized;
|
gboolean normalized;
|
||||||
|
|
||||||
CoglBool is_buffered;
|
gboolean is_buffered;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
|
@ -65,11 +65,11 @@ static void _cogl_attribute_free (CoglAttribute *attribute);
|
|||||||
COGL_OBJECT_DEFINE (Attribute, attribute);
|
COGL_OBJECT_DEFINE (Attribute, attribute);
|
||||||
COGL_GTYPE_DEFINE_CLASS (Attribute, attribute);
|
COGL_GTYPE_DEFINE_CLASS (Attribute, attribute);
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
validate_cogl_attribute_name (const char *name,
|
validate_cogl_attribute_name (const char *name,
|
||||||
const char **real_attribute_name,
|
const char **real_attribute_name,
|
||||||
CoglAttributeNameID *name_id,
|
CoglAttributeNameID *name_id,
|
||||||
CoglBool *normalized,
|
gboolean *normalized,
|
||||||
int *layer_number)
|
int *layer_number)
|
||||||
{
|
{
|
||||||
name = name + 5; /* skip "cogl_" */
|
name = name + 5; /* skip "cogl_" */
|
||||||
@ -166,7 +166,7 @@ error:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
validate_n_components (const CoglAttributeNameState *name_state,
|
validate_n_components (const CoglAttributeNameState *name_state,
|
||||||
int n_components)
|
int n_components)
|
||||||
{
|
{
|
||||||
@ -271,7 +271,7 @@ _cogl_attribute_new_const (CoglContext *context,
|
|||||||
const char *name,
|
const char *name,
|
||||||
int n_components,
|
int n_components,
|
||||||
int n_columns,
|
int n_columns,
|
||||||
CoglBool transpose,
|
gboolean transpose,
|
||||||
const float *value)
|
const float *value)
|
||||||
{
|
{
|
||||||
CoglAttribute *attribute = g_slice_new (CoglAttribute);
|
CoglAttribute *attribute = g_slice_new (CoglAttribute);
|
||||||
@ -428,7 +428,7 @@ CoglAttribute *
|
|||||||
cogl_attribute_new_const_2x2fv (CoglContext *context,
|
cogl_attribute_new_const_2x2fv (CoglContext *context,
|
||||||
const char *name,
|
const char *name,
|
||||||
const float *matrix2x2,
|
const float *matrix2x2,
|
||||||
CoglBool transpose)
|
gboolean transpose)
|
||||||
{
|
{
|
||||||
return _cogl_attribute_new_const (context,
|
return _cogl_attribute_new_const (context,
|
||||||
name,
|
name,
|
||||||
@ -442,7 +442,7 @@ CoglAttribute *
|
|||||||
cogl_attribute_new_const_3x3fv (CoglContext *context,
|
cogl_attribute_new_const_3x3fv (CoglContext *context,
|
||||||
const char *name,
|
const char *name,
|
||||||
const float *matrix3x3,
|
const float *matrix3x3,
|
||||||
CoglBool transpose)
|
gboolean transpose)
|
||||||
{
|
{
|
||||||
return _cogl_attribute_new_const (context,
|
return _cogl_attribute_new_const (context,
|
||||||
name,
|
name,
|
||||||
@ -456,7 +456,7 @@ CoglAttribute *
|
|||||||
cogl_attribute_new_const_4x4fv (CoglContext *context,
|
cogl_attribute_new_const_4x4fv (CoglContext *context,
|
||||||
const char *name,
|
const char *name,
|
||||||
const float *matrix4x4,
|
const float *matrix4x4,
|
||||||
CoglBool transpose)
|
gboolean transpose)
|
||||||
{
|
{
|
||||||
return _cogl_attribute_new_const (context,
|
return _cogl_attribute_new_const (context,
|
||||||
name,
|
name,
|
||||||
@ -466,7 +466,7 @@ cogl_attribute_new_const_4x4fv (CoglContext *context,
|
|||||||
matrix4x4);
|
matrix4x4);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_attribute_get_normalized (CoglAttribute *attribute)
|
cogl_attribute_get_normalized (CoglAttribute *attribute)
|
||||||
{
|
{
|
||||||
_COGL_RETURN_VAL_IF_FAIL (cogl_is_attribute (attribute), FALSE);
|
_COGL_RETURN_VAL_IF_FAIL (cogl_is_attribute (attribute), FALSE);
|
||||||
@ -477,7 +477,7 @@ cogl_attribute_get_normalized (CoglAttribute *attribute)
|
|||||||
static void
|
static void
|
||||||
warn_about_midscene_changes (void)
|
warn_about_midscene_changes (void)
|
||||||
{
|
{
|
||||||
static CoglBool seen = FALSE;
|
static gboolean seen = FALSE;
|
||||||
if (!seen)
|
if (!seen)
|
||||||
{
|
{
|
||||||
g_warning ("Mid-scene modification of attributes has "
|
g_warning ("Mid-scene modification of attributes has "
|
||||||
@ -488,7 +488,7 @@ warn_about_midscene_changes (void)
|
|||||||
|
|
||||||
void
|
void
|
||||||
cogl_attribute_set_normalized (CoglAttribute *attribute,
|
cogl_attribute_set_normalized (CoglAttribute *attribute,
|
||||||
CoglBool normalized)
|
gboolean normalized)
|
||||||
{
|
{
|
||||||
_COGL_RETURN_IF_FAIL (cogl_is_attribute (attribute));
|
_COGL_RETURN_IF_FAIL (cogl_is_attribute (attribute));
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ _cogl_attribute_free (CoglAttribute *attribute)
|
|||||||
g_slice_free (CoglAttribute, attribute);
|
g_slice_free (CoglAttribute, attribute);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
validate_layer_cb (CoglPipeline *pipeline,
|
validate_layer_cb (CoglPipeline *pipeline,
|
||||||
int layer_index,
|
int layer_index,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
@ -566,7 +566,7 @@ validate_layer_cb (CoglPipeline *pipeline,
|
|||||||
CoglTexture *texture =
|
CoglTexture *texture =
|
||||||
cogl_pipeline_get_layer_texture (pipeline, layer_index);
|
cogl_pipeline_get_layer_texture (pipeline, layer_index);
|
||||||
CoglFlushLayerState *state = user_data;
|
CoglFlushLayerState *state = user_data;
|
||||||
CoglBool status = TRUE;
|
gboolean status = TRUE;
|
||||||
|
|
||||||
/* invalid textures will be handled correctly in
|
/* invalid textures will be handled correctly in
|
||||||
* _cogl_pipeline_flush_layers_gl_state */
|
* _cogl_pipeline_flush_layers_gl_state */
|
||||||
|
@ -402,7 +402,7 @@ CoglAttribute *
|
|||||||
cogl_attribute_new_const_2x2fv (CoglContext *context,
|
cogl_attribute_new_const_2x2fv (CoglContext *context,
|
||||||
const char *name,
|
const char *name,
|
||||||
const float *matrix2x2,
|
const float *matrix2x2,
|
||||||
CoglBool transpose);
|
gboolean transpose);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_attribute_new_const_3x3fv:
|
* cogl_attribute_new_const_3x3fv:
|
||||||
@ -437,7 +437,7 @@ CoglAttribute *
|
|||||||
cogl_attribute_new_const_3x3fv (CoglContext *context,
|
cogl_attribute_new_const_3x3fv (CoglContext *context,
|
||||||
const char *name,
|
const char *name,
|
||||||
const float *matrix3x3,
|
const float *matrix3x3,
|
||||||
CoglBool transpose);
|
gboolean transpose);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_attribute_new_const_4x4fv:
|
* cogl_attribute_new_const_4x4fv:
|
||||||
@ -472,7 +472,7 @@ CoglAttribute *
|
|||||||
cogl_attribute_new_const_4x4fv (CoglContext *context,
|
cogl_attribute_new_const_4x4fv (CoglContext *context,
|
||||||
const char *name,
|
const char *name,
|
||||||
const float *matrix4x4,
|
const float *matrix4x4,
|
||||||
CoglBool transpose);
|
gboolean transpose);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_attribute_set_normalized:
|
* cogl_attribute_set_normalized:
|
||||||
@ -494,7 +494,7 @@ cogl_attribute_new_const_4x4fv (CoglContext *context,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cogl_attribute_set_normalized (CoglAttribute *attribute,
|
cogl_attribute_set_normalized (CoglAttribute *attribute,
|
||||||
CoglBool normalized);
|
gboolean normalized);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_attribute_get_normalized:
|
* cogl_attribute_get_normalized:
|
||||||
@ -506,7 +506,7 @@ cogl_attribute_set_normalized (CoglAttribute *attribute,
|
|||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_attribute_get_normalized (CoglAttribute *attribute);
|
cogl_attribute_get_normalized (CoglAttribute *attribute);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -545,7 +545,7 @@ cogl_attribute_set_buffer (CoglAttribute *attribute,
|
|||||||
* Return value: %TRUE if the @object references a #CoglAttribute,
|
* Return value: %TRUE if the @object references a #CoglAttribute,
|
||||||
* %FALSE otherwise
|
* %FALSE otherwise
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_attribute (void *object);
|
cogl_is_attribute (void *object);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -289,7 +289,7 @@ _cogl_bitmap_premult_unpacked_span_16 (uint16_t *data,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_bitmap_can_fast_premult (CoglPixelFormat format)
|
_cogl_bitmap_can_fast_premult (CoglPixelFormat format)
|
||||||
{
|
{
|
||||||
switch (format & ~COGL_PREMULT_BIT)
|
switch (format & ~COGL_PREMULT_BIT)
|
||||||
@ -305,7 +305,7 @@ _cogl_bitmap_can_fast_premult (CoglPixelFormat format)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_bitmap_needs_short_temp_buffer (CoglPixelFormat format)
|
_cogl_bitmap_needs_short_temp_buffer (CoglPixelFormat format)
|
||||||
{
|
{
|
||||||
/* If the format is using more than 8 bits per component then we'll
|
/* If the format is using more than 8 bits per component then we'll
|
||||||
@ -358,7 +358,7 @@ _cogl_bitmap_needs_short_temp_buffer (CoglPixelFormat format)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmap_convert_into_bitmap (CoglBitmap *src_bmp,
|
_cogl_bitmap_convert_into_bitmap (CoglBitmap *src_bmp,
|
||||||
CoglBitmap *dst_bmp,
|
CoglBitmap *dst_bmp,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
@ -374,8 +374,8 @@ _cogl_bitmap_convert_into_bitmap (CoglBitmap *src_bmp,
|
|||||||
int width, height;
|
int width, height;
|
||||||
CoglPixelFormat src_format;
|
CoglPixelFormat src_format;
|
||||||
CoglPixelFormat dst_format;
|
CoglPixelFormat dst_format;
|
||||||
CoglBool use_16;
|
gboolean use_16;
|
||||||
CoglBool need_premult;
|
gboolean need_premult;
|
||||||
|
|
||||||
src_format = cogl_bitmap_get_format (src_bmp);
|
src_format = cogl_bitmap_get_format (src_bmp);
|
||||||
src_rowstride = cogl_bitmap_get_rowstride (src_bmp);
|
src_rowstride = cogl_bitmap_get_rowstride (src_bmp);
|
||||||
@ -514,7 +514,7 @@ _cogl_bitmap_convert (CoglBitmap *src_bmp,
|
|||||||
return dst_bmp;
|
return dst_bmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
driver_can_convert (CoglContext *ctx,
|
driver_can_convert (CoglContext *ctx,
|
||||||
CoglPixelFormat src_format,
|
CoglPixelFormat src_format,
|
||||||
CoglPixelFormat internal_format)
|
CoglPixelFormat internal_format)
|
||||||
@ -546,7 +546,7 @@ driver_can_convert (CoglContext *ctx,
|
|||||||
CoglBitmap *
|
CoglBitmap *
|
||||||
_cogl_bitmap_convert_for_upload (CoglBitmap *src_bmp,
|
_cogl_bitmap_convert_for_upload (CoglBitmap *src_bmp,
|
||||||
CoglPixelFormat internal_format,
|
CoglPixelFormat internal_format,
|
||||||
CoglBool can_convert_in_place,
|
gboolean can_convert_in_place,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
{
|
{
|
||||||
CoglContext *ctx = _cogl_bitmap_get_context (src_bmp);
|
CoglContext *ctx = _cogl_bitmap_get_context (src_bmp);
|
||||||
@ -614,7 +614,7 @@ _cogl_bitmap_convert_for_upload (CoglBitmap *src_bmp,
|
|||||||
return dst_bmp;
|
return dst_bmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmap_unpremult (CoglBitmap *bmp,
|
_cogl_bitmap_unpremult (CoglBitmap *bmp,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
{
|
{
|
||||||
@ -682,7 +682,7 @@ _cogl_bitmap_unpremult (CoglBitmap *bmp,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmap_premult (CoglBitmap *bmp,
|
_cogl_bitmap_premult (CoglBitmap *bmp,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmap_get_size_from_file (const char *filename,
|
_cogl_bitmap_get_size_from_file (const char *filename,
|
||||||
int *width,
|
int *width,
|
||||||
int *height)
|
int *height)
|
||||||
@ -60,7 +60,7 @@ _cogl_bitmap_from_file (CoglContext *ctx,
|
|||||||
{
|
{
|
||||||
static CoglUserDataKey pixbuf_key;
|
static CoglUserDataKey pixbuf_key;
|
||||||
GdkPixbuf *pixbuf;
|
GdkPixbuf *pixbuf;
|
||||||
CoglBool has_alpha;
|
gboolean has_alpha;
|
||||||
GdkColorspace color_space;
|
GdkColorspace color_space;
|
||||||
CoglPixelFormat pixel_format;
|
CoglPixelFormat pixel_format;
|
||||||
int width;
|
int width;
|
||||||
|
@ -51,8 +51,8 @@ struct _CoglBitmap
|
|||||||
|
|
||||||
uint8_t *data;
|
uint8_t *data;
|
||||||
|
|
||||||
CoglBool mapped;
|
gboolean mapped;
|
||||||
CoglBool bound;
|
gboolean bound;
|
||||||
|
|
||||||
/* If this is non-null then 'data' is ignored and instead it is
|
/* If this is non-null then 'data' is ignored and instead it is
|
||||||
fetched from this shared bitmap. */
|
fetched from this shared bitmap. */
|
||||||
@ -109,10 +109,10 @@ _cogl_bitmap_convert (CoglBitmap *bmp,
|
|||||||
CoglBitmap *
|
CoglBitmap *
|
||||||
_cogl_bitmap_convert_for_upload (CoglBitmap *src_bmp,
|
_cogl_bitmap_convert_for_upload (CoglBitmap *src_bmp,
|
||||||
CoglPixelFormat internal_format,
|
CoglPixelFormat internal_format,
|
||||||
CoglBool can_convert_in_place,
|
gboolean can_convert_in_place,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmap_convert_into_bitmap (CoglBitmap *src_bmp,
|
_cogl_bitmap_convert_into_bitmap (CoglBitmap *src_bmp,
|
||||||
CoglBitmap *dst_bmp,
|
CoglBitmap *dst_bmp,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
@ -122,20 +122,20 @@ _cogl_bitmap_from_file (CoglContext *ctx,
|
|||||||
const char *filename,
|
const char *filename,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmap_unpremult (CoglBitmap *dst_bmp,
|
_cogl_bitmap_unpremult (CoglBitmap *dst_bmp,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmap_premult (CoglBitmap *dst_bmp,
|
_cogl_bitmap_premult (CoglBitmap *dst_bmp,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmap_convert_premult_status (CoglBitmap *bmp,
|
_cogl_bitmap_convert_premult_status (CoglBitmap *bmp,
|
||||||
CoglPixelFormat dst_format,
|
CoglPixelFormat dst_format,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmap_copy_subregion (CoglBitmap *src,
|
_cogl_bitmap_copy_subregion (CoglBitmap *src,
|
||||||
CoglBitmap *dst,
|
CoglBitmap *dst,
|
||||||
int src_x,
|
int src_x,
|
||||||
@ -151,7 +151,7 @@ CoglBitmap *
|
|||||||
_cogl_bitmap_copy (CoglBitmap *src_bmp,
|
_cogl_bitmap_copy (CoglBitmap *src_bmp,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmap_get_size_from_file (const char *filename,
|
_cogl_bitmap_get_size_from_file (const char *filename,
|
||||||
int *width,
|
int *width,
|
||||||
int *height);
|
int *height);
|
||||||
|
@ -63,7 +63,7 @@ _cogl_bitmap_free (CoglBitmap *bmp)
|
|||||||
g_slice_free (CoglBitmap, bmp);
|
g_slice_free (CoglBitmap, bmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmap_convert_premult_status (CoglBitmap *bmp,
|
_cogl_bitmap_convert_premult_status (CoglBitmap *bmp,
|
||||||
CoglPixelFormat dst_format,
|
CoglPixelFormat dst_format,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
@ -115,7 +115,7 @@ _cogl_bitmap_copy (CoglBitmap *src_bmp,
|
|||||||
return dst_bmp;
|
return dst_bmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmap_copy_subregion (CoglBitmap *src,
|
_cogl_bitmap_copy_subregion (CoglBitmap *src,
|
||||||
CoglBitmap *dst,
|
CoglBitmap *dst,
|
||||||
int src_x,
|
int src_x,
|
||||||
@ -130,7 +130,7 @@ _cogl_bitmap_copy_subregion (CoglBitmap *src,
|
|||||||
uint8_t *dstdata;
|
uint8_t *dstdata;
|
||||||
int bpp;
|
int bpp;
|
||||||
int line;
|
int line;
|
||||||
CoglBool succeeded = FALSE;
|
gboolean succeeded = FALSE;
|
||||||
|
|
||||||
/* Intended only for fast copies when format is equal! */
|
/* Intended only for fast copies when format is equal! */
|
||||||
_COGL_RETURN_VAL_IF_FAIL ((src->format & ~COGL_PREMULT_BIT) ==
|
_COGL_RETURN_VAL_IF_FAIL ((src->format & ~COGL_PREMULT_BIT) ==
|
||||||
@ -165,7 +165,7 @@ _cogl_bitmap_copy_subregion (CoglBitmap *src,
|
|||||||
return succeeded;
|
return succeeded;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_bitmap_get_size_from_file (const char *filename,
|
cogl_bitmap_get_size_from_file (const char *filename,
|
||||||
int *width,
|
int *width,
|
||||||
int *height)
|
int *height)
|
||||||
|
@ -246,7 +246,7 @@ cogl_bitmap_get_buffer (CoglBitmap *bitmap);
|
|||||||
*
|
*
|
||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_bitmap_get_size_from_file (const char *filename,
|
cogl_bitmap_get_size_from_file (const char *filename,
|
||||||
int *width,
|
int *width,
|
||||||
int *height);
|
int *height);
|
||||||
@ -262,7 +262,7 @@ cogl_bitmap_get_size_from_file (const char *filename,
|
|||||||
*
|
*
|
||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_bitmap (void *object);
|
cogl_is_bitmap (void *object);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,7 +56,7 @@ _COGL_STATIC_ASSERT (sizeof (unsigned long) <= sizeof (void *),
|
|||||||
#define BIT_MASK(bit_num) \
|
#define BIT_MASK(bit_num) \
|
||||||
(1UL << BIT_INDEX (bit_num))
|
(1UL << BIT_INDEX (bit_num))
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmask_get_from_array (const CoglBitmask *bitmask,
|
_cogl_bitmask_get_from_array (const CoglBitmask *bitmask,
|
||||||
unsigned int bit_num)
|
unsigned int bit_num)
|
||||||
{
|
{
|
||||||
@ -90,7 +90,7 @@ _cogl_bitmask_convert_to_array (CoglBitmask *bitmask)
|
|||||||
void
|
void
|
||||||
_cogl_bitmask_set_in_array (CoglBitmask *bitmask,
|
_cogl_bitmask_set_in_array (CoglBitmask *bitmask,
|
||||||
unsigned int bit_num,
|
unsigned int bit_num,
|
||||||
CoglBool value)
|
gboolean value)
|
||||||
{
|
{
|
||||||
GArray *array;
|
GArray *array;
|
||||||
unsigned int array_index;
|
unsigned int array_index;
|
||||||
@ -154,7 +154,7 @@ _cogl_bitmask_set_bits (CoglBitmask *dst,
|
|||||||
void
|
void
|
||||||
_cogl_bitmask_set_range_in_array (CoglBitmask *bitmask,
|
_cogl_bitmask_set_range_in_array (CoglBitmask *bitmask,
|
||||||
unsigned int n_bits,
|
unsigned int n_bits,
|
||||||
CoglBool value)
|
gboolean value)
|
||||||
{
|
{
|
||||||
GArray *array;
|
GArray *array;
|
||||||
unsigned int array_index, bit_index;
|
unsigned int array_index, bit_index;
|
||||||
@ -326,7 +326,7 @@ typedef struct
|
|||||||
int *bits;
|
int *bits;
|
||||||
} CheckData;
|
} CheckData;
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_bit (int bit_num, void *user_data)
|
check_bit (int bit_num, void *user_data)
|
||||||
{
|
{
|
||||||
CheckData *data = user_data;
|
CheckData *data = user_data;
|
||||||
|
@ -90,19 +90,19 @@ typedef struct _CoglBitmaskImaginaryType *CoglBitmask;
|
|||||||
#define _cogl_bitmask_init(bitmask) \
|
#define _cogl_bitmask_init(bitmask) \
|
||||||
G_STMT_START { *(bitmask) = _cogl_bitmask_from_bits (0); } G_STMT_END
|
G_STMT_START { *(bitmask) = _cogl_bitmask_from_bits (0); } G_STMT_END
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_bitmask_get_from_array (const CoglBitmask *bitmask,
|
_cogl_bitmask_get_from_array (const CoglBitmask *bitmask,
|
||||||
unsigned int bit_num);
|
unsigned int bit_num);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_bitmask_set_in_array (CoglBitmask *bitmask,
|
_cogl_bitmask_set_in_array (CoglBitmask *bitmask,
|
||||||
unsigned int bit_num,
|
unsigned int bit_num,
|
||||||
CoglBool value);
|
gboolean value);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_bitmask_set_range_in_array (CoglBitmask *bitmask,
|
_cogl_bitmask_set_range_in_array (CoglBitmask *bitmask,
|
||||||
unsigned int n_bits,
|
unsigned int n_bits,
|
||||||
CoglBool value);
|
gboolean value);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_bitmask_clear_all_in_array (CoglBitmask *bitmask);
|
_cogl_bitmask_clear_all_in_array (CoglBitmask *bitmask);
|
||||||
@ -143,7 +143,7 @@ _cogl_bitmask_xor_bits (CoglBitmask *dst,
|
|||||||
const CoglBitmask *src);
|
const CoglBitmask *src);
|
||||||
|
|
||||||
/* The foreach function can return FALSE to stop iteration */
|
/* The foreach function can return FALSE to stop iteration */
|
||||||
typedef CoglBool (* CoglBitmaskForeachFunc) (int bit_num, void *user_data);
|
typedef gboolean (* CoglBitmaskForeachFunc) (int bit_num, void *user_data);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cogl_bitmask_foreach:
|
* cogl_bitmask_foreach:
|
||||||
@ -165,7 +165,7 @@ _cogl_bitmask_foreach (const CoglBitmask *bitmask,
|
|||||||
*
|
*
|
||||||
* Return value: whether bit number @bit_num is set in @bitmask
|
* Return value: whether bit number @bit_num is set in @bitmask
|
||||||
*/
|
*/
|
||||||
static inline CoglBool
|
static inline gboolean
|
||||||
_cogl_bitmask_get (const CoglBitmask *bitmask, unsigned int bit_num)
|
_cogl_bitmask_get (const CoglBitmask *bitmask, unsigned int bit_num)
|
||||||
{
|
{
|
||||||
if (_cogl_bitmask_has_array (bitmask))
|
if (_cogl_bitmask_has_array (bitmask))
|
||||||
@ -185,7 +185,7 @@ _cogl_bitmask_get (const CoglBitmask *bitmask, unsigned int bit_num)
|
|||||||
* Sets or resets a bit number @bit_num in @bitmask according to @value.
|
* Sets or resets a bit number @bit_num in @bitmask according to @value.
|
||||||
*/
|
*/
|
||||||
static inline void
|
static inline void
|
||||||
_cogl_bitmask_set (CoglBitmask *bitmask, unsigned int bit_num, CoglBool value)
|
_cogl_bitmask_set (CoglBitmask *bitmask, unsigned int bit_num, gboolean value)
|
||||||
{
|
{
|
||||||
if (_cogl_bitmask_has_array (bitmask) ||
|
if (_cogl_bitmask_has_array (bitmask) ||
|
||||||
bit_num >= COGL_BITMASK_MAX_DIRECT_BITS)
|
bit_num >= COGL_BITMASK_MAX_DIRECT_BITS)
|
||||||
@ -209,7 +209,7 @@ _cogl_bitmask_set (CoglBitmask *bitmask, unsigned int bit_num, CoglBool value)
|
|||||||
static inline void
|
static inline void
|
||||||
_cogl_bitmask_set_range (CoglBitmask *bitmask,
|
_cogl_bitmask_set_range (CoglBitmask *bitmask,
|
||||||
unsigned int n_bits,
|
unsigned int n_bits,
|
||||||
CoglBool value)
|
gboolean value)
|
||||||
{
|
{
|
||||||
if (_cogl_bitmask_has_array (bitmask) ||
|
if (_cogl_bitmask_has_array (bitmask) ||
|
||||||
n_bits > COGL_BITMASK_MAX_DIRECT_BITS)
|
n_bits > COGL_BITMASK_MAX_DIRECT_BITS)
|
||||||
|
@ -163,7 +163,7 @@ _cogl_blend_string_split_rgba_statement (CoglBlendStringStatement *statement,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
validate_tex_combine_statements (CoglBlendStringStatement *statements,
|
validate_tex_combine_statements (CoglBlendStringStatement *statements,
|
||||||
int n_statements,
|
int n_statements,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
@ -209,7 +209,7 @@ error:
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
validate_blend_statements (CoglBlendStringStatement *statements,
|
validate_blend_statements (CoglBlendStringStatement *statements,
|
||||||
int n_statements,
|
int n_statements,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
@ -273,7 +273,7 @@ error:
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
validate_statements_for_context (CoglBlendStringStatement *statements,
|
validate_statements_for_context (CoglBlendStringStatement *statements,
|
||||||
int n_statements,
|
int n_statements,
|
||||||
CoglBlendStringContext context,
|
CoglBlendStringContext context,
|
||||||
@ -445,19 +445,19 @@ get_color_src_info (const char *mark,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
is_symbol_char (const char c)
|
is_symbol_char (const char c)
|
||||||
{
|
{
|
||||||
return (g_ascii_isalpha (c) || c == '_') ? TRUE : FALSE;
|
return (g_ascii_isalpha (c) || c == '_') ? TRUE : FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
is_alphanum_char (const char c)
|
is_alphanum_char (const char c)
|
||||||
{
|
{
|
||||||
return (g_ascii_isalnum (c) || c == '_') ? TRUE : FALSE;
|
return (g_ascii_isalnum (c) || c == '_') ? TRUE : FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
parse_argument (const char *string, /* original user string */
|
parse_argument (const char *string, /* original user string */
|
||||||
const char **ret_p, /* start of argument IN:OUT */
|
const char **ret_p, /* start of argument IN:OUT */
|
||||||
const CoglBlendStringStatement *statement,
|
const CoglBlendStringStatement *statement,
|
||||||
@ -470,8 +470,8 @@ parse_argument (const char *string, /* original user string */
|
|||||||
const char *mark = NULL;
|
const char *mark = NULL;
|
||||||
const char *error_string = NULL;
|
const char *error_string = NULL;
|
||||||
ParserArgState state = PARSER_ARG_STATE_START;
|
ParserArgState state = PARSER_ARG_STATE_START;
|
||||||
CoglBool parsing_factor = FALSE;
|
gboolean parsing_factor = FALSE;
|
||||||
CoglBool implicit_factor_brace = FALSE;
|
gboolean implicit_factor_brace = FALSE;
|
||||||
|
|
||||||
arg->source.is_zero = FALSE;
|
arg->source.is_zero = FALSE;
|
||||||
arg->source.info = NULL;
|
arg->source.info = NULL;
|
||||||
|
@ -77,18 +77,18 @@ typedef struct _CoglBlendStringColorSourceInfo
|
|||||||
|
|
||||||
typedef struct _CoglBlendStringColorSource
|
typedef struct _CoglBlendStringColorSource
|
||||||
{
|
{
|
||||||
CoglBool is_zero;
|
gboolean is_zero;
|
||||||
const CoglBlendStringColorSourceInfo *info;
|
const CoglBlendStringColorSourceInfo *info;
|
||||||
int texture; /* for the TEXTURE_N color source */
|
int texture; /* for the TEXTURE_N color source */
|
||||||
CoglBool one_minus;
|
gboolean one_minus;
|
||||||
CoglBlendStringChannelMask mask;
|
CoglBlendStringChannelMask mask;
|
||||||
} CoglBlendStringColorSource;
|
} CoglBlendStringColorSource;
|
||||||
|
|
||||||
typedef struct _CoglBlendStringFactor
|
typedef struct _CoglBlendStringFactor
|
||||||
{
|
{
|
||||||
CoglBool is_one;
|
gboolean is_one;
|
||||||
CoglBool is_src_alpha_saturate;
|
gboolean is_src_alpha_saturate;
|
||||||
CoglBool is_color;
|
gboolean is_color;
|
||||||
CoglBlendStringColorSource source;
|
CoglBlendStringColorSource source;
|
||||||
} CoglBlendStringFactor;
|
} CoglBlendStringFactor;
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ typedef struct _CoglBlendStringStatement
|
|||||||
} CoglBlendStringStatement;
|
} CoglBlendStringStatement;
|
||||||
|
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_blend_string_compile (const char *string,
|
_cogl_blend_string_compile (const char *string,
|
||||||
CoglBlendStringContext context,
|
CoglBlendStringContext context,
|
||||||
CoglBlendStringStatement *statements,
|
CoglBlendStringStatement *statements,
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
static const CoglBlitMode *_cogl_blit_default_mode = NULL;
|
static const CoglBlitMode *_cogl_blit_default_mode = NULL;
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_blit_texture_render_begin (CoglBlitData *data)
|
_cogl_blit_texture_render_begin (CoglBlitData *data)
|
||||||
{
|
{
|
||||||
CoglContext *ctx = data->src_tex->context;
|
CoglContext *ctx = data->src_tex->context;
|
||||||
@ -144,7 +144,7 @@ _cogl_blit_texture_render_end (CoglBlitData *data)
|
|||||||
cogl_object_unref (data->dest_fb);
|
cogl_object_unref (data->dest_fb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_blit_framebuffer_begin (CoglBlitData *data)
|
_cogl_blit_framebuffer_begin (CoglBlitData *data)
|
||||||
{
|
{
|
||||||
CoglContext *ctx = data->src_tex->context;
|
CoglContext *ctx = data->src_tex->context;
|
||||||
@ -219,7 +219,7 @@ _cogl_blit_framebuffer_end (CoglBlitData *data)
|
|||||||
cogl_object_unref (data->dest_fb);
|
cogl_object_unref (data->dest_fb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_blit_copy_tex_sub_image_begin (CoglBlitData *data)
|
_cogl_blit_copy_tex_sub_image_begin (CoglBlitData *data)
|
||||||
{
|
{
|
||||||
CoglOffscreen *offscreen;
|
CoglOffscreen *offscreen;
|
||||||
@ -269,7 +269,7 @@ _cogl_blit_copy_tex_sub_image_end (CoglBlitData *data)
|
|||||||
cogl_object_unref (data->src_fb);
|
cogl_object_unref (data->src_fb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_blit_get_tex_data_begin (CoglBlitData *data)
|
_cogl_blit_get_tex_data_begin (CoglBlitData *data)
|
||||||
{
|
{
|
||||||
data->format = _cogl_texture_get_format (data->src_tex);
|
data->format = _cogl_texture_get_format (data->src_tex);
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
typedef struct _CoglBlitData CoglBlitData;
|
typedef struct _CoglBlitData CoglBlitData;
|
||||||
|
|
||||||
typedef CoglBool (* CoglBlitBeginFunc) (CoglBlitData *data);
|
typedef gboolean (* CoglBlitBeginFunc) (CoglBlitData *data);
|
||||||
typedef void (* CoglBlitEndFunc) (CoglBlitData *data);
|
typedef void (* CoglBlitEndFunc) (CoglBlitData *data);
|
||||||
|
|
||||||
typedef void (* CoglBlitFunc) (CoglBlitData *data,
|
typedef void (* CoglBlitFunc) (CoglBlitData *data,
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include "cogl-context-private.h"
|
#include "cogl-context-private.h"
|
||||||
#include "driver/gl/cogl-util-gl-private.h"
|
#include "driver/gl/cogl-util-gl-private.h"
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_boxed_value_equal (const CoglBoxedValue *bva,
|
_cogl_boxed_value_equal (const CoglBoxedValue *bva,
|
||||||
const CoglBoxedValue *bvb)
|
const CoglBoxedValue *bvb)
|
||||||
{
|
{
|
||||||
@ -134,7 +134,7 @@ _cogl_boxed_value_set_x (CoglBoxedValue *bv,
|
|||||||
CoglBoxedType type,
|
CoglBoxedType type,
|
||||||
size_t value_size,
|
size_t value_size,
|
||||||
const void *value,
|
const void *value,
|
||||||
CoglBool transpose)
|
gboolean transpose)
|
||||||
{
|
{
|
||||||
if (count == 1)
|
if (count == 1)
|
||||||
{
|
{
|
||||||
@ -229,7 +229,7 @@ void
|
|||||||
_cogl_boxed_value_set_matrix (CoglBoxedValue *bv,
|
_cogl_boxed_value_set_matrix (CoglBoxedValue *bv,
|
||||||
int dimensions,
|
int dimensions,
|
||||||
int count,
|
int count,
|
||||||
CoglBool transpose,
|
gboolean transpose,
|
||||||
const float *value)
|
const float *value)
|
||||||
{
|
{
|
||||||
_cogl_boxed_value_set_x (bv,
|
_cogl_boxed_value_set_x (bv,
|
||||||
|
@ -64,7 +64,7 @@ typedef struct _CoglBoxedValue
|
|||||||
_bv->count = 1; \
|
_bv->count = 1; \
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_boxed_value_equal (const CoglBoxedValue *bva,
|
_cogl_boxed_value_equal (const CoglBoxedValue *bva,
|
||||||
const CoglBoxedValue *bvb);
|
const CoglBoxedValue *bvb);
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ void
|
|||||||
_cogl_boxed_value_set_matrix (CoglBoxedValue *bv,
|
_cogl_boxed_value_set_matrix (CoglBoxedValue *bv,
|
||||||
int dimensions,
|
int dimensions,
|
||||||
int count,
|
int count,
|
||||||
CoglBool transpose,
|
gboolean transpose,
|
||||||
const float *value);
|
const float *value);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -57,7 +57,7 @@ struct _CoglBufferVtable
|
|||||||
|
|
||||||
void (* unmap) (CoglBuffer *buffer);
|
void (* unmap) (CoglBuffer *buffer);
|
||||||
|
|
||||||
CoglBool (* set_data) (CoglBuffer *buffer,
|
gboolean (* set_data) (CoglBuffer *buffer,
|
||||||
unsigned int offset,
|
unsigned int offset,
|
||||||
const void *data,
|
const void *data,
|
||||||
unsigned int size,
|
unsigned int size,
|
||||||
@ -146,7 +146,7 @@ _cogl_buffer_immutable_ref (CoglBuffer *buffer);
|
|||||||
void
|
void
|
||||||
_cogl_buffer_immutable_unref (CoglBuffer *buffer);
|
_cogl_buffer_immutable_unref (CoglBuffer *buffer);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_buffer_set_data (CoglBuffer *buffer,
|
_cogl_buffer_set_data (CoglBuffer *buffer,
|
||||||
size_t offset,
|
size_t offset,
|
||||||
const void *data,
|
const void *data,
|
||||||
|
@ -62,7 +62,7 @@ _cogl_buffer_register_buffer_type (const CoglObjectClass *klass)
|
|||||||
_cogl_buffer_types = g_slist_prepend (_cogl_buffer_types, (void *) klass);
|
_cogl_buffer_types = g_slist_prepend (_cogl_buffer_types, (void *) klass);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_buffer (void *object)
|
cogl_is_buffer (void *object)
|
||||||
{
|
{
|
||||||
const CoglObject *obj = object;
|
const CoglObject *obj = object;
|
||||||
@ -100,7 +100,7 @@ malloc_unmap (CoglBuffer *buffer)
|
|||||||
buffer->flags &= ~COGL_BUFFER_FLAG_MAPPED;
|
buffer->flags &= ~COGL_BUFFER_FLAG_MAPPED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
malloc_set_data (CoglBuffer *buffer,
|
malloc_set_data (CoglBuffer *buffer,
|
||||||
unsigned int offset,
|
unsigned int offset,
|
||||||
const void *data,
|
const void *data,
|
||||||
@ -119,7 +119,7 @@ _cogl_buffer_initialize (CoglBuffer *buffer,
|
|||||||
CoglBufferUsageHint usage_hint,
|
CoglBufferUsageHint usage_hint,
|
||||||
CoglBufferUpdateHint update_hint)
|
CoglBufferUpdateHint update_hint)
|
||||||
{
|
{
|
||||||
CoglBool use_malloc = FALSE;
|
gboolean use_malloc = FALSE;
|
||||||
|
|
||||||
buffer->context = ctx;
|
buffer->context = ctx;
|
||||||
buffer->flags = COGL_BUFFER_FLAG_NONE;
|
buffer->flags = COGL_BUFFER_FLAG_NONE;
|
||||||
@ -210,7 +210,7 @@ cogl_buffer_get_update_hint (CoglBuffer *buffer)
|
|||||||
static void
|
static void
|
||||||
warn_about_midscene_changes (void)
|
warn_about_midscene_changes (void)
|
||||||
{
|
{
|
||||||
static CoglBool seen = FALSE;
|
static gboolean seen = FALSE;
|
||||||
if (!seen)
|
if (!seen)
|
||||||
{
|
{
|
||||||
g_warning ("Mid-scene modification of buffers has "
|
g_warning ("Mid-scene modification of buffers has "
|
||||||
@ -359,7 +359,7 @@ _cogl_buffer_unmap_for_fill_or_fallback (CoglBuffer *buffer)
|
|||||||
cogl_buffer_unmap (buffer);
|
cogl_buffer_unmap (buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_buffer_set_data (CoglBuffer *buffer,
|
_cogl_buffer_set_data (CoglBuffer *buffer,
|
||||||
size_t offset,
|
size_t offset,
|
||||||
const void *data,
|
const void *data,
|
||||||
@ -375,14 +375,14 @@ _cogl_buffer_set_data (CoglBuffer *buffer,
|
|||||||
return buffer->vtable.set_data (buffer, offset, data, size, error);
|
return buffer->vtable.set_data (buffer, offset, data, size, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_buffer_set_data (CoglBuffer *buffer,
|
cogl_buffer_set_data (CoglBuffer *buffer,
|
||||||
size_t offset,
|
size_t offset,
|
||||||
const void *data,
|
const void *data,
|
||||||
size_t size)
|
size_t size)
|
||||||
{
|
{
|
||||||
CoglError *ignore_error = NULL;
|
CoglError *ignore_error = NULL;
|
||||||
CoglBool status =
|
gboolean status =
|
||||||
_cogl_buffer_set_data (buffer, offset, data, size, &ignore_error);
|
_cogl_buffer_set_data (buffer, offset, data, size, &ignore_error);
|
||||||
if (!status)
|
if (!status)
|
||||||
cogl_error_free (ignore_error);
|
cogl_error_free (ignore_error);
|
||||||
|
@ -107,7 +107,7 @@ _cogl_buffer_error_domain (void);
|
|||||||
* Since: 1.2
|
* Since: 1.2
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_buffer (void *object);
|
cogl_is_buffer (void *object);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -314,7 +314,7 @@ cogl_buffer_unmap (CoglBuffer *buffer);
|
|||||||
* Since: 1.2
|
* Since: 1.2
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_buffer_set_data (CoglBuffer *buffer,
|
cogl_buffer_set_data (CoglBuffer *buffer,
|
||||||
size_t offset,
|
size_t offset,
|
||||||
const void *data,
|
const void *data,
|
||||||
|
@ -136,7 +136,7 @@ struct _CoglClipStackRect
|
|||||||
modelview matrix is that same as when a rectangle is added to the
|
modelview matrix is that same as when a rectangle is added to the
|
||||||
journal. In that case we can use the original clip coordinates
|
journal. In that case we can use the original clip coordinates
|
||||||
and modify the rectangle instead. */
|
and modify the rectangle instead. */
|
||||||
CoglBool can_be_scissor;
|
gboolean can_be_scissor;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _CoglClipStackWindowRect
|
struct _CoglClipStackWindowRect
|
||||||
|
@ -300,7 +300,7 @@ cogl_color_unpremultiply (CoglColor *color)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_color_equal (const void *v1, const void *v2)
|
cogl_color_equal (const void *v1, const void *v2)
|
||||||
{
|
{
|
||||||
const uint32_t *c1 = v1, *c2 = v2;
|
const uint32_t *c1 = v1, *c2 = v2;
|
||||||
|
@ -554,7 +554,7 @@ cogl_color_unpremultiply (CoglColor *color);
|
|||||||
*
|
*
|
||||||
* Since: 1.0
|
* Since: 1.0
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_color_equal (const void *v1, const void *v2);
|
cogl_color_equal (const void *v1, const void *v2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,7 +99,7 @@ _cogl_config_read (void)
|
|||||||
GKeyFile *key_file = g_key_file_new ();
|
GKeyFile *key_file = g_key_file_new ();
|
||||||
const char * const *system_dirs = g_get_system_config_dirs ();
|
const char * const *system_dirs = g_get_system_config_dirs ();
|
||||||
char *filename;
|
char *filename;
|
||||||
CoglBool status = FALSE;
|
gboolean status = FALSE;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; system_dirs[i]; i++)
|
for (i = 0; system_dirs[i]; i++)
|
||||||
|
@ -103,7 +103,7 @@ struct _CoglContext
|
|||||||
unsigned long private_features
|
unsigned long private_features
|
||||||
[COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_N_PRIVATE_FEATURES)];
|
[COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_N_PRIVATE_FEATURES)];
|
||||||
|
|
||||||
CoglBool needs_viewport_scissor_workaround;
|
gboolean needs_viewport_scissor_workaround;
|
||||||
CoglFramebuffer *viewport_scissor_workaround_framebuffer;
|
CoglFramebuffer *viewport_scissor_workaround_framebuffer;
|
||||||
|
|
||||||
CoglPipeline *default_pipeline;
|
CoglPipeline *default_pipeline;
|
||||||
@ -127,7 +127,7 @@ struct _CoglContext
|
|||||||
CoglBitmask enable_custom_attributes_tmp;
|
CoglBitmask enable_custom_attributes_tmp;
|
||||||
CoglBitmask changed_bits_tmp;
|
CoglBitmask changed_bits_tmp;
|
||||||
|
|
||||||
CoglBool legacy_backface_culling_enabled;
|
gboolean legacy_backface_culling_enabled;
|
||||||
|
|
||||||
/* A few handy matrix constants */
|
/* A few handy matrix constants */
|
||||||
CoglMatrix identity_matrix;
|
CoglMatrix identity_matrix;
|
||||||
@ -185,19 +185,19 @@ struct _CoglContext
|
|||||||
/* Some simple caching, to minimize state changes... */
|
/* Some simple caching, to minimize state changes... */
|
||||||
CoglPipeline *current_pipeline;
|
CoglPipeline *current_pipeline;
|
||||||
unsigned long current_pipeline_changes_since_flush;
|
unsigned long current_pipeline_changes_since_flush;
|
||||||
CoglBool current_pipeline_with_color_attrib;
|
gboolean current_pipeline_with_color_attrib;
|
||||||
CoglBool current_pipeline_unknown_color_alpha;
|
gboolean current_pipeline_unknown_color_alpha;
|
||||||
unsigned long current_pipeline_age;
|
unsigned long current_pipeline_age;
|
||||||
|
|
||||||
CoglBool gl_blend_enable_cache;
|
gboolean gl_blend_enable_cache;
|
||||||
|
|
||||||
CoglBool depth_test_enabled_cache;
|
gboolean depth_test_enabled_cache;
|
||||||
CoglDepthTestFunction depth_test_function_cache;
|
CoglDepthTestFunction depth_test_function_cache;
|
||||||
CoglBool depth_writing_enabled_cache;
|
gboolean depth_writing_enabled_cache;
|
||||||
float depth_range_near_cache;
|
float depth_range_near_cache;
|
||||||
float depth_range_far_cache;
|
float depth_range_far_cache;
|
||||||
|
|
||||||
CoglBool legacy_depth_test_enabled;
|
gboolean legacy_depth_test_enabled;
|
||||||
|
|
||||||
CoglBuffer *current_buffer[COGL_BUFFER_BIND_TARGET_COUNT];
|
CoglBuffer *current_buffer[COGL_BUFFER_BIND_TARGET_COUNT];
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ struct _CoglContext
|
|||||||
/* This becomes TRUE the first time the context is bound to an
|
/* This becomes TRUE the first time the context is bound to an
|
||||||
* onscreen buffer. This is used by cogl-framebuffer-gl to determine
|
* onscreen buffer. This is used by cogl-framebuffer-gl to determine
|
||||||
* when to initialise the glDrawBuffer state */
|
* when to initialise the glDrawBuffer state */
|
||||||
CoglBool was_bound_to_onscreen;
|
gboolean was_bound_to_onscreen;
|
||||||
|
|
||||||
/* Primitives */
|
/* Primitives */
|
||||||
CoglPath *current_path;
|
CoglPath *current_path;
|
||||||
@ -241,7 +241,7 @@ struct _CoglContext
|
|||||||
CoglIndices *rectangle_short_indices;
|
CoglIndices *rectangle_short_indices;
|
||||||
int rectangle_short_indices_len;
|
int rectangle_short_indices_len;
|
||||||
|
|
||||||
CoglBool in_begin_gl_block;
|
gboolean in_begin_gl_block;
|
||||||
|
|
||||||
CoglPipeline *texture_download_pipeline;
|
CoglPipeline *texture_download_pipeline;
|
||||||
CoglPipeline *blit_texture_pipeline;
|
CoglPipeline *blit_texture_pipeline;
|
||||||
@ -268,7 +268,7 @@ struct _CoglContext
|
|||||||
CoglPipelineProgramType current_vertex_program_type;
|
CoglPipelineProgramType current_vertex_program_type;
|
||||||
GLuint current_gl_program;
|
GLuint current_gl_program;
|
||||||
|
|
||||||
CoglBool current_gl_dither_enabled;
|
gboolean current_gl_dither_enabled;
|
||||||
CoglColorMask current_gl_color_mask;
|
CoglColorMask current_gl_color_mask;
|
||||||
GLenum current_gl_draw_buffer;
|
GLenum current_gl_draw_buffer;
|
||||||
|
|
||||||
@ -280,7 +280,7 @@ struct _CoglContext
|
|||||||
doesn't need to be a valid pointer. We can't just use NULL in
|
doesn't need to be a valid pointer. We can't just use NULL in
|
||||||
current_clip_stack to mark a dirty state because NULL is a valid
|
current_clip_stack to mark a dirty state because NULL is a valid
|
||||||
stack (meaning no clipping) */
|
stack (meaning no clipping) */
|
||||||
CoglBool current_clip_stack_valid;
|
gboolean current_clip_stack_valid;
|
||||||
/* The clip state that was flushed. This isn't intended to be used
|
/* The clip state that was flushed. This isn't intended to be used
|
||||||
as a stack to push and pop new entries. Instead the current stack
|
as a stack to push and pop new entries. Instead the current stack
|
||||||
that the user wants is part of the framebuffer state. This is
|
that the user wants is part of the framebuffer state. This is
|
||||||
@ -292,13 +292,13 @@ struct _CoglContext
|
|||||||
state. If TRUE then any further use of the stencil buffer (such
|
state. If TRUE then any further use of the stencil buffer (such
|
||||||
as for drawing paths) would need to be merged with the existing
|
as for drawing paths) would need to be merged with the existing
|
||||||
stencil buffer */
|
stencil buffer */
|
||||||
CoglBool current_clip_stack_uses_stencil;
|
gboolean current_clip_stack_uses_stencil;
|
||||||
|
|
||||||
/* This is used as a temporary buffer to fill a CoglBuffer when
|
/* This is used as a temporary buffer to fill a CoglBuffer when
|
||||||
cogl_buffer_map fails and we only want to map to fill it with new
|
cogl_buffer_map fails and we only want to map to fill it with new
|
||||||
data */
|
data */
|
||||||
GByteArray *buffer_map_fallback_array;
|
GByteArray *buffer_map_fallback_array;
|
||||||
CoglBool buffer_map_fallback_in_use;
|
gboolean buffer_map_fallback_in_use;
|
||||||
size_t buffer_map_fallback_offset;
|
size_t buffer_map_fallback_offset;
|
||||||
|
|
||||||
CoglWinsysRectangleState rectangle_state;
|
CoglWinsysRectangleState rectangle_state;
|
||||||
@ -371,7 +371,7 @@ _cogl_context_get_winsys (CoglContext *context);
|
|||||||
* to know when to re-query the GL extensions. The backend should also
|
* to know when to re-query the GL extensions. The backend should also
|
||||||
* check whether the GL context is supported by Cogl. If not it should
|
* check whether the GL context is supported by Cogl. If not it should
|
||||||
* return FALSE and set @error */
|
* return FALSE and set @error */
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_context_update_features (CoglContext *context,
|
_cogl_context_update_features (CoglContext *context,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
|
@ -645,7 +645,7 @@ cogl_context_get_renderer (CoglContext *context)
|
|||||||
return context->display->renderer;
|
return context->display->renderer;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_context_update_features (CoglContext *context,
|
_cogl_context_update_features (CoglContext *context,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
{
|
{
|
||||||
|
@ -166,7 +166,7 @@ cogl_context_get_renderer (CoglContext *context);
|
|||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
* Stability: Unstable
|
* Stability: Unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_context (void *object);
|
cogl_is_context (void *object);
|
||||||
|
|
||||||
/* XXX: not guarded by the EXPERIMENTAL_API defines to avoid
|
/* XXX: not guarded by the EXPERIMENTAL_API defines to avoid
|
||||||
@ -285,7 +285,7 @@ typedef enum _CoglFeatureID
|
|||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_has_feature (CoglContext *context, CoglFeatureID feature);
|
cogl_has_feature (CoglContext *context, CoglFeatureID feature);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -305,7 +305,7 @@ cogl_has_feature (CoglContext *context, CoglFeatureID feature);
|
|||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_has_features (CoglContext *context, ...);
|
cogl_has_features (CoglContext *context, ...);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -93,7 +93,7 @@ GHashTable *_cogl_debug_instances;
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
_cogl_parse_debug_string_for_keys (const char *value,
|
_cogl_parse_debug_string_for_keys (const char *value,
|
||||||
CoglBool enable,
|
gboolean enable,
|
||||||
const GDebugKey *keys,
|
const GDebugKey *keys,
|
||||||
unsigned int nkeys)
|
unsigned int nkeys)
|
||||||
{
|
{
|
||||||
@ -151,8 +151,8 @@ _cogl_parse_debug_string_for_keys (const char *value,
|
|||||||
|
|
||||||
void
|
void
|
||||||
_cogl_parse_debug_string (const char *value,
|
_cogl_parse_debug_string (const char *value,
|
||||||
CoglBool enable,
|
gboolean enable,
|
||||||
CoglBool ignore_help)
|
gboolean ignore_help)
|
||||||
{
|
{
|
||||||
if (ignore_help && strcmp (value, "help") == 0)
|
if (ignore_help && strcmp (value, "help") == 0)
|
||||||
return;
|
return;
|
||||||
@ -210,7 +210,7 @@ _cogl_parse_debug_string (const char *value,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef COGL_ENABLE_DEBUG
|
#ifdef COGL_ENABLE_DEBUG
|
||||||
static CoglBool
|
static gboolean
|
||||||
cogl_arg_debug_cb (const char *key,
|
cogl_arg_debug_cb (const char *key,
|
||||||
const char *value,
|
const char *value,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
@ -221,7 +221,7 @@ cogl_arg_debug_cb (const char *key,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
cogl_arg_no_debug_cb (const char *key,
|
cogl_arg_no_debug_cb (const char *key,
|
||||||
const char *value,
|
const char *value,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
@ -267,7 +267,7 @@ _cogl_debug_check_environment (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
pre_parse_hook (GOptionContext *context,
|
pre_parse_hook (GOptionContext *context,
|
||||||
GOptionGroup *group,
|
GOptionGroup *group,
|
||||||
void *data,
|
void *data,
|
||||||
|
@ -112,8 +112,8 @@ _cogl_debug_check_environment (void);
|
|||||||
|
|
||||||
void
|
void
|
||||||
_cogl_parse_debug_string (const char *value,
|
_cogl_parse_debug_string (const char *value,
|
||||||
CoglBool enable,
|
gboolean enable,
|
||||||
CoglBool ignore_help);
|
gboolean ignore_help);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -50,13 +50,13 @@ cogl_depth_state_init (CoglDepthState *state)
|
|||||||
|
|
||||||
void
|
void
|
||||||
cogl_depth_state_set_test_enabled (CoglDepthState *state,
|
cogl_depth_state_set_test_enabled (CoglDepthState *state,
|
||||||
CoglBool enabled)
|
gboolean enabled)
|
||||||
{
|
{
|
||||||
_COGL_RETURN_IF_FAIL (state->magic == COGL_DEPTH_STATE_MAGIC);
|
_COGL_RETURN_IF_FAIL (state->magic == COGL_DEPTH_STATE_MAGIC);
|
||||||
state->test_enabled = enabled;
|
state->test_enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_depth_state_get_test_enabled (CoglDepthState *state)
|
cogl_depth_state_get_test_enabled (CoglDepthState *state)
|
||||||
{
|
{
|
||||||
_COGL_RETURN_VAL_IF_FAIL (state->magic == COGL_DEPTH_STATE_MAGIC, FALSE);
|
_COGL_RETURN_VAL_IF_FAIL (state->magic == COGL_DEPTH_STATE_MAGIC, FALSE);
|
||||||
@ -65,13 +65,13 @@ cogl_depth_state_get_test_enabled (CoglDepthState *state)
|
|||||||
|
|
||||||
void
|
void
|
||||||
cogl_depth_state_set_write_enabled (CoglDepthState *state,
|
cogl_depth_state_set_write_enabled (CoglDepthState *state,
|
||||||
CoglBool enabled)
|
gboolean enabled)
|
||||||
{
|
{
|
||||||
_COGL_RETURN_IF_FAIL (state->magic == COGL_DEPTH_STATE_MAGIC);
|
_COGL_RETURN_IF_FAIL (state->magic == COGL_DEPTH_STATE_MAGIC);
|
||||||
state->write_enabled = enabled;
|
state->write_enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_depth_state_get_write_enabled (CoglDepthState *state)
|
cogl_depth_state_get_write_enabled (CoglDepthState *state)
|
||||||
{
|
{
|
||||||
_COGL_RETURN_VAL_IF_FAIL (state->magic == COGL_DEPTH_STATE_MAGIC, FALSE);
|
_COGL_RETURN_VAL_IF_FAIL (state->magic == COGL_DEPTH_STATE_MAGIC, FALSE);
|
||||||
|
@ -54,9 +54,9 @@ typedef struct {
|
|||||||
/*< private >*/
|
/*< private >*/
|
||||||
uint32_t COGL_PRIVATE (magic);
|
uint32_t COGL_PRIVATE (magic);
|
||||||
|
|
||||||
CoglBool COGL_PRIVATE (test_enabled);
|
gboolean COGL_PRIVATE (test_enabled);
|
||||||
CoglDepthTestFunction COGL_PRIVATE (test_function);
|
CoglDepthTestFunction COGL_PRIVATE (test_function);
|
||||||
CoglBool COGL_PRIVATE (write_enabled);
|
gboolean COGL_PRIVATE (write_enabled);
|
||||||
float COGL_PRIVATE (range_near);
|
float COGL_PRIVATE (range_near);
|
||||||
float COGL_PRIVATE (range_far);
|
float COGL_PRIVATE (range_far);
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ cogl_depth_state_init (CoglDepthState *state);
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cogl_depth_state_set_test_enabled (CoglDepthState *state,
|
cogl_depth_state_set_test_enabled (CoglDepthState *state,
|
||||||
CoglBool enable);
|
gboolean enable);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_depth_state_get_test_enabled:
|
* cogl_depth_state_get_test_enabled:
|
||||||
@ -127,7 +127,7 @@ cogl_depth_state_set_test_enabled (CoglDepthState *state,
|
|||||||
* Since: 2.0
|
* Since: 2.0
|
||||||
* Stability: Unstable
|
* Stability: Unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_depth_state_get_test_enabled (CoglDepthState *state);
|
cogl_depth_state_get_test_enabled (CoglDepthState *state);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -152,7 +152,7 @@ cogl_depth_state_get_test_enabled (CoglDepthState *state);
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cogl_depth_state_set_write_enabled (CoglDepthState *state,
|
cogl_depth_state_set_write_enabled (CoglDepthState *state,
|
||||||
CoglBool enable);
|
gboolean enable);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_depth_state_get_write_enabled:
|
* cogl_depth_state_get_write_enabled:
|
||||||
@ -165,7 +165,7 @@ cogl_depth_state_set_write_enabled (CoglDepthState *state,
|
|||||||
* Since: 2.0
|
* Since: 2.0
|
||||||
* Stability: Unstable
|
* Stability: Unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_depth_state_get_write_enabled (CoglDepthState *state);
|
cogl_depth_state_get_write_enabled (CoglDepthState *state);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,7 +40,7 @@ struct _CoglDisplay
|
|||||||
{
|
{
|
||||||
CoglObject _parent;
|
CoglObject _parent;
|
||||||
|
|
||||||
CoglBool setup;
|
gboolean setup;
|
||||||
CoglRenderer *renderer;
|
CoglRenderer *renderer;
|
||||||
CoglOnscreenTemplate *onscreen_template;
|
CoglOnscreenTemplate *onscreen_template;
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ cogl_display_set_onscreen_template (CoglDisplay *display,
|
|||||||
display->onscreen_template = cogl_onscreen_template_new (NULL);
|
display->onscreen_template = cogl_onscreen_template_new (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_display_setup (CoglDisplay *display,
|
cogl_display_setup (CoglDisplay *display,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
{
|
{
|
||||||
|
@ -186,7 +186,7 @@ cogl_display_set_onscreen_template (CoglDisplay *display,
|
|||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_display_setup (CoglDisplay *display,
|
cogl_display_setup (CoglDisplay *display,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ cogl_display_setup (CoglDisplay *display,
|
|||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_display (void *object);
|
cogl_is_display (void *object);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -42,7 +42,7 @@ struct _CoglDriverVtable
|
|||||||
{
|
{
|
||||||
/* TODO: factor this out since this is OpenGL specific and
|
/* TODO: factor this out since this is OpenGL specific and
|
||||||
* so can be ignored by non-OpenGL drivers. */
|
* so can be ignored by non-OpenGL drivers. */
|
||||||
CoglBool
|
gboolean
|
||||||
(* pixel_format_from_gl_internal) (CoglContext *context,
|
(* pixel_format_from_gl_internal) (CoglContext *context,
|
||||||
GLenum gl_int_format,
|
GLenum gl_int_format,
|
||||||
CoglPixelFormat *out_format);
|
CoglPixelFormat *out_format);
|
||||||
@ -63,11 +63,11 @@ struct _CoglDriverVtable
|
|||||||
GLenum *out_glformat,
|
GLenum *out_glformat,
|
||||||
GLenum *out_gltype);
|
GLenum *out_gltype);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
(* update_features) (CoglContext *context,
|
(* update_features) (CoglContext *context,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
(* offscreen_allocate) (CoglOffscreen *offscreen,
|
(* offscreen_allocate) (CoglOffscreen *offscreen,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ struct _CoglDriverVtable
|
|||||||
int n_attributes,
|
int n_attributes,
|
||||||
CoglDrawFlags flags);
|
CoglDrawFlags flags);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
(* framebuffer_read_pixels_into_bitmap) (CoglFramebuffer *framebuffer,
|
(* framebuffer_read_pixels_into_bitmap) (CoglFramebuffer *framebuffer,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
@ -135,7 +135,7 @@ struct _CoglDriverVtable
|
|||||||
/* Returns TRUE if the driver can support creating a 2D texture with
|
/* Returns TRUE if the driver can support creating a 2D texture with
|
||||||
* the given geometry and specified internal format.
|
* the given geometry and specified internal format.
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
(* texture_2d_can_create) (CoglContext *ctx,
|
(* texture_2d_can_create) (CoglContext *ctx,
|
||||||
int width,
|
int width,
|
||||||
int height,
|
int height,
|
||||||
@ -151,7 +151,7 @@ struct _CoglDriverVtable
|
|||||||
|
|
||||||
/* Allocates (uninitialized) storage for the given texture according
|
/* Allocates (uninitialized) storage for the given texture according
|
||||||
* to the configured size and format of the texture */
|
* to the configured size and format of the texture */
|
||||||
CoglBool
|
gboolean
|
||||||
(* texture_2d_allocate) (CoglTexture *tex,
|
(* texture_2d_allocate) (CoglTexture *tex,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ struct _CoglDriverVtable
|
|||||||
* Since this may need to create the underlying storage first
|
* Since this may need to create the underlying storage first
|
||||||
* it may throw a NO_MEMORY error.
|
* it may throw a NO_MEMORY error.
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
(* texture_2d_copy_from_bitmap) (CoglTexture2D *tex_2d,
|
(* texture_2d_copy_from_bitmap) (CoglTexture2D *tex_2d,
|
||||||
int src_x,
|
int src_x,
|
||||||
int src_y,
|
int src_y,
|
||||||
@ -199,7 +199,7 @@ struct _CoglDriverVtable
|
|||||||
int level,
|
int level,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
(* texture_2d_is_get_data_supported) (CoglTexture2D *tex_2d);
|
(* texture_2d_is_get_data_supported) (CoglTexture2D *tex_2d);
|
||||||
|
|
||||||
/* Reads back the full contents of the given texture and write it to
|
/* Reads back the full contents of the given texture and write it to
|
||||||
@ -254,7 +254,7 @@ struct _CoglDriverVtable
|
|||||||
|
|
||||||
/* Uploads data to the buffer without needing to map it necessarily
|
/* Uploads data to the buffer without needing to map it necessarily
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
(* buffer_set_data) (CoglBuffer *buffer,
|
(* buffer_set_data) (CoglBuffer *buffer,
|
||||||
unsigned int offset,
|
unsigned int offset,
|
||||||
const void *data,
|
const void *data,
|
||||||
|
@ -49,7 +49,7 @@ cogl_error_copy (CoglError *error)
|
|||||||
return (CoglError *)g_error_copy ((GError *)error);
|
return (CoglError *)g_error_copy ((GError *)error);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_error_matches (CoglError *error,
|
cogl_error_matches (CoglError *error,
|
||||||
uint32_t domain,
|
uint32_t domain,
|
||||||
int code)
|
int code)
|
||||||
|
@ -147,7 +147,7 @@ cogl_error_copy (CoglError *error);
|
|||||||
* Return value: whether the @error corresponds to the given @domain
|
* Return value: whether the @error corresponds to the given @domain
|
||||||
* and @code.
|
* and @code.
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_error_matches (CoglError *error,
|
cogl_error_matches (CoglError *error,
|
||||||
uint32_t domain,
|
uint32_t domain,
|
||||||
int code);
|
int code);
|
||||||
|
@ -158,7 +158,7 @@ cogl_euler_init_from_matrix (CoglEuler *euler,
|
|||||||
euler->roll = R;
|
euler->roll = R;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_euler_equal (const void *v1, const void *v2)
|
cogl_euler_equal (const void *v1, const void *v2)
|
||||||
{
|
{
|
||||||
const CoglEuler *a = v1;
|
const CoglEuler *a = v1;
|
||||||
|
@ -230,7 +230,7 @@ cogl_euler_init_from_quaternion (CoglEuler *euler,
|
|||||||
* Returns: %TRUE if @v1 and @v2 are equal else %FALSE.
|
* Returns: %TRUE if @v1 and @v2 are equal else %FALSE.
|
||||||
* Since: 2.0
|
* Since: 2.0
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_euler_equal (const void *v1, const void *v2);
|
cogl_euler_equal (const void *v1, const void *v2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include "cogl-renderer-private.h"
|
#include "cogl-renderer-private.h"
|
||||||
#include "cogl-private.h"
|
#include "cogl-private.h"
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_feature_check (CoglRenderer *renderer,
|
_cogl_feature_check (CoglRenderer *renderer,
|
||||||
const char *driver_prefix,
|
const char *driver_prefix,
|
||||||
const CoglFeatureData *data,
|
const CoglFeatureData *data,
|
||||||
@ -52,7 +52,7 @@ _cogl_feature_check (CoglRenderer *renderer,
|
|||||||
const char *suffix = NULL;
|
const char *suffix = NULL;
|
||||||
int func_num;
|
int func_num;
|
||||||
CoglExtGlesAvailability gles_availability = 0;
|
CoglExtGlesAvailability gles_availability = 0;
|
||||||
CoglBool in_core;
|
gboolean in_core;
|
||||||
|
|
||||||
switch (driver)
|
switch (driver)
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,7 @@ struct _CoglFeatureData
|
|||||||
const CoglFeatureFunction *functions;
|
const CoglFeatureFunction *functions;
|
||||||
};
|
};
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_feature_check (CoglRenderer *renderer,
|
_cogl_feature_check (CoglRenderer *renderer,
|
||||||
const char *driver_prefix,
|
const char *driver_prefix,
|
||||||
const CoglFeatureData *data,
|
const CoglFeatureData *data,
|
||||||
|
@ -50,7 +50,7 @@ _cogl_fence_check (CoglFenceClosure *fence)
|
|||||||
if (fence->type == FENCE_TYPE_WINSYS)
|
if (fence->type == FENCE_TYPE_WINSYS)
|
||||||
{
|
{
|
||||||
const CoglWinsysVtable *winsys = _cogl_context_get_winsys (context);
|
const CoglWinsysVtable *winsys = _cogl_context_get_winsys (context);
|
||||||
CoglBool ret;
|
gboolean ret;
|
||||||
|
|
||||||
ret = winsys->fence_is_complete (context, fence->fence_obj);
|
ret = winsys->fence_is_complete (context, fence->fence_obj);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
@ -66,7 +66,7 @@ GType cogl_frame_info_get_gtype (void);
|
|||||||
* Since: 2.0
|
* Since: 2.0
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_frame_info (void *object);
|
cogl_is_frame_info (void *object);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,10 +57,10 @@ typedef enum _CoglFramebufferType {
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
CoglSwapChain *swap_chain;
|
CoglSwapChain *swap_chain;
|
||||||
CoglBool need_stencil;
|
gboolean need_stencil;
|
||||||
int samples_per_pixel;
|
int samples_per_pixel;
|
||||||
CoglBool depth_texture_enabled;
|
gboolean depth_texture_enabled;
|
||||||
CoglBool stereo_enabled;
|
gboolean stereo_enabled;
|
||||||
} CoglFramebufferConfig;
|
} CoglFramebufferConfig;
|
||||||
|
|
||||||
/* Flags to pass to _cogl_offscreen_new_with_texture_full */
|
/* Flags to pass to _cogl_offscreen_new_with_texture_full */
|
||||||
@ -140,7 +140,7 @@ struct _CoglFramebuffer
|
|||||||
/* Format of the pixels in the framebuffer (including the expected
|
/* Format of the pixels in the framebuffer (including the expected
|
||||||
premult state) */
|
premult state) */
|
||||||
CoglPixelFormat internal_format;
|
CoglPixelFormat internal_format;
|
||||||
CoglBool allocated;
|
gboolean allocated;
|
||||||
|
|
||||||
CoglMatrixStack *modelview_stack;
|
CoglMatrixStack *modelview_stack;
|
||||||
CoglMatrixStack *projection_stack;
|
CoglMatrixStack *projection_stack;
|
||||||
@ -153,8 +153,8 @@ struct _CoglFramebuffer
|
|||||||
|
|
||||||
CoglClipStack *clip_stack;
|
CoglClipStack *clip_stack;
|
||||||
|
|
||||||
CoglBool dither_enabled;
|
gboolean dither_enabled;
|
||||||
CoglBool depth_writing_enabled;
|
gboolean depth_writing_enabled;
|
||||||
CoglColorMask color_mask;
|
CoglColorMask color_mask;
|
||||||
CoglStereoMode stereo_mode;
|
CoglStereoMode stereo_mode;
|
||||||
|
|
||||||
@ -181,14 +181,14 @@ struct _CoglFramebuffer
|
|||||||
int clear_clip_y0;
|
int clear_clip_y0;
|
||||||
int clear_clip_x1;
|
int clear_clip_x1;
|
||||||
int clear_clip_y1;
|
int clear_clip_y1;
|
||||||
CoglBool clear_clip_dirty;
|
gboolean clear_clip_dirty;
|
||||||
|
|
||||||
/* Whether something has been drawn to the buffer since the last
|
/* Whether something has been drawn to the buffer since the last
|
||||||
* swap buffers or swap region. */
|
* swap buffers or swap region. */
|
||||||
CoglBool mid_scene;
|
gboolean mid_scene;
|
||||||
|
|
||||||
/* driver specific */
|
/* driver specific */
|
||||||
CoglBool dirty_bitmasks;
|
gboolean dirty_bitmasks;
|
||||||
CoglFramebufferBits bits;
|
CoglFramebufferBits bits;
|
||||||
|
|
||||||
int samples_per_pixel;
|
int samples_per_pixel;
|
||||||
@ -196,7 +196,7 @@ struct _CoglFramebuffer
|
|||||||
/* Whether the depth buffer was enabled for this framebuffer,
|
/* Whether the depth buffer was enabled for this framebuffer,
|
||||||
* usually means it needs to be cleared before being reused next.
|
* usually means it needs to be cleared before being reused next.
|
||||||
*/
|
*/
|
||||||
CoglBool depth_buffer_clear_needed;
|
gboolean depth_buffer_clear_needed;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -493,7 +493,7 @@ _cogl_framebuffer_get_projection_entry (CoglFramebuffer *framebuffer)
|
|||||||
return projection_stack->last_entry;
|
return projection_stack->last_entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
_cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
|
@ -83,7 +83,7 @@ cogl_framebuffer_error_quark (void)
|
|||||||
return g_quark_from_static_string ("cogl-framebuffer-error-quark");
|
return g_quark_from_static_string ("cogl-framebuffer-error-quark");
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_framebuffer (void *object)
|
cogl_is_framebuffer (void *object)
|
||||||
{
|
{
|
||||||
CoglObject *obj = object;
|
CoglObject *obj = object;
|
||||||
@ -224,7 +224,7 @@ _cogl_framebuffer_clear_without_flush4f (CoglFramebuffer *framebuffer,
|
|||||||
|
|
||||||
if (!buffers)
|
if (!buffers)
|
||||||
{
|
{
|
||||||
static CoglBool shown = FALSE;
|
static gboolean shown = FALSE;
|
||||||
|
|
||||||
if (!shown)
|
if (!shown)
|
||||||
{
|
{
|
||||||
@ -266,7 +266,7 @@ cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer,
|
|||||||
int scissor_y0;
|
int scissor_y0;
|
||||||
int scissor_x1;
|
int scissor_x1;
|
||||||
int scissor_y1;
|
int scissor_y1;
|
||||||
CoglBool saved_viewport_scissor_workaround;
|
gboolean saved_viewport_scissor_workaround;
|
||||||
|
|
||||||
if (!framebuffer->depth_buffer_clear_needed &&
|
if (!framebuffer->depth_buffer_clear_needed &&
|
||||||
(buffers & COGL_BUFFER_BIT_DEPTH))
|
(buffers & COGL_BUFFER_BIT_DEPTH))
|
||||||
@ -741,7 +741,7 @@ _cogl_offscreen_free (CoglOffscreen *offscreen)
|
|||||||
g_free (offscreen);
|
g_free (offscreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_allocate (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_allocate (CoglFramebuffer *framebuffer,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
{
|
{
|
||||||
@ -1126,7 +1126,7 @@ cogl_framebuffer_set_stereo_mode (CoglFramebuffer *framebuffer,
|
|||||||
COGL_FRAMEBUFFER_STATE_STEREO_MODE;
|
COGL_FRAMEBUFFER_STATE_STEREO_MODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer)
|
cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer)
|
||||||
{
|
{
|
||||||
return framebuffer->depth_writing_enabled;
|
return framebuffer->depth_writing_enabled;
|
||||||
@ -1134,7 +1134,7 @@ cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer)
|
|||||||
|
|
||||||
void
|
void
|
||||||
cogl_framebuffer_set_depth_write_enabled (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_set_depth_write_enabled (CoglFramebuffer *framebuffer,
|
||||||
CoglBool depth_write_enabled)
|
gboolean depth_write_enabled)
|
||||||
{
|
{
|
||||||
if (framebuffer->depth_writing_enabled == depth_write_enabled)
|
if (framebuffer->depth_writing_enabled == depth_write_enabled)
|
||||||
return;
|
return;
|
||||||
@ -1149,7 +1149,7 @@ cogl_framebuffer_set_depth_write_enabled (CoglFramebuffer *framebuffer,
|
|||||||
COGL_FRAMEBUFFER_STATE_DEPTH_WRITE;
|
COGL_FRAMEBUFFER_STATE_DEPTH_WRITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer)
|
cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer)
|
||||||
{
|
{
|
||||||
return framebuffer->dither_enabled;
|
return framebuffer->dither_enabled;
|
||||||
@ -1157,7 +1157,7 @@ cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer)
|
|||||||
|
|
||||||
void
|
void
|
||||||
cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
|
||||||
CoglBool dither_enabled)
|
gboolean dither_enabled)
|
||||||
{
|
{
|
||||||
if (framebuffer->dither_enabled == dither_enabled)
|
if (framebuffer->dither_enabled == dither_enabled)
|
||||||
return;
|
return;
|
||||||
@ -1172,14 +1172,14 @@ cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
|
|||||||
|
|
||||||
void
|
void
|
||||||
cogl_framebuffer_set_depth_texture_enabled (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_set_depth_texture_enabled (CoglFramebuffer *framebuffer,
|
||||||
CoglBool enabled)
|
gboolean enabled)
|
||||||
{
|
{
|
||||||
_COGL_RETURN_IF_FAIL (!framebuffer->allocated);
|
_COGL_RETURN_IF_FAIL (!framebuffer->allocated);
|
||||||
|
|
||||||
framebuffer->config.depth_texture_enabled = enabled;
|
framebuffer->config.depth_texture_enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_get_depth_texture_enabled (CoglFramebuffer *framebuffer)
|
cogl_framebuffer_get_depth_texture_enabled (CoglFramebuffer *framebuffer)
|
||||||
{
|
{
|
||||||
return framebuffer->config.depth_texture_enabled;
|
return framebuffer->config.depth_texture_enabled;
|
||||||
@ -1268,14 +1268,14 @@ cogl_framebuffer_get_context (CoglFramebuffer *framebuffer)
|
|||||||
return framebuffer->context;
|
return framebuffer->context;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_framebuffer_try_fast_read_pixel (CoglFramebuffer *framebuffer,
|
_cogl_framebuffer_try_fast_read_pixel (CoglFramebuffer *framebuffer,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
CoglReadPixelsFlags source,
|
CoglReadPixelsFlags source,
|
||||||
CoglBitmap *bitmap)
|
CoglBitmap *bitmap)
|
||||||
{
|
{
|
||||||
CoglBool found_intersection;
|
gboolean found_intersection;
|
||||||
CoglPixelFormat format;
|
CoglPixelFormat format;
|
||||||
|
|
||||||
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_FAST_READ_PIXEL)))
|
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_FAST_READ_PIXEL)))
|
||||||
@ -1347,7 +1347,7 @@ _cogl_framebuffer_try_fast_read_pixel (CoglFramebuffer *framebuffer,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
_cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
@ -1397,7 +1397,7 @@ _cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
|||||||
error);
|
error);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
@ -1405,7 +1405,7 @@ cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
|||||||
CoglBitmap *bitmap)
|
CoglBitmap *bitmap)
|
||||||
{
|
{
|
||||||
CoglError *ignore_error = NULL;
|
CoglError *ignore_error = NULL;
|
||||||
CoglBool status =
|
gboolean status =
|
||||||
_cogl_framebuffer_read_pixels_into_bitmap (framebuffer,
|
_cogl_framebuffer_read_pixels_into_bitmap (framebuffer,
|
||||||
x, y, source, bitmap,
|
x, y, source, bitmap,
|
||||||
&ignore_error);
|
&ignore_error);
|
||||||
@ -1414,7 +1414,7 @@ cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_read_pixels (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_read_pixels (CoglFramebuffer *framebuffer,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
@ -1425,7 +1425,7 @@ cogl_framebuffer_read_pixels (CoglFramebuffer *framebuffer,
|
|||||||
{
|
{
|
||||||
int bpp = _cogl_pixel_format_get_bytes_per_pixel (format);
|
int bpp = _cogl_pixel_format_get_bytes_per_pixel (format);
|
||||||
CoglBitmap *bitmap;
|
CoglBitmap *bitmap;
|
||||||
CoglBool ret;
|
gboolean ret;
|
||||||
|
|
||||||
bitmap = cogl_bitmap_new_for_data (framebuffer->context,
|
bitmap = cogl_bitmap_new_for_data (framebuffer->context,
|
||||||
width, height,
|
width, height,
|
||||||
@ -2097,7 +2097,7 @@ get_wire_line_indices (CoglContext *ctx,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
remove_layer_cb (CoglPipeline *pipeline,
|
remove_layer_cb (CoglPipeline *pipeline,
|
||||||
int layer_index,
|
int layer_index,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
|
@ -123,7 +123,7 @@ GType cogl_framebuffer_get_gtype (void);
|
|||||||
* Since: 1.8
|
* Since: 1.8
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_allocate (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_allocate (CoglFramebuffer *framebuffer,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
@ -736,7 +736,7 @@ cogl_framebuffer_get_depth_bits (CoglFramebuffer *framebuffer);
|
|||||||
* Since: 1.20
|
* Since: 1.20
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_get_is_stereo (CoglFramebuffer *framebuffer);
|
cogl_framebuffer_get_is_stereo (CoglFramebuffer *framebuffer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -754,7 +754,7 @@ cogl_framebuffer_get_is_stereo (CoglFramebuffer *framebuffer);
|
|||||||
* Since: 1.8
|
* Since: 1.8
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer);
|
cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -781,7 +781,7 @@ cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer);
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
|
||||||
CoglBool dither_enabled);
|
gboolean dither_enabled);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_framebuffer_get_depth_write_enabled:
|
* cogl_framebuffer_get_depth_write_enabled:
|
||||||
@ -794,7 +794,7 @@ cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
|
|||||||
* Since: 1.18
|
* Since: 1.18
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer);
|
cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -814,7 +814,7 @@ cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer);
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cogl_framebuffer_set_depth_write_enabled (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_set_depth_write_enabled (CoglFramebuffer *framebuffer,
|
||||||
CoglBool depth_write_enabled);
|
gboolean depth_write_enabled);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_framebuffer_get_color_mask:
|
* cogl_framebuffer_get_color_mask:
|
||||||
@ -904,7 +904,7 @@ cogl_framebuffer_set_stereo_mode (CoglFramebuffer *framebuffer,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cogl_framebuffer_set_depth_texture_enabled (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_set_depth_texture_enabled (CoglFramebuffer *framebuffer,
|
||||||
CoglBool enabled);
|
gboolean enabled);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_framebuffer_get_depth_texture_enabled:
|
* cogl_framebuffer_get_depth_texture_enabled:
|
||||||
@ -919,7 +919,7 @@ cogl_framebuffer_set_depth_texture_enabled (CoglFramebuffer *framebuffer,
|
|||||||
* Since: 1.14
|
* Since: 1.14
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_get_depth_texture_enabled (CoglFramebuffer *framebuffer);
|
cogl_framebuffer_get_depth_texture_enabled (CoglFramebuffer *framebuffer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1749,7 +1749,7 @@ cogl_framebuffer_finish (CoglFramebuffer *framebuffer);
|
|||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
@ -1795,7 +1795,7 @@ cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
|
|||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_framebuffer_read_pixels (CoglFramebuffer *framebuffer,
|
cogl_framebuffer_read_pixels (CoglFramebuffer *framebuffer,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
@ -1842,7 +1842,7 @@ typedef enum { /*< prefix=COGL_FRAMEBUFFER_ERROR >*/
|
|||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_framebuffer (void *object);
|
cogl_is_framebuffer (void *object);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -67,7 +67,7 @@ typedef struct
|
|||||||
/* Set once this object has had glDeleteShader called on it. We need
|
/* Set once this object has had glDeleteShader called on it. We need
|
||||||
* to keep track of this so we don't deref the data twice if the
|
* to keep track of this so we don't deref the data twice if the
|
||||||
* application calls glDeleteShader multiple times */
|
* application calls glDeleteShader multiple times */
|
||||||
CoglBool deleted;
|
gboolean deleted;
|
||||||
} CoglGLES2ShaderData;
|
} CoglGLES2ShaderData;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
@ -96,7 +96,7 @@ typedef struct
|
|||||||
/* Set once this object has had glDeleteProgram called on it. We need
|
/* Set once this object has had glDeleteProgram called on it. We need
|
||||||
* to keep track of this so we don't deref the data twice if the
|
* to keep track of this so we don't deref the data twice if the
|
||||||
* application calls glDeleteProgram multiple times */
|
* application calls glDeleteProgram multiple times */
|
||||||
CoglBool deleted;
|
gboolean deleted;
|
||||||
|
|
||||||
GLuint flip_vector_location;
|
GLuint flip_vector_location;
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ struct _CoglGLES2Context
|
|||||||
/* This is set to FALSE until the first time the GLES2 context is
|
/* This is set to FALSE until the first time the GLES2 context is
|
||||||
* bound to something. We need to keep track of this so we can set
|
* bound to something. We need to keep track of this so we can set
|
||||||
* the viewport and scissor the first time it is bound. */
|
* the viewport and scissor the first time it is bound. */
|
||||||
CoglBool has_been_bound;
|
gboolean has_been_bound;
|
||||||
|
|
||||||
CoglFramebuffer *read_buffer;
|
CoglFramebuffer *read_buffer;
|
||||||
CoglGLES2Offscreen *gles2_read_buffer;
|
CoglGLES2Offscreen *gles2_read_buffer;
|
||||||
@ -172,11 +172,11 @@ struct _CoglGLES2Context
|
|||||||
/* The following state is tracked separately from the GL context
|
/* The following state is tracked separately from the GL context
|
||||||
* because we need to modify it depending on whether we are flipping
|
* because we need to modify it depending on whether we are flipping
|
||||||
* the geometry. */
|
* the geometry. */
|
||||||
CoglBool viewport_dirty;
|
gboolean viewport_dirty;
|
||||||
int viewport[4];
|
int viewport[4];
|
||||||
CoglBool scissor_dirty;
|
gboolean scissor_dirty;
|
||||||
int scissor[4];
|
int scissor[4];
|
||||||
CoglBool front_face_dirty;
|
gboolean front_face_dirty;
|
||||||
GLenum front_face;
|
GLenum front_face;
|
||||||
|
|
||||||
/* We need to keep track of the pack alignment so we can flip the
|
/* We need to keep track of the pack alignment so we can flip the
|
||||||
|
@ -139,7 +139,7 @@ detach_shader (CoglGLES2ProgramData *program_data,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
is_symbol_character (char ch)
|
is_symbol_character (char ch)
|
||||||
{
|
{
|
||||||
return g_ascii_isalnum (ch) || ch == '_';
|
return g_ascii_isalnum (ch) || ch == '_';
|
||||||
@ -1775,7 +1775,7 @@ _cogl_gles2_offscreen_allocate (CoglOffscreen *offscreen,
|
|||||||
return gles2_offscreen;
|
return gles2_offscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_push_gles2_context (CoglContext *ctx,
|
cogl_push_gles2_context (CoglContext *ctx,
|
||||||
CoglGLES2Context *gles2_ctx,
|
CoglGLES2Context *gles2_ctx,
|
||||||
CoglFramebuffer *read_buffer,
|
CoglFramebuffer *read_buffer,
|
||||||
@ -1955,7 +1955,7 @@ cogl_gles2_texture_2d_new_from_handle (CoglContext *ctx,
|
|||||||
format);
|
format);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_gles2_texture_get_handle (CoglTexture *texture,
|
cogl_gles2_texture_get_handle (CoglTexture *texture,
|
||||||
unsigned int *handle,
|
unsigned int *handle,
|
||||||
unsigned int *target)
|
unsigned int *target)
|
||||||
|
@ -266,7 +266,7 @@ cogl_gles2_context_get_vtable (CoglGLES2Context *gles2_ctx);
|
|||||||
* otherwise and @error will be updated.
|
* otherwise and @error will be updated.
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_push_gles2_context (CoglContext *ctx,
|
cogl_push_gles2_context (CoglContext *ctx,
|
||||||
CoglGLES2Context *gles2_ctx,
|
CoglGLES2Context *gles2_ctx,
|
||||||
CoglFramebuffer *read_buffer,
|
CoglFramebuffer *read_buffer,
|
||||||
@ -378,7 +378,7 @@ cogl_gles2_texture_2d_new_from_handle (CoglContext *ctx,
|
|||||||
* Since: 2.0
|
* Since: 2.0
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_gles2_texture_get_handle (CoglTexture *texture,
|
cogl_gles2_texture_get_handle (CoglTexture *texture,
|
||||||
unsigned int *handle,
|
unsigned int *handle,
|
||||||
unsigned int *target);
|
unsigned int *target);
|
||||||
@ -394,7 +394,7 @@ cogl_gles2_texture_get_handle (CoglTexture *texture,
|
|||||||
* Since: 2.0
|
* Since: 2.0
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_gles2_context (void *object);
|
cogl_is_gles2_context (void *object);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -45,7 +45,7 @@ typedef struct _CoglGLibSource
|
|||||||
int64_t expiration_time;
|
int64_t expiration_time;
|
||||||
} CoglGLibSource;
|
} CoglGLibSource;
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
cogl_glib_source_prepare (GSource *source, int *timeout)
|
cogl_glib_source_prepare (GSource *source, int *timeout)
|
||||||
{
|
{
|
||||||
CoglGLibSource *cogl_source = (CoglGLibSource *) source;
|
CoglGLibSource *cogl_source = (CoglGLibSource *) source;
|
||||||
@ -109,7 +109,7 @@ cogl_glib_source_prepare (GSource *source, int *timeout)
|
|||||||
return *timeout == 0;
|
return *timeout == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
cogl_glib_source_check (GSource *source)
|
cogl_glib_source_check (GSource *source)
|
||||||
{
|
{
|
||||||
CoglGLibSource *cogl_source = (CoglGLibSource *) source;
|
CoglGLibSource *cogl_source = (CoglGLibSource *) source;
|
||||||
@ -129,7 +129,7 @@ cogl_glib_source_check (GSource *source)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
cogl_glib_source_dispatch (GSource *source,
|
cogl_glib_source_dispatch (GSource *source,
|
||||||
GSourceFunc callback,
|
GSourceFunc callback,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
add_layer_vertex_boilerplate_cb (CoglPipelineLayer *layer,
|
add_layer_vertex_boilerplate_cb (CoglPipelineLayer *layer,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
@ -61,7 +61,7 @@ add_layer_vertex_boilerplate_cb (CoglPipelineLayer *layer,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
add_layer_fragment_boilerplate_cb (CoglPipelineLayer *layer,
|
add_layer_fragment_boilerplate_cb (CoglPipelineLayer *layer,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
{
|
{
|
||||||
|
@ -37,10 +37,10 @@ typedef struct _CoglGLXCachedConfig
|
|||||||
{
|
{
|
||||||
/* This will be -1 if there is no cached config in this slot */
|
/* This will be -1 if there is no cached config in this slot */
|
||||||
int depth;
|
int depth;
|
||||||
CoglBool found;
|
gboolean found;
|
||||||
GLXFBConfig fb_config;
|
GLXFBConfig fb_config;
|
||||||
CoglBool stereo;
|
gboolean stereo;
|
||||||
CoglBool can_mipmap;
|
gboolean can_mipmap;
|
||||||
} CoglGLXCachedConfig;
|
} CoglGLXCachedConfig;
|
||||||
|
|
||||||
#define COGL_GLX_N_CACHED_CONFIGS 6
|
#define COGL_GLX_N_CACHED_CONFIGS 6
|
||||||
@ -49,11 +49,11 @@ typedef struct _CoglGLXDisplay
|
|||||||
{
|
{
|
||||||
CoglGLXCachedConfig glx_cached_configs[COGL_GLX_N_CACHED_CONFIGS];
|
CoglGLXCachedConfig glx_cached_configs[COGL_GLX_N_CACHED_CONFIGS];
|
||||||
|
|
||||||
CoglBool found_fbconfig;
|
gboolean found_fbconfig;
|
||||||
CoglBool fbconfig_has_rgba_visual;
|
gboolean fbconfig_has_rgba_visual;
|
||||||
CoglBool is_direct;
|
gboolean is_direct;
|
||||||
CoglBool have_vblank_counter;
|
gboolean have_vblank_counter;
|
||||||
CoglBool can_vblank_wait;
|
gboolean can_vblank_wait;
|
||||||
GLXFBConfig fbconfig;
|
GLXFBConfig fbconfig;
|
||||||
|
|
||||||
/* Single context for all wins */
|
/* Single context for all wins */
|
||||||
|
@ -51,7 +51,7 @@ typedef struct CoglGpuInfoArchitectureDescription
|
|||||||
CoglGpuInfoArchitecture architecture;
|
CoglGpuInfoArchitecture architecture;
|
||||||
const char *name;
|
const char *name;
|
||||||
CoglGpuInfoArchitectureFlag flags;
|
CoglGpuInfoArchitectureFlag flags;
|
||||||
CoglBool (* check_function) (const CoglGpuInfoStrings *strings);
|
gboolean (* check_function) (const CoglGpuInfoStrings *strings);
|
||||||
|
|
||||||
} CoglGpuInfoArchitectureDescription;
|
} CoglGpuInfoArchitectureDescription;
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ typedef struct
|
|||||||
{
|
{
|
||||||
CoglGpuInfoVendor vendor;
|
CoglGpuInfoVendor vendor;
|
||||||
const char *name;
|
const char *name;
|
||||||
CoglBool (* check_function) (const CoglGpuInfoStrings *strings);
|
gboolean (* check_function) (const CoglGpuInfoStrings *strings);
|
||||||
const CoglGpuInfoArchitectureDescription *architectures;
|
const CoglGpuInfoArchitectureDescription *architectures;
|
||||||
|
|
||||||
} CoglGpuInfoVendorDescription;
|
} CoglGpuInfoVendorDescription;
|
||||||
@ -68,11 +68,11 @@ typedef struct
|
|||||||
{
|
{
|
||||||
CoglGpuInfoDriverPackage driver_package;
|
CoglGpuInfoDriverPackage driver_package;
|
||||||
const char *name;
|
const char *name;
|
||||||
CoglBool (* check_function) (const CoglGpuInfoStrings *strings,
|
gboolean (* check_function) (const CoglGpuInfoStrings *strings,
|
||||||
int *version_out);
|
int *version_out);
|
||||||
} CoglGpuInfoDriverPackageDescription;
|
} CoglGpuInfoDriverPackageDescription;
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_gpu_info_parse_version_string (const char *version_string,
|
_cogl_gpu_info_parse_version_string (const char *version_string,
|
||||||
int n_components,
|
int n_components,
|
||||||
const char **tail,
|
const char **tail,
|
||||||
@ -111,7 +111,7 @@ _cogl_gpu_info_parse_version_string (const char *version_string,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
match_phrase (const char *string, const char *phrase)
|
match_phrase (const char *string, const char *phrase)
|
||||||
{
|
{
|
||||||
const char *part = strstr (string, phrase);
|
const char *part = strstr (string, phrase);
|
||||||
@ -134,13 +134,13 @@ match_phrase (const char *string, const char *phrase)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_intel_vendor (const CoglGpuInfoStrings *strings)
|
check_intel_vendor (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
return match_phrase (strings->renderer_string, "Intel(R)");
|
return match_phrase (strings->renderer_string, "Intel(R)");
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_imagination_technologies_vendor (const CoglGpuInfoStrings *strings)
|
check_imagination_technologies_vendor (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
if (strcmp (strings->vendor_string, "Imagination Technologies") != 0)
|
if (strcmp (strings->vendor_string, "Imagination Technologies") != 0)
|
||||||
@ -148,7 +148,7 @@ check_imagination_technologies_vendor (const CoglGpuInfoStrings *strings)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_arm_vendor (const CoglGpuInfoStrings *strings)
|
check_arm_vendor (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
if (strcmp (strings->vendor_string, "ARM") != 0)
|
if (strcmp (strings->vendor_string, "ARM") != 0)
|
||||||
@ -156,7 +156,7 @@ check_arm_vendor (const CoglGpuInfoStrings *strings)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_qualcomm_vendor (const CoglGpuInfoStrings *strings)
|
check_qualcomm_vendor (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
if (strcmp (strings->vendor_string, "Qualcomm") != 0)
|
if (strcmp (strings->vendor_string, "Qualcomm") != 0)
|
||||||
@ -164,7 +164,7 @@ check_qualcomm_vendor (const CoglGpuInfoStrings *strings)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_nvidia_vendor (const CoglGpuInfoStrings *strings)
|
check_nvidia_vendor (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
if (strcmp (strings->vendor_string, "NVIDIA") != 0 &&
|
if (strcmp (strings->vendor_string, "NVIDIA") != 0 &&
|
||||||
@ -174,7 +174,7 @@ check_nvidia_vendor (const CoglGpuInfoStrings *strings)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_ati_vendor (const CoglGpuInfoStrings *strings)
|
check_ati_vendor (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
if (strcmp (strings->vendor_string, "ATI") != 0)
|
if (strcmp (strings->vendor_string, "ATI") != 0)
|
||||||
@ -183,7 +183,7 @@ check_ati_vendor (const CoglGpuInfoStrings *strings)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_mesa_vendor (const CoglGpuInfoStrings *strings)
|
check_mesa_vendor (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
if (strcmp (strings->vendor_string, "Tungsten Graphics, Inc") == 0)
|
if (strcmp (strings->vendor_string, "Tungsten Graphics, Inc") == 0)
|
||||||
@ -196,39 +196,39 @@ check_mesa_vendor (const CoglGpuInfoStrings *strings)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_true (const CoglGpuInfoStrings *strings)
|
check_true (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
/* This is a last resort so it always matches */
|
/* This is a last resort so it always matches */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_sandybridge_architecture (const CoglGpuInfoStrings *strings)
|
check_sandybridge_architecture (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
return match_phrase (strings->renderer_string, "Sandybridge");
|
return match_phrase (strings->renderer_string, "Sandybridge");
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_llvmpipe_architecture (const CoglGpuInfoStrings *strings)
|
check_llvmpipe_architecture (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
return match_phrase (strings->renderer_string, "llvmpipe");
|
return match_phrase (strings->renderer_string, "llvmpipe");
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_softpipe_architecture (const CoglGpuInfoStrings *strings)
|
check_softpipe_architecture (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
return match_phrase (strings->renderer_string, "softpipe");
|
return match_phrase (strings->renderer_string, "softpipe");
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_swrast_architecture (const CoglGpuInfoStrings *strings)
|
check_swrast_architecture (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
return match_phrase (strings->renderer_string, "software rasterizer") ||
|
return match_phrase (strings->renderer_string, "software rasterizer") ||
|
||||||
match_phrase (strings->renderer_string, "Software Rasterizer");
|
match_phrase (strings->renderer_string, "Software Rasterizer");
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_sgx_architecture (const CoglGpuInfoStrings *strings)
|
check_sgx_architecture (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
if (strncmp (strings->renderer_string, "PowerVR SGX", 12) != 0)
|
if (strncmp (strings->renderer_string, "PowerVR SGX", 12) != 0)
|
||||||
@ -237,7 +237,7 @@ check_sgx_architecture (const CoglGpuInfoStrings *strings)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_mali_architecture (const CoglGpuInfoStrings *strings)
|
check_mali_architecture (const CoglGpuInfoStrings *strings)
|
||||||
{
|
{
|
||||||
if (strncmp (strings->renderer_string, "Mali-", 5) != 0)
|
if (strncmp (strings->renderer_string, "Mali-", 5) != 0)
|
||||||
@ -408,7 +408,7 @@ _cogl_gpu_info_vendors[] =
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_mesa_driver_package (const CoglGpuInfoStrings *strings,
|
check_mesa_driver_package (const CoglGpuInfoStrings *strings,
|
||||||
int *version_ret)
|
int *version_ret)
|
||||||
{
|
{
|
||||||
@ -480,7 +480,7 @@ UNIT_TEST (check_mesa_driver_package_parser,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
check_unknown_driver_package (const CoglGpuInfoStrings *strings,
|
check_unknown_driver_package (const CoglGpuInfoStrings *strings,
|
||||||
int *version_out)
|
int *version_out)
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ cogl_index_buffer_new (CoglContext *context,
|
|||||||
* Since: 1.4
|
* Since: 1.4
|
||||||
* Stability: Unstable
|
* Stability: Unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_index_buffer (void *object);
|
cogl_is_index_buffer (void *object);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -136,7 +136,7 @@ cogl_indices_get_offset (CoglIndices *indices)
|
|||||||
static void
|
static void
|
||||||
warn_about_midscene_changes (void)
|
warn_about_midscene_changes (void)
|
||||||
{
|
{
|
||||||
static CoglBool seen = FALSE;
|
static gboolean seen = FALSE;
|
||||||
if (!seen)
|
if (!seen)
|
||||||
{
|
{
|
||||||
g_warning ("Mid-scene modification of indices has "
|
g_warning ("Mid-scene modification of indices has "
|
||||||
|
@ -152,7 +152,7 @@ cogl_get_rectangle_indices (CoglContext *context, int n_rectangles);
|
|||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_indices (void *object);
|
cogl_is_indices (void *object);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -101,21 +101,21 @@ _cogl_journal_flush (CoglJournal *journal);
|
|||||||
void
|
void
|
||||||
_cogl_journal_discard (CoglJournal *journal);
|
_cogl_journal_discard (CoglJournal *journal);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_journal_all_entries_within_bounds (CoglJournal *journal,
|
_cogl_journal_all_entries_within_bounds (CoglJournal *journal,
|
||||||
float clip_x0,
|
float clip_x0,
|
||||||
float clip_y0,
|
float clip_y0,
|
||||||
float clip_x1,
|
float clip_x1,
|
||||||
float clip_y1);
|
float clip_y1);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_journal_try_read_pixel (CoglJournal *journal,
|
_cogl_journal_try_read_pixel (CoglJournal *journal,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
CoglBitmap *bitmap,
|
CoglBitmap *bitmap,
|
||||||
CoglBool *found_intersection);
|
gboolean *found_intersection);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_is_journal (void *object);
|
_cogl_is_journal (void *object);
|
||||||
|
|
||||||
#endif /* __COGL_JOURNAL_PRIVATE_H */
|
#endif /* __COGL_JOURNAL_PRIVATE_H */
|
||||||
|
@ -119,7 +119,7 @@ typedef struct _CoglJournalFlushState
|
|||||||
typedef void (*CoglJournalBatchCallback) (CoglJournalEntry *start,
|
typedef void (*CoglJournalBatchCallback) (CoglJournalEntry *start,
|
||||||
int n_entries,
|
int n_entries,
|
||||||
void *data);
|
void *data);
|
||||||
typedef CoglBool (*CoglJournalBatchTest) (CoglJournalEntry *entry0,
|
typedef gboolean (*CoglJournalBatchTest) (CoglJournalEntry *entry0,
|
||||||
CoglJournalEntry *entry1);
|
CoglJournalEntry *entry1);
|
||||||
|
|
||||||
static void _cogl_journal_free (CoglJournal *journal);
|
static void _cogl_journal_free (CoglJournal *journal);
|
||||||
@ -403,7 +403,7 @@ _cogl_journal_flush_modelview_and_entries (CoglJournalEntry *batch_start,
|
|||||||
COGL_TIMER_STOP (_cogl_uprof_context, time_flush_modelview_and_entries);
|
COGL_TIMER_STOP (_cogl_uprof_context, time_flush_modelview_and_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
compare_entry_modelviews (CoglJournalEntry *entry0,
|
compare_entry_modelviews (CoglJournalEntry *entry0,
|
||||||
CoglJournalEntry *entry1)
|
CoglJournalEntry *entry1)
|
||||||
{
|
{
|
||||||
@ -448,7 +448,7 @@ _cogl_journal_flush_pipeline_and_entries (CoglJournalEntry *batch_start,
|
|||||||
COGL_TIMER_STOP (_cogl_uprof_context, time_flush_pipeline_entries);
|
COGL_TIMER_STOP (_cogl_uprof_context, time_flush_pipeline_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
compare_entry_pipelines (CoglJournalEntry *entry0, CoglJournalEntry *entry1)
|
compare_entry_pipelines (CoglJournalEntry *entry0, CoglJournalEntry *entry1)
|
||||||
{
|
{
|
||||||
/* batch rectangles using compatible pipelines */
|
/* batch rectangles using compatible pipelines */
|
||||||
@ -470,7 +470,7 @@ typedef struct _CreateAttributeState
|
|||||||
CoglJournalFlushState *flush_state;
|
CoglJournalFlushState *flush_state;
|
||||||
} CreateAttributeState;
|
} CreateAttributeState;
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
create_attribute_cb (CoglPipeline *pipeline,
|
create_attribute_cb (CoglPipeline *pipeline,
|
||||||
int layer_number,
|
int layer_number,
|
||||||
void *user_data)
|
void *user_data)
|
||||||
@ -568,7 +568,7 @@ _cogl_journal_flush_texcoord_vbo_offsets_and_entries (
|
|||||||
COGL_TIMER_STOP (_cogl_uprof_context, time_flush_texcoord_pipeline_entries);
|
COGL_TIMER_STOP (_cogl_uprof_context, time_flush_texcoord_pipeline_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
compare_entry_layer_numbers (CoglJournalEntry *entry0, CoglJournalEntry *entry1)
|
compare_entry_layer_numbers (CoglJournalEntry *entry0, CoglJournalEntry *entry1)
|
||||||
{
|
{
|
||||||
if (_cogl_pipeline_layer_numbers_equal (entry0->pipeline, entry1->pipeline))
|
if (_cogl_pipeline_layer_numbers_equal (entry0->pipeline, entry1->pipeline))
|
||||||
@ -683,7 +683,7 @@ _cogl_journal_flush_vbo_offsets_and_entries (CoglJournalEntry *batch_start,
|
|||||||
time_flush_vbo_texcoord_pipeline_entries);
|
time_flush_vbo_texcoord_pipeline_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
compare_entry_strides (CoglJournalEntry *entry0, CoglJournalEntry *entry1)
|
compare_entry_strides (CoglJournalEntry *entry0, CoglJournalEntry *entry1)
|
||||||
{
|
{
|
||||||
/* Currently the only thing that affects the stride for our vertex arrays
|
/* Currently the only thing that affects the stride for our vertex arrays
|
||||||
@ -763,7 +763,7 @@ typedef struct
|
|||||||
float x_2, y_2;
|
float x_2, y_2;
|
||||||
} ClipBounds;
|
} ClipBounds;
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
can_software_clip_entry (CoglJournalEntry *journal_entry,
|
can_software_clip_entry (CoglJournalEntry *journal_entry,
|
||||||
CoglJournalEntry *prev_journal_entry,
|
CoglJournalEntry *prev_journal_entry,
|
||||||
CoglClipStack *clip_stack,
|
CoglClipStack *clip_stack,
|
||||||
@ -1038,7 +1038,7 @@ _cogl_journal_maybe_software_clip_entries (CoglJournalEntry *batch_start,
|
|||||||
time_check_software_clip);
|
time_check_software_clip);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
compare_entry_clip_stacks (CoglJournalEntry *entry0, CoglJournalEntry *entry1)
|
compare_entry_clip_stacks (CoglJournalEntry *entry0, CoglJournalEntry *entry1)
|
||||||
{
|
{
|
||||||
return entry0->clip_stack == entry1->clip_stack;
|
return entry0->clip_stack == entry1->clip_stack;
|
||||||
@ -1209,7 +1209,7 @@ _cogl_journal_discard (CoglJournal *journal)
|
|||||||
|
|
||||||
/* Note: A return value of FALSE doesn't mean 'no' it means
|
/* Note: A return value of FALSE doesn't mean 'no' it means
|
||||||
* 'unknown' */
|
* 'unknown' */
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_journal_all_entries_within_bounds (CoglJournal *journal,
|
_cogl_journal_all_entries_within_bounds (CoglJournal *journal,
|
||||||
float clip_x0,
|
float clip_x0,
|
||||||
float clip_y0,
|
float clip_y0,
|
||||||
@ -1254,7 +1254,7 @@ _cogl_journal_all_entries_within_bounds (CoglJournal *journal,
|
|||||||
*/
|
*/
|
||||||
for (i = 1; i < journal->entries->len; i++)
|
for (i = 1; i < journal->entries->len; i++)
|
||||||
{
|
{
|
||||||
CoglBool found_reference = FALSE;
|
gboolean found_reference = FALSE;
|
||||||
entry = &g_array_index (journal->entries, CoglJournalEntry, i);
|
entry = &g_array_index (journal->entries, CoglJournalEntry, i);
|
||||||
|
|
||||||
for (clip_entry = entry->clip_stack;
|
for (clip_entry = entry->clip_stack;
|
||||||
@ -1416,7 +1416,7 @@ _cogl_journal_flush (CoglJournal *journal)
|
|||||||
COGL_TIMER_STOP (_cogl_uprof_context, flush_timer);
|
COGL_TIMER_STOP (_cogl_uprof_context, flush_timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
add_framebuffer_deps_cb (CoglPipelineLayer *layer, void *user_data)
|
add_framebuffer_deps_cb (CoglPipelineLayer *layer, void *user_data)
|
||||||
{
|
{
|
||||||
CoglFramebuffer *framebuffer = user_data;
|
CoglFramebuffer *framebuffer = user_data;
|
||||||
@ -1664,16 +1664,16 @@ entry_to_screen_polygon (CoglFramebuffer *framebuffer,
|
|||||||
#undef VIEWPORT_TRANSFORM_Y
|
#undef VIEWPORT_TRANSFORM_Y
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
try_checking_point_hits_entry_after_clipping (CoglFramebuffer *framebuffer,
|
try_checking_point_hits_entry_after_clipping (CoglFramebuffer *framebuffer,
|
||||||
CoglJournalEntry *entry,
|
CoglJournalEntry *entry,
|
||||||
float *vertices,
|
float *vertices,
|
||||||
float x,
|
float x,
|
||||||
float y,
|
float y,
|
||||||
CoglBool *hit)
|
gboolean *hit)
|
||||||
{
|
{
|
||||||
CoglBool can_software_clip = TRUE;
|
gboolean can_software_clip = TRUE;
|
||||||
CoglBool needs_software_clip = FALSE;
|
gboolean needs_software_clip = FALSE;
|
||||||
CoglClipStack *clip_entry;
|
CoglClipStack *clip_entry;
|
||||||
|
|
||||||
*hit = TRUE;
|
*hit = TRUE;
|
||||||
@ -1737,12 +1737,12 @@ try_checking_point_hits_entry_after_clipping (CoglFramebuffer *framebuffer,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_journal_try_read_pixel (CoglJournal *journal,
|
_cogl_journal_try_read_pixel (CoglJournal *journal,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
CoglBitmap *bitmap,
|
CoglBitmap *bitmap,
|
||||||
CoglBool *found_intersection)
|
gboolean *found_intersection)
|
||||||
{
|
{
|
||||||
CoglContext *ctx;
|
CoglContext *ctx;
|
||||||
CoglPixelFormat format;
|
CoglPixelFormat format;
|
||||||
@ -1795,7 +1795,7 @@ _cogl_journal_try_read_pixel (CoglJournal *journal,
|
|||||||
|
|
||||||
if (entry->clip_stack)
|
if (entry->clip_stack)
|
||||||
{
|
{
|
||||||
CoglBool hit;
|
gboolean hit;
|
||||||
|
|
||||||
if (!try_checking_point_hits_entry_after_clipping (framebuffer,
|
if (!try_checking_point_hits_entry_after_clipping (framebuffer,
|
||||||
entry,
|
entry,
|
||||||
|
@ -137,7 +137,7 @@ typedef struct _CoglMatrixEntrySave
|
|||||||
CoglMatrixEntry _parent_data;
|
CoglMatrixEntry _parent_data;
|
||||||
|
|
||||||
CoglMatrix *cache;
|
CoglMatrix *cache;
|
||||||
CoglBool cache_valid;
|
gboolean cache_valid;
|
||||||
|
|
||||||
} CoglMatrixEntrySave;
|
} CoglMatrixEntrySave;
|
||||||
|
|
||||||
@ -166,8 +166,8 @@ struct _CoglMatrixStack
|
|||||||
typedef struct _CoglMatrixEntryCache
|
typedef struct _CoglMatrixEntryCache
|
||||||
{
|
{
|
||||||
CoglMatrixEntry *entry;
|
CoglMatrixEntry *entry;
|
||||||
CoglBool flushed_identity;
|
gboolean flushed_identity;
|
||||||
CoglBool flipped;
|
gboolean flipped;
|
||||||
} CoglMatrixEntryCache;
|
} CoglMatrixEntryCache;
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -184,15 +184,15 @@ _cogl_matrix_entry_flush_to_gl_builtins (CoglContext *ctx,
|
|||||||
CoglMatrixEntry *entry,
|
CoglMatrixEntry *entry,
|
||||||
CoglMatrixMode mode,
|
CoglMatrixMode mode,
|
||||||
CoglFramebuffer *framebuffer,
|
CoglFramebuffer *framebuffer,
|
||||||
CoglBool disable_flip);
|
gboolean disable_flip);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_matrix_entry_cache_init (CoglMatrixEntryCache *cache);
|
_cogl_matrix_entry_cache_init (CoglMatrixEntryCache *cache);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_matrix_entry_cache_maybe_update (CoglMatrixEntryCache *cache,
|
_cogl_matrix_entry_cache_maybe_update (CoglMatrixEntryCache *cache,
|
||||||
CoglMatrixEntry *entry,
|
CoglMatrixEntry *entry,
|
||||||
CoglBool flip);
|
gboolean flip);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_matrix_entry_cache_destroy (CoglMatrixEntryCache *cache);
|
_cogl_matrix_entry_cache_destroy (CoglMatrixEntryCache *cache);
|
||||||
|
@ -427,7 +427,7 @@ cogl_matrix_stack_pop (CoglMatrixStack *stack)
|
|||||||
stack->last_entry = new_top;
|
stack->last_entry = new_top;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_stack_get_inverse (CoglMatrixStack *stack,
|
cogl_matrix_stack_get_inverse (CoglMatrixStack *stack,
|
||||||
CoglMatrix *inverse)
|
CoglMatrix *inverse)
|
||||||
{
|
{
|
||||||
@ -686,7 +686,7 @@ _cogl_matrix_entry_skip_saves (CoglMatrixEntry *entry)
|
|||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_entry_calculate_translation (CoglMatrixEntry *entry0,
|
cogl_matrix_entry_calculate_translation (CoglMatrixEntry *entry0,
|
||||||
CoglMatrixEntry *entry1,
|
CoglMatrixEntry *entry1,
|
||||||
float *x,
|
float *x,
|
||||||
@ -813,7 +813,7 @@ cogl_matrix_entry_calculate_translation (CoglMatrixEntry *entry0,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_entry_is_identity (CoglMatrixEntry *entry)
|
cogl_matrix_entry_is_identity (CoglMatrixEntry *entry)
|
||||||
{
|
{
|
||||||
return entry ? entry->op == COGL_MATRIX_OP_LOAD_IDENTITY : FALSE;
|
return entry ? entry->op == COGL_MATRIX_OP_LOAD_IDENTITY : FALSE;
|
||||||
@ -821,7 +821,7 @@ cogl_matrix_entry_is_identity (CoglMatrixEntry *entry)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
_cogl_matrix_flush_to_gl_builtin (CoglContext *ctx,
|
_cogl_matrix_flush_to_gl_builtin (CoglContext *ctx,
|
||||||
CoglBool is_identity,
|
gboolean is_identity,
|
||||||
CoglMatrix *matrix,
|
CoglMatrix *matrix,
|
||||||
CoglMatrixMode mode)
|
CoglMatrixMode mode)
|
||||||
{
|
{
|
||||||
@ -863,13 +863,13 @@ _cogl_matrix_entry_flush_to_gl_builtins (CoglContext *ctx,
|
|||||||
CoglMatrixEntry *entry,
|
CoglMatrixEntry *entry,
|
||||||
CoglMatrixMode mode,
|
CoglMatrixMode mode,
|
||||||
CoglFramebuffer *framebuffer,
|
CoglFramebuffer *framebuffer,
|
||||||
CoglBool disable_flip)
|
gboolean disable_flip)
|
||||||
{
|
{
|
||||||
g_assert (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED));
|
g_assert (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED));
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GL
|
#ifdef HAVE_COGL_GL
|
||||||
{
|
{
|
||||||
CoglBool needs_flip;
|
gboolean needs_flip;
|
||||||
CoglMatrixEntryCache *cache;
|
CoglMatrixEntryCache *cache;
|
||||||
|
|
||||||
if (mode == COGL_MATRIX_PROJECTION)
|
if (mode == COGL_MATRIX_PROJECTION)
|
||||||
@ -901,7 +901,7 @@ _cogl_matrix_entry_flush_to_gl_builtins (CoglContext *ctx,
|
|||||||
if (!cache ||
|
if (!cache ||
|
||||||
_cogl_matrix_entry_cache_maybe_update (cache, entry, needs_flip))
|
_cogl_matrix_entry_cache_maybe_update (cache, entry, needs_flip))
|
||||||
{
|
{
|
||||||
CoglBool is_identity;
|
gboolean is_identity;
|
||||||
CoglMatrix matrix;
|
CoglMatrix matrix;
|
||||||
|
|
||||||
if (entry->op == COGL_MATRIX_OP_LOAD_IDENTITY)
|
if (entry->op == COGL_MATRIX_OP_LOAD_IDENTITY)
|
||||||
@ -940,7 +940,7 @@ _cogl_matrix_entry_flush_to_gl_builtins (CoglContext *ctx,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
|
cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
|
||||||
CoglMatrixEntry *entry1)
|
CoglMatrixEntry *entry1)
|
||||||
{
|
{
|
||||||
@ -1162,13 +1162,13 @@ _cogl_matrix_entry_cache_init (CoglMatrixEntryCache *cache)
|
|||||||
|
|
||||||
/* NB: This function can report false negatives since it never does a
|
/* NB: This function can report false negatives since it never does a
|
||||||
* deep comparison of the stack matrices. */
|
* deep comparison of the stack matrices. */
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_matrix_entry_cache_maybe_update (CoglMatrixEntryCache *cache,
|
_cogl_matrix_entry_cache_maybe_update (CoglMatrixEntryCache *cache,
|
||||||
CoglMatrixEntry *entry,
|
CoglMatrixEntry *entry,
|
||||||
CoglBool flip)
|
gboolean flip)
|
||||||
{
|
{
|
||||||
CoglBool is_identity;
|
gboolean is_identity;
|
||||||
CoglBool updated = FALSE;
|
gboolean updated = FALSE;
|
||||||
|
|
||||||
if (cache->flipped != flip)
|
if (cache->flipped != flip)
|
||||||
{
|
{
|
||||||
|
@ -429,7 +429,7 @@ cogl_matrix_stack_orthographic (CoglMatrixStack *stack,
|
|||||||
* for degenerate transformations that can't be inverted (in this case the
|
* for degenerate transformations that can't be inverted (in this case the
|
||||||
* @inverse matrix will simply be initialized with the identity matrix)
|
* @inverse matrix will simply be initialized with the identity matrix)
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_stack_get_inverse (CoglMatrixStack *stack,
|
cogl_matrix_stack_get_inverse (CoglMatrixStack *stack,
|
||||||
CoglMatrix *inverse);
|
CoglMatrix *inverse);
|
||||||
|
|
||||||
@ -538,7 +538,7 @@ cogl_matrix_stack_set (CoglMatrixStack *stack,
|
|||||||
* Return value: %TRUE if @object is a #CoglMatrixStack, otherwise
|
* Return value: %TRUE if @object is a #CoglMatrixStack, otherwise
|
||||||
* %FALSE.
|
* %FALSE.
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_matrix_stack (void *object);
|
cogl_is_matrix_stack (void *object);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -560,7 +560,7 @@ cogl_is_matrix_stack (void *object);
|
|||||||
* @entry0 and the transform of @entry1 is a translation,
|
* @entry0 and the transform of @entry1 is a translation,
|
||||||
* otherwise %FALSE.
|
* otherwise %FALSE.
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_entry_calculate_translation (CoglMatrixEntry *entry0,
|
cogl_matrix_entry_calculate_translation (CoglMatrixEntry *entry0,
|
||||||
CoglMatrixEntry *entry1,
|
CoglMatrixEntry *entry1,
|
||||||
float *x,
|
float *x,
|
||||||
@ -581,7 +581,7 @@ cogl_matrix_entry_calculate_translation (CoglMatrixEntry *entry0,
|
|||||||
* Return value: %TRUE if @entry is definitely an identity transform,
|
* Return value: %TRUE if @entry is definitely an identity transform,
|
||||||
* otherwise %FALSE.
|
* otherwise %FALSE.
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_entry_is_identity (CoglMatrixEntry *entry);
|
cogl_matrix_entry_is_identity (CoglMatrixEntry *entry);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -599,7 +599,7 @@ cogl_matrix_entry_is_identity (CoglMatrixEntry *entry);
|
|||||||
* Return value: %TRUE if @entry0 represents the same transform as
|
* Return value: %TRUE if @entry0 represents the same transform as
|
||||||
* @entry1, otherwise %FALSE.
|
* @entry1, otherwise %FALSE.
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
|
cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
|
||||||
CoglMatrixEntry *entry1);
|
CoglMatrixEntry *entry1);
|
||||||
|
|
||||||
|
@ -442,7 +442,7 @@ cogl_debug_matrix_print (const CoglMatrix *matrix)
|
|||||||
* with partial pivoting followed by back/substitution with the loops manually
|
* with partial pivoting followed by back/substitution with the loops manually
|
||||||
* unrolled.
|
* unrolled.
|
||||||
*/
|
*/
|
||||||
static CoglBool
|
static gboolean
|
||||||
invert_matrix_general (CoglMatrix *matrix)
|
invert_matrix_general (CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
const float *m = (float *)matrix;
|
const float *m = (float *)matrix;
|
||||||
@ -581,7 +581,7 @@ invert_matrix_general (CoglMatrix *matrix)
|
|||||||
* element. Finally deals with the translation part by transforming the
|
* element. Finally deals with the translation part by transforming the
|
||||||
* original translation vector using by the calculated submatrix inverse.
|
* original translation vector using by the calculated submatrix inverse.
|
||||||
*/
|
*/
|
||||||
static CoglBool
|
static gboolean
|
||||||
invert_matrix_3d_general (CoglMatrix *matrix)
|
invert_matrix_3d_general (CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
const float *in = (float *)matrix;
|
const float *in = (float *)matrix;
|
||||||
@ -663,7 +663,7 @@ invert_matrix_3d_general (CoglMatrix *matrix)
|
|||||||
* the inverse matrix analyzing and inverting each of the scaling, rotation and
|
* the inverse matrix analyzing and inverting each of the scaling, rotation and
|
||||||
* translation parts.
|
* translation parts.
|
||||||
*/
|
*/
|
||||||
static CoglBool
|
static gboolean
|
||||||
invert_matrix_3d (CoglMatrix *matrix)
|
invert_matrix_3d (CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
const float *in = (float *)matrix;
|
const float *in = (float *)matrix;
|
||||||
@ -748,7 +748,7 @@ invert_matrix_3d (CoglMatrix *matrix)
|
|||||||
*
|
*
|
||||||
* Simply copies identity into CoglMatrix::inv.
|
* Simply copies identity into CoglMatrix::inv.
|
||||||
*/
|
*/
|
||||||
static CoglBool
|
static gboolean
|
||||||
invert_matrix_identity (CoglMatrix *matrix)
|
invert_matrix_identity (CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
memcpy (matrix->inv, identity, 16 * sizeof (float));
|
memcpy (matrix->inv, identity, 16 * sizeof (float));
|
||||||
@ -765,7 +765,7 @@ invert_matrix_identity (CoglMatrix *matrix)
|
|||||||
*
|
*
|
||||||
* Calculates the
|
* Calculates the
|
||||||
*/
|
*/
|
||||||
static CoglBool
|
static gboolean
|
||||||
invert_matrix_3d_no_rotation (CoglMatrix *matrix)
|
invert_matrix_3d_no_rotation (CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
const float *in = (float *)matrix;
|
const float *in = (float *)matrix;
|
||||||
@ -800,7 +800,7 @@ invert_matrix_3d_no_rotation (CoglMatrix *matrix)
|
|||||||
* Calculates the inverse matrix by applying the inverse scaling and
|
* Calculates the inverse matrix by applying the inverse scaling and
|
||||||
* translation to the identity matrix.
|
* translation to the identity matrix.
|
||||||
*/
|
*/
|
||||||
static CoglBool
|
static gboolean
|
||||||
invert_matrix_2d_no_rotation (CoglMatrix *matrix)
|
invert_matrix_2d_no_rotation (CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
const float *in = (float *)matrix;
|
const float *in = (float *)matrix;
|
||||||
@ -824,7 +824,7 @@ invert_matrix_2d_no_rotation (CoglMatrix *matrix)
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* broken */
|
/* broken */
|
||||||
static CoglBool
|
static gboolean
|
||||||
invert_matrix_perspective (CoglMatrix *matrix)
|
invert_matrix_perspective (CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
const float *in = matrix;
|
const float *in = matrix;
|
||||||
@ -854,7 +854,7 @@ invert_matrix_perspective (CoglMatrix *matrix)
|
|||||||
/*
|
/*
|
||||||
* Matrix inversion function pointer type.
|
* Matrix inversion function pointer type.
|
||||||
*/
|
*/
|
||||||
typedef CoglBool (*inv_mat_func)(CoglMatrix *matrix);
|
typedef gboolean (*inv_mat_func)(CoglMatrix *matrix);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Table of the matrix inversion functions according to the matrix type.
|
* Table of the matrix inversion functions according to the matrix type.
|
||||||
@ -1112,7 +1112,7 @@ _cogl_matrix_update_type_and_flags (CoglMatrix *matrix)
|
|||||||
* given matrix type. In case of failure, updates the MAT_FLAG_SINGULAR flag,
|
* given matrix type. In case of failure, updates the MAT_FLAG_SINGULAR flag,
|
||||||
* and copies the identity matrix into CoglMatrix::inv.
|
* and copies the identity matrix into CoglMatrix::inv.
|
||||||
*/
|
*/
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_matrix_update_inverse (CoglMatrix *matrix)
|
_cogl_matrix_update_inverse (CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
if (matrix->flags & MAT_DIRTY_FLAGS ||
|
if (matrix->flags & MAT_DIRTY_FLAGS ||
|
||||||
@ -1137,7 +1137,7 @@ _cogl_matrix_update_inverse (CoglMatrix *matrix)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_get_inverse (const CoglMatrix *matrix, CoglMatrix *inverse)
|
cogl_matrix_get_inverse (const CoglMatrix *matrix, CoglMatrix *inverse)
|
||||||
{
|
{
|
||||||
if (_cogl_matrix_update_inverse ((CoglMatrix *)matrix))
|
if (_cogl_matrix_update_inverse ((CoglMatrix *)matrix))
|
||||||
@ -1169,7 +1169,7 @@ _cogl_matrix_rotate (CoglMatrix *matrix,
|
|||||||
{
|
{
|
||||||
float xx, yy, zz, xy, yz, zx, xs, ys, zs, one_c, s, c;
|
float xx, yy, zz, xy, yz, zx, xs, ys, zs, one_c, s, c;
|
||||||
float m[16];
|
float m[16];
|
||||||
CoglBool optimized;
|
gboolean optimized;
|
||||||
|
|
||||||
s = sinf (angle * DEG2RAD);
|
s = sinf (angle * DEG2RAD);
|
||||||
c = cosf (angle * DEG2RAD);
|
c = cosf (angle * DEG2RAD);
|
||||||
@ -1667,7 +1667,7 @@ cogl_matrix_init_translation (CoglMatrix *matrix,
|
|||||||
/*
|
/*
|
||||||
* Test if the given matrix preserves vector lengths.
|
* Test if the given matrix preserves vector lengths.
|
||||||
*/
|
*/
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_matrix_is_length_preserving (const CoglMatrix *m)
|
_cogl_matrix_is_length_preserving (const CoglMatrix *m)
|
||||||
{
|
{
|
||||||
return TEST_MAT_FLAGS (m, MAT_FLAGS_LENGTH_PRESERVING);
|
return TEST_MAT_FLAGS (m, MAT_FLAGS_LENGTH_PRESERVING);
|
||||||
@ -1677,7 +1677,7 @@ _cogl_matrix_is_length_preserving (const CoglMatrix *m)
|
|||||||
* Test if the given matrix does any rotation.
|
* Test if the given matrix does any rotation.
|
||||||
* (or perhaps if the upper-left 3x3 is non-identity)
|
* (or perhaps if the upper-left 3x3 is non-identity)
|
||||||
*/
|
*/
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_matrix_has_rotation (const CoglMatrix *matrix)
|
_cogl_matrix_has_rotation (const CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
if (matrix->flags & (MAT_FLAG_GENERAL |
|
if (matrix->flags & (MAT_FLAG_GENERAL |
|
||||||
@ -1689,13 +1689,13 @@ _cogl_matrix_has_rotation (const CoglMatrix *matrix)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_matrix_is_general_scale (const CoglMatrix *matrix)
|
_cogl_matrix_is_general_scale (const CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
return (matrix->flags & MAT_FLAG_GENERAL_SCALE) ? TRUE : FALSE;
|
return (matrix->flags & MAT_FLAG_GENERAL_SCALE) ? TRUE : FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
_cogl_matrix_is_dirty (const CoglMatrix *matrix)
|
_cogl_matrix_is_dirty (const CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
return (matrix->flags & MAT_DIRTY_ALL) ? TRUE : FALSE;
|
return (matrix->flags & MAT_DIRTY_ALL) ? TRUE : FALSE;
|
||||||
@ -1936,7 +1936,7 @@ cogl_matrix_view_2d_in_perspective (CoglMatrix *matrix,
|
|||||||
height_2d);
|
height_2d);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_equal (const void *v1, const void *v2)
|
cogl_matrix_equal (const void *v1, const void *v2)
|
||||||
{
|
{
|
||||||
const CoglMatrix *a = v1;
|
const CoglMatrix *a = v1;
|
||||||
@ -2215,7 +2215,7 @@ cogl_matrix_project_points (const CoglMatrix *matrix,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_is_identity (const CoglMatrix *matrix)
|
cogl_matrix_is_identity (const CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
if (!(matrix->flags & MAT_DIRTY_TYPE) &&
|
if (!(matrix->flags & MAT_DIRTY_TYPE) &&
|
||||||
|
@ -549,7 +549,7 @@ cogl_matrix_init_from_euler (CoglMatrix *matrix,
|
|||||||
*
|
*
|
||||||
* Since: 1.4
|
* Since: 1.4
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_equal (const void *v1, const void *v2);
|
cogl_matrix_equal (const void *v1, const void *v2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -599,7 +599,7 @@ cogl_matrix_free (CoglMatrix *matrix);
|
|||||||
*
|
*
|
||||||
* Since: 1.2
|
* Since: 1.2
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_get_inverse (const CoglMatrix *matrix,
|
cogl_matrix_get_inverse (const CoglMatrix *matrix,
|
||||||
CoglMatrix *inverse);
|
CoglMatrix *inverse);
|
||||||
|
|
||||||
@ -747,7 +747,7 @@ cogl_matrix_project_points (const CoglMatrix *matrix,
|
|||||||
* Returns: %TRUE if @matrix is an identity matrix else %FALSE
|
* Returns: %TRUE if @matrix is an identity matrix else %FALSE
|
||||||
* Since: 1.8
|
* Since: 1.8
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_matrix_is_identity (const CoglMatrix *matrix);
|
cogl_matrix_is_identity (const CoglMatrix *matrix);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -227,8 +227,8 @@ typedef struct _ClampData
|
|||||||
{
|
{
|
||||||
float start;
|
float start;
|
||||||
float end;
|
float end;
|
||||||
CoglBool s_flipped;
|
gboolean s_flipped;
|
||||||
CoglBool t_flipped;
|
gboolean t_flipped;
|
||||||
CoglMetaTextureCallback callback;
|
CoglMetaTextureCallback callback;
|
||||||
void *user_data;
|
void *user_data;
|
||||||
} ClampData;
|
} ClampData;
|
||||||
@ -277,7 +277,7 @@ clamp_t_cb (CoglTexture *sub_texture,
|
|||||||
clamp_data->user_data);
|
clamp_data->user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
foreach_clamped_region (CoglMetaTexture *meta_texture,
|
foreach_clamped_region (CoglMetaTexture *meta_texture,
|
||||||
float *tx_1,
|
float *tx_1,
|
||||||
float *ty_1,
|
float *ty_1,
|
||||||
@ -517,7 +517,7 @@ cogl_meta_texture_foreach_in_region (CoglMetaTexture *meta_texture,
|
|||||||
if (wrap_s == COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE ||
|
if (wrap_s == COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE ||
|
||||||
wrap_t == COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE)
|
wrap_t == COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE)
|
||||||
{
|
{
|
||||||
CoglBool finished = foreach_clamped_region (meta_texture,
|
gboolean finished = foreach_clamped_region (meta_texture,
|
||||||
&tx_1, &ty_1, &tx_2, &ty_2,
|
&tx_1, &ty_1, &tx_2, &ty_2,
|
||||||
wrap_s, wrap_t,
|
wrap_s, wrap_t,
|
||||||
callback,
|
callback,
|
||||||
|
@ -60,7 +60,7 @@ struct _CoglNode
|
|||||||
|
|
||||||
/* TRUE if the node took a strong reference on its parent. Weak
|
/* TRUE if the node took a strong reference on its parent. Weak
|
||||||
* pipelines for instance don't take a reference on their parent. */
|
* pipelines for instance don't take a reference on their parent. */
|
||||||
CoglBool has_parent_reference;
|
gboolean has_parent_reference;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define COGL_NODE(X) ((CoglNode *)(X))
|
#define COGL_NODE(X) ((CoglNode *)(X))
|
||||||
@ -74,12 +74,12 @@ void
|
|||||||
_cogl_pipeline_node_set_parent_real (CoglNode *node,
|
_cogl_pipeline_node_set_parent_real (CoglNode *node,
|
||||||
CoglNode *parent,
|
CoglNode *parent,
|
||||||
CoglNodeUnparentVFunc unparent,
|
CoglNodeUnparentVFunc unparent,
|
||||||
CoglBool take_strong_reference);
|
gboolean take_strong_reference);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_pipeline_node_unparent_real (CoglNode *node);
|
_cogl_pipeline_node_unparent_real (CoglNode *node);
|
||||||
|
|
||||||
typedef CoglBool (*CoglNodeChildCallback) (CoglNode *child, void *user_data);
|
typedef gboolean (*CoglNodeChildCallback) (CoglNode *child, void *user_data);
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_pipeline_node_foreach_child (CoglNode *node,
|
_cogl_pipeline_node_foreach_child (CoglNode *node,
|
||||||
|
@ -47,7 +47,7 @@ void
|
|||||||
_cogl_pipeline_node_set_parent_real (CoglNode *node,
|
_cogl_pipeline_node_set_parent_real (CoglNode *node,
|
||||||
CoglNode *parent,
|
CoglNode *parent,
|
||||||
CoglNodeUnparentVFunc unparent,
|
CoglNodeUnparentVFunc unparent,
|
||||||
CoglBool take_strong_reference)
|
gboolean take_strong_reference)
|
||||||
{
|
{
|
||||||
/* NB: the old parent may indirectly be keeping the new parent alive
|
/* NB: the old parent may indirectly be keeping the new parent alive
|
||||||
* so we have to ref the new parent before unrefing the old.
|
* so we have to ref the new parent before unrefing the old.
|
||||||
|
@ -202,7 +202,7 @@ COGL_OBJECT_COMMON_DEFINE_WITH_CODE(TypeName, \
|
|||||||
do { code; } while (0); \
|
do { code; } while (0); \
|
||||||
_COGL_GTYPE_INIT_CLASS (type_name)) \
|
_COGL_GTYPE_INIT_CLASS (type_name)) \
|
||||||
\
|
\
|
||||||
CoglBool \
|
gboolean \
|
||||||
cogl_is_##type_name (void *object) \
|
cogl_is_##type_name (void *object) \
|
||||||
{ \
|
{ \
|
||||||
CoglObject *obj = object; \
|
CoglObject *obj = object; \
|
||||||
@ -217,7 +217,7 @@ cogl_is_##type_name (void *object) \
|
|||||||
\
|
\
|
||||||
COGL_OBJECT_COMMON_DEFINE_WITH_CODE(TypeName, type_name, code) \
|
COGL_OBJECT_COMMON_DEFINE_WITH_CODE(TypeName, type_name, code) \
|
||||||
\
|
\
|
||||||
CoglBool \
|
gboolean \
|
||||||
cogl_is_##type_name (void *object) \
|
cogl_is_##type_name (void *object) \
|
||||||
{ \
|
{ \
|
||||||
CoglObject *obj = object; \
|
CoglObject *obj = object; \
|
||||||
@ -232,7 +232,7 @@ cogl_is_##type_name (void *object) \
|
|||||||
\
|
\
|
||||||
COGL_OBJECT_COMMON_DEFINE_WITH_CODE(TypeName, type_name, code) \
|
COGL_OBJECT_COMMON_DEFINE_WITH_CODE(TypeName, type_name, code) \
|
||||||
\
|
\
|
||||||
CoglBool \
|
gboolean \
|
||||||
_cogl_is_##type_name (void *object) \
|
_cogl_is_##type_name (void *object) \
|
||||||
{ \
|
{ \
|
||||||
CoglObject *obj = object; \
|
CoglObject *obj = object; \
|
||||||
|
@ -132,7 +132,7 @@ cogl_offscreen_new_to_texture (CoglTexture *texture);
|
|||||||
* Returns: %TRUE if @object is a #CoglOffscreen framebuffer,
|
* Returns: %TRUE if @object is a #CoglOffscreen framebuffer,
|
||||||
* %FALSE otherwise
|
* %FALSE otherwise
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_offscreen (void *object);
|
cogl_is_offscreen (void *object);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,7 +67,7 @@ struct _CoglOnscreen
|
|||||||
|
|
||||||
CoglList frame_closures;
|
CoglList frame_closures;
|
||||||
|
|
||||||
CoglBool resizable;
|
gboolean resizable;
|
||||||
CoglList resize_closures;
|
CoglList resize_closures;
|
||||||
|
|
||||||
CoglList dirty_closures;
|
CoglList dirty_closures;
|
||||||
|
@ -88,7 +88,7 @@ cogl_onscreen_template_set_samples_per_pixel (
|
|||||||
void
|
void
|
||||||
cogl_onscreen_template_set_stereo_enabled (
|
cogl_onscreen_template_set_stereo_enabled (
|
||||||
CoglOnscreenTemplate *onscreen_template,
|
CoglOnscreenTemplate *onscreen_template,
|
||||||
CoglBool enabled)
|
gboolean enabled)
|
||||||
{
|
{
|
||||||
onscreen_template->config.stereo_enabled = enabled;
|
onscreen_template->config.stereo_enabled = enabled;
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ cogl_onscreen_template_set_samples_per_pixel (
|
|||||||
void
|
void
|
||||||
cogl_onscreen_template_set_stereo_enabled (
|
cogl_onscreen_template_set_stereo_enabled (
|
||||||
CoglOnscreenTemplate *onscreen_template,
|
CoglOnscreenTemplate *onscreen_template,
|
||||||
CoglBool enabled);
|
gboolean enabled);
|
||||||
/**
|
/**
|
||||||
* cogl_is_onscreen_template:
|
* cogl_is_onscreen_template:
|
||||||
* @object: A #CoglObject pointer
|
* @object: A #CoglObject pointer
|
||||||
@ -114,7 +114,7 @@ cogl_onscreen_template_set_stereo_enabled (
|
|||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_onscreen_template (void *object);
|
cogl_is_onscreen_template (void *object);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -631,7 +631,7 @@ _cogl_framebuffer_winsys_update_size (CoglFramebuffer *framebuffer,
|
|||||||
|
|
||||||
void
|
void
|
||||||
cogl_onscreen_set_resizable (CoglOnscreen *onscreen,
|
cogl_onscreen_set_resizable (CoglOnscreen *onscreen,
|
||||||
CoglBool resizable)
|
gboolean resizable)
|
||||||
{
|
{
|
||||||
CoglFramebuffer *framebuffer;
|
CoglFramebuffer *framebuffer;
|
||||||
const CoglWinsysVtable *winsys;
|
const CoglWinsysVtable *winsys;
|
||||||
@ -651,7 +651,7 @@ cogl_onscreen_set_resizable (CoglOnscreen *onscreen,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_onscreen_get_resizable (CoglOnscreen *onscreen)
|
cogl_onscreen_get_resizable (CoglOnscreen *onscreen)
|
||||||
{
|
{
|
||||||
return onscreen->resizable;
|
return onscreen->resizable;
|
||||||
|
@ -601,7 +601,7 @@ cogl_onscreen_remove_swap_buffers_callback (CoglOnscreen *onscreen,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cogl_onscreen_set_resizable (CoglOnscreen *onscreen,
|
cogl_onscreen_set_resizable (CoglOnscreen *onscreen,
|
||||||
CoglBool resizable);
|
gboolean resizable);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_onscreen_get_resizable:
|
* cogl_onscreen_get_resizable:
|
||||||
@ -626,7 +626,7 @@ cogl_onscreen_set_resizable (CoglOnscreen *onscreen,
|
|||||||
* resizable or not.
|
* resizable or not.
|
||||||
* Since: 2.0
|
* Since: 2.0
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_onscreen_get_resizable (CoglOnscreen *onscreen);
|
cogl_onscreen_get_resizable (CoglOnscreen *onscreen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -860,7 +860,7 @@ cogl_onscreen_remove_dirty_callback (CoglOnscreen *onscreen,
|
|||||||
* Since: 1.10
|
* Since: 1.10
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_onscreen (void *object);
|
cogl_is_onscreen (void *object);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,7 +51,7 @@ struct _CoglOutput
|
|||||||
};
|
};
|
||||||
|
|
||||||
CoglOutput *_cogl_output_new (const char *name);
|
CoglOutput *_cogl_output_new (const char *name);
|
||||||
CoglBool _cogl_output_values_equal (CoglOutput *output,
|
gboolean _cogl_output_values_equal (CoglOutput *output,
|
||||||
CoglOutput *other);
|
CoglOutput *other);
|
||||||
|
|
||||||
#endif /* __COGL_OUTPUT_PRIVATE_H */
|
#endif /* __COGL_OUTPUT_PRIVATE_H */
|
||||||
|
@ -126,7 +126,7 @@ typedef enum {
|
|||||||
* Since: 1.14
|
* Since: 1.14
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_is_output (void *object);
|
cogl_is_output (void *object);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,7 +48,7 @@ typedef struct
|
|||||||
int indent;
|
int indent;
|
||||||
} PrintDebugState;
|
} PrintDebugState;
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
dump_layer_cb (CoglNode *node, void *user_data)
|
dump_layer_cb (CoglNode *node, void *user_data)
|
||||||
{
|
{
|
||||||
CoglPipelineLayer *layer = COGL_PIPELINE_LAYER (node);
|
CoglPipelineLayer *layer = COGL_PIPELINE_LAYER (node);
|
||||||
@ -56,7 +56,7 @@ dump_layer_cb (CoglNode *node, void *user_data)
|
|||||||
int layer_id = *state->node_id_ptr;
|
int layer_id = *state->node_id_ptr;
|
||||||
PrintDebugState state_out;
|
PrintDebugState state_out;
|
||||||
GString *changes_label;
|
GString *changes_label;
|
||||||
CoglBool changes = FALSE;
|
gboolean changes = FALSE;
|
||||||
|
|
||||||
if (state->parent_id >= 0)
|
if (state->parent_id >= 0)
|
||||||
g_string_append_printf (state->graph, "%*slayer%p -> layer%p;\n",
|
g_string_append_printf (state->graph, "%*slayer%p -> layer%p;\n",
|
||||||
@ -121,7 +121,7 @@ dump_layer_cb (CoglNode *node, void *user_data)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
dump_layer_ref_cb (CoglPipelineLayer *layer, void *data)
|
dump_layer_ref_cb (CoglPipelineLayer *layer, void *data)
|
||||||
{
|
{
|
||||||
PrintDebugState *state = data;
|
PrintDebugState *state = data;
|
||||||
@ -136,7 +136,7 @@ dump_layer_ref_cb (CoglPipelineLayer *layer, void *data)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
dump_pipeline_cb (CoglNode *node, void *user_data)
|
dump_pipeline_cb (CoglNode *node, void *user_data)
|
||||||
{
|
{
|
||||||
CoglPipeline *pipeline = COGL_PIPELINE (node);
|
CoglPipeline *pipeline = COGL_PIPELINE (node);
|
||||||
@ -144,8 +144,8 @@ dump_pipeline_cb (CoglNode *node, void *user_data)
|
|||||||
int pipeline_id = *state->node_id_ptr;
|
int pipeline_id = *state->node_id_ptr;
|
||||||
PrintDebugState state_out;
|
PrintDebugState state_out;
|
||||||
GString *changes_label;
|
GString *changes_label;
|
||||||
CoglBool changes = FALSE;
|
gboolean changes = FALSE;
|
||||||
CoglBool layers = FALSE;
|
gboolean layers = FALSE;
|
||||||
|
|
||||||
if (state->parent_id >= 0)
|
if (state->parent_id >= 0)
|
||||||
g_string_append_printf (state->graph, "%*spipeline%d -> pipeline%d;\n",
|
g_string_append_printf (state->graph, "%*spipeline%d -> pipeline%d;\n",
|
||||||
|
@ -77,7 +77,7 @@ entry_hash (const void *data)
|
|||||||
return entry->hash_value;
|
return entry->hash_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
entry_equal (const void *a,
|
entry_equal (const void *a,
|
||||||
const void *b)
|
const void *b)
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@ typedef struct
|
|||||||
CoglPipelineSnippetList vertex_snippets;
|
CoglPipelineSnippetList vertex_snippets;
|
||||||
CoglPipelineSnippetList fragment_snippets;
|
CoglPipelineSnippetList fragment_snippets;
|
||||||
|
|
||||||
CoglBool point_sprite_coords;
|
gboolean point_sprite_coords;
|
||||||
} CoglPipelineLayerBigState;
|
} CoglPipelineLayerBigState;
|
||||||
|
|
||||||
struct _CoglPipelineLayer
|
struct _CoglPipelineLayer
|
||||||
@ -260,7 +260,7 @@ struct _CoglPipelineLayer
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef CoglBool
|
typedef gboolean
|
||||||
(*CoglPipelineLayerStateComparitor) (CoglPipelineLayer *authority0,
|
(*CoglPipelineLayerStateComparitor) (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1);
|
CoglPipelineLayer *authority1);
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ _cogl_pipeline_layer_resolve_authorities (CoglPipelineLayer *layer,
|
|||||||
unsigned long differences,
|
unsigned long differences,
|
||||||
CoglPipelineLayer **authorities);
|
CoglPipelineLayer **authorities);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_equal (CoglPipelineLayer *layer0,
|
_cogl_pipeline_layer_equal (CoglPipelineLayer *layer0,
|
||||||
CoglPipelineLayer *layer1,
|
CoglPipelineLayer *layer1,
|
||||||
unsigned long differences_mask,
|
unsigned long differences_mask,
|
||||||
@ -298,10 +298,10 @@ _cogl_pipeline_layer_pre_change_notify (CoglPipeline *required_owner,
|
|||||||
void
|
void
|
||||||
_cogl_pipeline_layer_prune_redundant_ancestry (CoglPipelineLayer *layer);
|
_cogl_pipeline_layer_prune_redundant_ancestry (CoglPipelineLayer *layer);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_has_alpha (CoglPipelineLayer *layer);
|
_cogl_pipeline_layer_has_alpha (CoglPipelineLayer *layer);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_has_user_matrix (CoglPipeline *pipeline,
|
_cogl_pipeline_layer_has_user_matrix (CoglPipeline *pipeline,
|
||||||
int layer_index);
|
int layer_index);
|
||||||
|
|
||||||
@ -380,7 +380,7 @@ _cogl_pipeline_layer_get_authority (CoglPipelineLayer *layer,
|
|||||||
int
|
int
|
||||||
_cogl_pipeline_layer_get_unit_index (CoglPipelineLayer *layer);
|
_cogl_pipeline_layer_get_unit_index (CoglPipelineLayer *layer);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_needs_combine_separate
|
_cogl_pipeline_layer_needs_combine_separate
|
||||||
(CoglPipelineLayer *combine_authority);
|
(CoglPipelineLayer *combine_authority);
|
||||||
|
|
||||||
|
@ -50,41 +50,41 @@ CoglPipelineFilter
|
|||||||
_cogl_pipeline_get_layer_mag_filter (CoglPipeline *pipeline,
|
_cogl_pipeline_get_layer_mag_filter (CoglPipeline *pipeline,
|
||||||
int layer_index);
|
int layer_index);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_texture_type_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_texture_type_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1,
|
CoglPipelineLayer *authority1,
|
||||||
CoglPipelineEvalFlags flags);
|
CoglPipelineEvalFlags flags);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_texture_data_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_texture_data_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1,
|
CoglPipelineLayer *authority1,
|
||||||
CoglPipelineEvalFlags flags);
|
CoglPipelineEvalFlags flags);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_combine_state_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_combine_state_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1);
|
CoglPipelineLayer *authority1);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_combine_constant_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_combine_constant_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1);
|
CoglPipelineLayer *authority1);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_sampler_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_sampler_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1);
|
CoglPipelineLayer *authority1);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_user_matrix_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_user_matrix_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1);
|
CoglPipelineLayer *authority1);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_point_sprite_coords_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_point_sprite_coords_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1);
|
CoglPipelineLayer *authority1);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_vertex_snippets_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_vertex_snippets_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1);
|
CoglPipelineLayer *authority1);
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_fragment_snippets_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_fragment_snippets_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1);
|
CoglPipelineLayer *authority1);
|
||||||
|
|
||||||
|
@ -735,10 +735,10 @@ _cogl_pipeline_layer_get_wrap_modes (CoglPipelineLayer *layer,
|
|||||||
*wrap_mode_p = authority->sampler_cache_entry->wrap_mode_p;
|
*wrap_mode_p = authority->sampler_cache_entry->wrap_mode_p;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_pipeline_set_layer_point_sprite_coords_enabled (CoglPipeline *pipeline,
|
cogl_pipeline_set_layer_point_sprite_coords_enabled (CoglPipeline *pipeline,
|
||||||
int layer_index,
|
int layer_index,
|
||||||
CoglBool enable,
|
gboolean enable,
|
||||||
CoglError **error)
|
CoglError **error)
|
||||||
{
|
{
|
||||||
CoglPipelineLayerState change =
|
CoglPipelineLayerState change =
|
||||||
@ -765,7 +765,7 @@ cogl_pipeline_set_layer_point_sprite_coords_enabled (CoglPipeline *pipeline,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static CoglBool warning_seen = FALSE;
|
static gboolean warning_seen = FALSE;
|
||||||
if (!warning_seen)
|
if (!warning_seen)
|
||||||
g_warning ("Point sprite texture coordinates are enabled "
|
g_warning ("Point sprite texture coordinates are enabled "
|
||||||
"for a layer but the GL driver does not support it.");
|
"for a layer but the GL driver does not support it.");
|
||||||
@ -834,7 +834,7 @@ cogl_pipeline_set_layer_point_sprite_coords_enabled (CoglPipeline *pipeline,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_pipeline_get_layer_point_sprite_coords_enabled (CoglPipeline *pipeline,
|
cogl_pipeline_get_layer_point_sprite_coords_enabled (CoglPipeline *pipeline,
|
||||||
int layer_index)
|
int layer_index)
|
||||||
{
|
{
|
||||||
@ -950,7 +950,7 @@ cogl_pipeline_add_layer_snippet (CoglPipeline *pipeline,
|
|||||||
snippet);
|
snippet);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_texture_type_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_texture_type_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1,
|
CoglPipelineLayer *authority1,
|
||||||
CoglPipelineEvalFlags flags)
|
CoglPipelineEvalFlags flags)
|
||||||
@ -958,7 +958,7 @@ _cogl_pipeline_layer_texture_type_equal (CoglPipelineLayer *authority0,
|
|||||||
return authority0->texture_type == authority1->texture_type;
|
return authority0->texture_type == authority1->texture_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_texture_data_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_texture_data_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1,
|
CoglPipelineLayer *authority1,
|
||||||
CoglPipelineEvalFlags flags)
|
CoglPipelineEvalFlags flags)
|
||||||
@ -984,7 +984,7 @@ _cogl_pipeline_layer_texture_data_equal (CoglPipelineLayer *authority0,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_combine_state_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_combine_state_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1)
|
CoglPipelineLayer *authority1)
|
||||||
{
|
{
|
||||||
@ -1026,7 +1026,7 @@ _cogl_pipeline_layer_combine_state_equal (CoglPipelineLayer *authority0,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_combine_constant_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_combine_constant_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1)
|
CoglPipelineLayer *authority1)
|
||||||
{
|
{
|
||||||
@ -1035,7 +1035,7 @@ _cogl_pipeline_layer_combine_constant_equal (CoglPipelineLayer *authority0,
|
|||||||
sizeof (float) * 4) == 0 ? TRUE : FALSE;
|
sizeof (float) * 4) == 0 ? TRUE : FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_sampler_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_sampler_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1)
|
CoglPipelineLayer *authority1)
|
||||||
{
|
{
|
||||||
@ -1046,7 +1046,7 @@ _cogl_pipeline_layer_sampler_equal (CoglPipelineLayer *authority0,
|
|||||||
authority1->sampler_cache_entry->sampler_object);
|
authority1->sampler_cache_entry->sampler_object);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_user_matrix_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_user_matrix_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1)
|
CoglPipelineLayer *authority1)
|
||||||
{
|
{
|
||||||
@ -1059,7 +1059,7 @@ _cogl_pipeline_layer_user_matrix_equal (CoglPipelineLayer *authority0,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_point_sprite_coords_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_point_sprite_coords_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1)
|
CoglPipelineLayer *authority1)
|
||||||
{
|
{
|
||||||
@ -1069,7 +1069,7 @@ _cogl_pipeline_layer_point_sprite_coords_equal (CoglPipelineLayer *authority0,
|
|||||||
return big_state0->point_sprite_coords == big_state1->point_sprite_coords;
|
return big_state0->point_sprite_coords == big_state1->point_sprite_coords;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_vertex_snippets_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_vertex_snippets_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1)
|
CoglPipelineLayer *authority1)
|
||||||
{
|
{
|
||||||
@ -1079,7 +1079,7 @@ _cogl_pipeline_layer_vertex_snippets_equal (CoglPipelineLayer *authority0,
|
|||||||
vertex_snippets);
|
vertex_snippets);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_fragment_snippets_equal (CoglPipelineLayer *authority0,
|
_cogl_pipeline_layer_fragment_snippets_equal (CoglPipelineLayer *authority0,
|
||||||
CoglPipelineLayer *authority1)
|
CoglPipelineLayer *authority1)
|
||||||
{
|
{
|
||||||
@ -1171,7 +1171,7 @@ setup_texture_combine_state (CoglBlendStringStatement *statement,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_pipeline_set_layer_combine (CoglPipeline *pipeline,
|
cogl_pipeline_set_layer_combine (CoglPipeline *pipeline,
|
||||||
int layer_index,
|
int layer_index,
|
||||||
const char *combine_description,
|
const char *combine_description,
|
||||||
@ -1481,7 +1481,7 @@ _cogl_pipeline_layer_get_texture (CoglPipelineLayer *layer)
|
|||||||
return _cogl_pipeline_layer_get_texture_real (layer);
|
return _cogl_pipeline_layer_get_texture_real (layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_has_user_matrix (CoglPipeline *pipeline,
|
_cogl_pipeline_layer_has_user_matrix (CoglPipeline *pipeline,
|
||||||
int layer_index)
|
int layer_index)
|
||||||
{
|
{
|
||||||
@ -1728,7 +1728,7 @@ _cogl_pipeline_layer_hash_combine_constant_state (CoglPipelineLayer *authority,
|
|||||||
CoglPipelineHashState *state)
|
CoglPipelineHashState *state)
|
||||||
{
|
{
|
||||||
CoglPipelineLayerBigState *b = authority->big_state;
|
CoglPipelineLayerBigState *b = authority->big_state;
|
||||||
CoglBool need_hash = FALSE;
|
gboolean need_hash = FALSE;
|
||||||
int n_args;
|
int n_args;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@ cogl_pipeline_remove_layer (CoglPipeline *pipeline,
|
|||||||
* Since: 2.0
|
* Since: 2.0
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_pipeline_set_layer_combine (CoglPipeline *pipeline,
|
cogl_pipeline_set_layer_combine (CoglPipeline *pipeline,
|
||||||
int layer_index,
|
int layer_index,
|
||||||
const char *blend_string,
|
const char *blend_string,
|
||||||
@ -443,10 +443,10 @@ cogl_pipeline_get_layer_mag_filter (CoglPipeline *pipeline,
|
|||||||
* Since: 2.0
|
* Since: 2.0
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_pipeline_set_layer_point_sprite_coords_enabled (CoglPipeline *pipeline,
|
cogl_pipeline_set_layer_point_sprite_coords_enabled (CoglPipeline *pipeline,
|
||||||
int layer_index,
|
int layer_index,
|
||||||
CoglBool enable,
|
gboolean enable,
|
||||||
CoglError **error);
|
CoglError **error);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -463,7 +463,7 @@ cogl_pipeline_set_layer_point_sprite_coords_enabled (CoglPipeline *pipeline,
|
|||||||
* Since: 2.0
|
* Since: 2.0
|
||||||
* Stability: unstable
|
* Stability: unstable
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
cogl_pipeline_get_layer_point_sprite_coords_enabled (CoglPipeline *pipeline,
|
cogl_pipeline_get_layer_point_sprite_coords_enabled (CoglPipeline *pipeline,
|
||||||
int layer_index);
|
int layer_index);
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ _cogl_pipeline_layer_get_unit_index (CoglPipelineLayer *layer)
|
|||||||
return authority->unit_index;
|
return authority->unit_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_has_alpha (CoglPipelineLayer *layer)
|
_cogl_pipeline_layer_has_alpha (CoglPipelineLayer *layer)
|
||||||
{
|
{
|
||||||
CoglPipelineLayer *combine_authority =
|
CoglPipelineLayer *combine_authority =
|
||||||
@ -592,7 +592,7 @@ _cogl_pipeline_layer_compare_differences (CoglPipelineLayer *layer0,
|
|||||||
return layers_difference;
|
return layers_difference;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CoglBool
|
static gboolean
|
||||||
layer_state_equal (CoglPipelineLayerStateIndex state_index,
|
layer_state_equal (CoglPipelineLayerStateIndex state_index,
|
||||||
CoglPipelineLayer **authorities0,
|
CoglPipelineLayer **authorities0,
|
||||||
CoglPipelineLayer **authorities1,
|
CoglPipelineLayer **authorities1,
|
||||||
@ -636,7 +636,7 @@ _cogl_pipeline_layer_resolve_authorities (CoglPipelineLayer *layer,
|
|||||||
g_assert (remaining == 0);
|
g_assert (remaining == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_equal (CoglPipelineLayer *layer0,
|
_cogl_pipeline_layer_equal (CoglPipelineLayer *layer0,
|
||||||
CoglPipelineLayer *layer1,
|
CoglPipelineLayer *layer1,
|
||||||
unsigned long differences_mask,
|
unsigned long differences_mask,
|
||||||
@ -867,7 +867,7 @@ _cogl_pipeline_layer_pre_paint (CoglPipelineLayer *layer)
|
|||||||
* separately or is the same function used for both channel masks and
|
* separately or is the same function used for both channel masks and
|
||||||
* with the same arguments...
|
* with the same arguments...
|
||||||
*/
|
*/
|
||||||
CoglBool
|
gboolean
|
||||||
_cogl_pipeline_layer_needs_combine_separate
|
_cogl_pipeline_layer_needs_combine_separate
|
||||||
(CoglPipelineLayer *combine_authority)
|
(CoglPipelineLayer *combine_authority)
|
||||||
{
|
{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user