diff options
author | Robert Bragg <robert@linux.intel.com> | 2011-10-08 14:13:03 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2011-11-01 12:03:01 +0000 |
commit | 1d8fd64e1cd74a44cb60689bd5ee2c8c8f518b20 (patch) | |
tree | 37dd4f394f2411a9e35f9a3f7e0b7533d1056a8b /cogl-pango | |
parent | c11036cd13140eede00d2b7d79547ffe7b9676e1 (diff) | |
download | cogl-1d8fd64e1cd74a44cb60689bd5ee2c8c8f518b20.tar.gz |
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>
Diffstat (limited to 'cogl-pango')
-rw-r--r-- | cogl-pango/cogl-pango-render.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/cogl-pango/cogl-pango-render.c b/cogl-pango/cogl-pango-render.c index ff974d69..3f87b527 100644 --- a/cogl-pango/cogl-pango-render.c +++ b/cogl-pango/cogl-pango-render.c @@ -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); |