meta-texture: This publicly exposes CoglMetaTexture

CoglMetaTexture is an interface for dealing with high level textures
that may be comprised of one or more low-level textures internally. The
interface allows the development of primitive drawing APIs that can draw
with high-level textures (such as atlas textures) even though the
GPU doesn't natively understand these texture types.

There is currently just one function that's part of this interface:
cogl_meta_texture_foreach_in_region() which allows an application to
resolve the internal, low-level textures of a high-level texture.
cogl_rectangle() uses this API for example so that it can easily emulate
the _REPEAT wrap mode for textures that the hardware can't natively
handle repeating of.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg
2011-10-08 14:13:03 +01:00
parent c11036cd13
commit 1d8fd64e1c
18 changed files with 1069 additions and 691 deletions

View File

@ -140,13 +140,15 @@ cogl_pango_renderer_draw_glyph (CoglPangoRenderer *priv,
the neighbouring glyphs are coming from the same atlas and bundle
them together into a single VBO */
_cogl_texture_foreach_sub_texture_in_region (cache_value->texture,
cache_value->tx1,
cache_value->ty1,
cache_value->tx2,
cache_value->ty2,
cogl_pango_renderer_slice_cb,
&data);
cogl_meta_texture_foreach_in_region (COGL_META_TEXTURE (cache_value->texture),
cache_value->tx1,
cache_value->ty1,
cache_value->tx2,
cache_value->ty2,
COGL_PIPELINE_WRAP_MODE_REPEAT,
COGL_PIPELINE_WRAP_MODE_REPEAT,
cogl_pango_renderer_slice_cb,
&data);
}
static void cogl_pango_renderer_finalize (GObject *object);