This file is indexed.

/usr/share/gtk-doc/html/cogl-2.0-experimental/cogl-2.0-experimental-High-Level-Meta-Textures.html is in libcogl-doc 1.22.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>High Level Meta Textures: Cogl 2.0 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Cogl 2.0 Reference Manual">
<link rel="up" href="cogl-meta-textures.html" title="Meta Textures">
<link rel="prev" href="cogl-meta-textures.html" title="Meta Textures">
<link rel="next" href="cogl-2.0-experimental-Sub-Textures.html" title="Sub Textures">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#cogl-2.0-experimental-High-Level-Meta-Textures.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="cogl-meta-textures.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="cogl-meta-textures.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="cogl-2.0-experimental-Sub-Textures.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="cogl-2.0-experimental-High-Level-Meta-Textures"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="cogl-2.0-experimental-High-Level-Meta-Textures.top_of_page"></a>High Level Meta Textures</span></h2>
<p>High Level Meta Textures — Interface for high-level textures built from
                    low-level textures like <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a> and
                    <a class="link" href="cogl-2.0-experimental-3D-textures.html#CoglTexture3D" title="CoglTexture3D"><span class="type">CoglTexture3D</span></a>.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="cogl-2.0-experimental-High-Level-Meta-Textures.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTextureCallback" title="CoglMetaTextureCallback ()">*CoglMetaTextureCallback</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#cogl-meta-texture-foreach-in-region" title="cogl_meta_texture_foreach_in_region ()">cogl_meta_texture_foreach_in_region</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-High-Level-Meta-Textures.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture">CoglMetaTexture</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-High-Level-Meta-Textures.description"></a><h2>Description</h2>
<p>Cogl helps to make it easy to deal with high level textures such
as <span class="type">CoglAtlasTexture</span>s, <a class="link" href="cogl-2.0-experimental-Sub-Textures.html#CoglSubTexture" title="CoglSubTexture"><span class="type">CoglSubTexture</span></a>s,
<a class="link" href="cogl-2.0-experimental-X11-Texture-From-Pixmap.html#CoglTexturePixmapX11" title="CoglTexturePixmapX11"><span class="type">CoglTexturePixmapX11</span></a> textures and <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> textures
consistently.</p>
<p>A <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a> is a texture that might internally be
represented by one or more low-level <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a>s
such as <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a> or <a class="link" href="cogl-2.0-experimental-3D-textures.html#CoglTexture3D" title="CoglTexture3D"><span class="type">CoglTexture3D</span></a>. These low-level textures
are the only ones that a GPU really understands but because
applications often want more high-level texture abstractions
(such as storing multiple textures inside one larger "atlas"
texture) it's desirable to be able to deal with these
using a common interface.</p>
<p>For example the GPU is not able to automatically handle repeating a
texture that is part of a larger atlas texture but if you use
<a class="link" href="cogl-2.0-experimental-Pipeline.html#COGL-PIPELINE-WRAP-MODE-REPEAT:CAPS"><code class="literal">COGL_PIPELINE_WRAP_MODE_REPEAT</code></a> with an atlas texture when drawing
with <a class="link" href="cogl-2.0-experimental-Rectangles.html#cogl-rectangle" title="cogl_rectangle ()"><code class="function">cogl_rectangle()</code></a> you should see that it "Just Works™" - at
least if you don't use multi-texturing. The reason this works is
because <a class="link" href="cogl-2.0-experimental-Rectangles.html#cogl-rectangle" title="cogl_rectangle ()"><code class="function">cogl_rectangle()</code></a> internally understands the <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a>
interface and is able to manually resolve the low-level textures
using this interface and by making multiple draw calls it can
emulate the texture repeat modes.</p>
<p>Cogl doesn't aim to pretend that meta-textures are just like real
textures because it would get extremely complex to try and emulate
low-level GPU semantics transparently for these textures.  The low
level drawing APIs of Cogl, such as <a class="link" href="cogl-2.0-experimental-Primitives.html#cogl-primitive-draw" title="cogl_primitive_draw ()"><code class="function">cogl_primitive_draw()</code></a> don't
actually know anything about the <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a> interface and its
the developer's responsibility to resolve all textures referenced
by a <a class="link" href="cogl-2.0-experimental-Pipeline.html#CoglPipeline" title="CoglPipeline"><span class="type">CoglPipeline</span></a> to low-level textures before drawing.</p>
<p>If you want to develop custom primitive APIs like
<a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-rectangle" title="cogl_framebuffer_draw_rectangle ()"><code class="function">cogl_framebuffer_draw_rectangle()</code></a> and you want to support drawing
with <span class="type">CoglAtlasTexture</span>s or <a class="link" href="cogl-2.0-experimental-Sub-Textures.html#CoglSubTexture" title="CoglSubTexture"><span class="type">CoglSubTexture</span></a>s for
example, then you will need to use this <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a> interface
to be able to resolve high-level textures into low-level textures
before drawing with Cogl's low-level drawing APIs such as
<a class="link" href="cogl-2.0-experimental-Primitives.html#cogl-primitive-draw" title="cogl_primitive_draw ()"><code class="function">cogl_primitive_draw()</code></a>.</p>
<div class="note">Most developers won't need to use this interface directly
but still it is worth understanding the distinction between
low-level and meta textures because you may find other references
in the documentation that detail limitations of using
meta-textures.</div>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-High-Level-Meta-Textures.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="CoglMetaTextureCallback"></a><h3>CoglMetaTextureCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*CoglMetaTextureCallback<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *sub_texture</code></em>,
                            <em class="parameter"><code>const <span class="type">float</span> *sub_texture_coords</code></em>,
                            <em class="parameter"><code>const <span class="type">float</span> *meta_coords</code></em>,
                            <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>A callback used with <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#cogl-meta-texture-foreach-in-region" title="cogl_meta_texture_foreach_in_region ()"><code class="function">cogl_meta_texture_foreach_in_region()</code></a> to
retrieve details of all the low-level <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a>s that
make up a given <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a>.</p>
<div class="refsect3">
<a name="CoglMetaTextureCallback.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>sub_texture</p></td>
<td class="parameter_description"><p>A low-level <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> making up part of a
<a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sub_texture_coords</p></td>
<td class="parameter_description"><p>A float 4-tuple ordered like
(tx1,ty1,tx2,ty2) defining what region of the
current <em class="parameter"><code>sub_texture</code></em>
maps to a sub-region of a
<a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a>. (tx1,ty1) is the top-left
sub-region coordinate and (tx2,ty2) is the
bottom-right. These are low-level texture
coordinates.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>meta_coords</p></td>
<td class="parameter_description"><p>A float 4-tuple ordered like (tx1,ty1,tx2,ty2)
defining what sub-region of a <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a> this
low-level <em class="parameter"><code>sub_texture</code></em>
maps too. (tx1,ty1) is
the top-left sub-region coordinate and (tx2,ty2) is
the bottom-right. These are high-level meta-texture
coordinates.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>A private pointer passed to
<a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#cogl-meta-texture-foreach-in-region" title="cogl_meta_texture_foreach_in_region ()"><code class="function">cogl_meta_texture_foreach_in_region()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.10</p>
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
give outside developers early access to new or rapidly changing technology, or
to provide an interim solution to a problem where a more general solution is
anticipated. No claims are made about either source or binary compatibility from
one minor release to the next.

The Unstable interface level is a warning that these interfaces are  subject to
change without warning and should not be used in unbundled products.

Given such caveats, customer impact need not be a factor when considering
incompatible changes to an Unstable interface in a major or minor release.
Nonetheless, when such changes are introduced, the changes should still be
mentioned in the release notes for the affected release.
"><span class="acronym">Unstable</span></acronym></p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-meta-texture-foreach-in-region"></a><h3>cogl_meta_texture_foreach_in_region ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
cogl_meta_texture_foreach_in_region (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a> *meta_texture</code></em>,
                                     <em class="parameter"><code><span class="type">float</span> tx_1</code></em>,
                                     <em class="parameter"><code><span class="type">float</span> ty_1</code></em>,
                                     <em class="parameter"><code><span class="type">float</span> tx_2</code></em>,
                                     <em class="parameter"><code><span class="type">float</span> ty_2</code></em>,
                                     <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Pipeline.html#CoglPipelineWrapMode" title="enum CoglPipelineWrapMode"><span class="type">CoglPipelineWrapMode</span></a> wrap_s</code></em>,
                                     <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Pipeline.html#CoglPipelineWrapMode" title="enum CoglPipelineWrapMode"><span class="type">CoglPipelineWrapMode</span></a> wrap_t</code></em>,
                                     <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTextureCallback" title="CoglMetaTextureCallback ()"><span class="type">CoglMetaTextureCallback</span></a> callback</code></em>,
                                     <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>Allows you to manually iterate the low-level textures that define a
given region of a high-level <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a>.</p>
<p>For example <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#cogl-texture-2d-sliced-new-with-size" title="cogl_texture_2d_sliced_new_with_size ()"><code class="function">cogl_texture_2d_sliced_new_with_size()</code></a> can be used to
create a meta texture that may slice a large image into multiple,
smaller power-of-two sized textures. These high level textures are
not directly understood by a GPU and so this API must be used to
manually resolve the underlying textures for drawing.</p>
<p>All high level textures (<span class="type">CoglAtlasTexture</span>, <a class="link" href="cogl-2.0-experimental-Sub-Textures.html#CoglSubTexture" title="CoglSubTexture"><span class="type">CoglSubTexture</span></a>,
<a class="link" href="cogl-2.0-experimental-X11-Texture-From-Pixmap.html#CoglTexturePixmapX11" title="CoglTexturePixmapX11"><span class="type">CoglTexturePixmapX11</span></a>, and <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a>) can be handled
consistently using this interface which greately simplifies
implementing primitives that support all texture types.</p>
<p>For example if you use the <a class="link" href="cogl-2.0-experimental-Rectangles.html#cogl-rectangle" title="cogl_rectangle ()"><code class="function">cogl_rectangle()</code></a> API then Cogl will
internally use this API to resolve the low level textures of any
meta textures you have associated with CoglPipeline layers.</p>
<div class="note">The low level drawing APIs such as <a class="link" href="cogl-2.0-experimental-Primitives.html#cogl-primitive-draw" title="cogl_primitive_draw ()"><code class="function">cogl_primitive_draw()</code></a>
don't understand the <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a> interface and so it is your
responsibility to use this API to resolve all CoglPipeline textures
into low-level textures before drawing.</div>
<p>For each low-level texture that makes up part of the given region
of the <em class="parameter"><code>meta_texture</code></em>
, <em class="parameter"><code>callback</code></em>
 is called specifying how the
low-level texture maps to the original region.</p>
<div class="refsect3">
<a name="cogl-meta-texture-foreach-in-region.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>meta_texture</p></td>
<td class="parameter_description"><p>An object implementing the <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a>
interface.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tx_1</p></td>
<td class="parameter_description"><p>The top-left x coordinate of the region to iterate</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ty_1</p></td>
<td class="parameter_description"><p>The top-left y coordinate of the region to iterate</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tx_2</p></td>
<td class="parameter_description"><p>The bottom-right x coordinate of the region to iterate</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ty_2</p></td>
<td class="parameter_description"><p>The bottom-right y coordinate of the region to iterate</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>wrap_s</p></td>
<td class="parameter_description"><p>The wrap mode for the x-axis</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>wrap_t</p></td>
<td class="parameter_description"><p>The wrap mode for the y-axis</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>callback</p></td>
<td class="parameter_description"><p>A <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTextureCallback" title="CoglMetaTextureCallback ()"><span class="type">CoglMetaTextureCallback</span></a> pointer to be called
for each low-level texture within the specified region.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>A private pointer that is passed to <em class="parameter"><code>callback</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.10</p>
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
give outside developers early access to new or rapidly changing technology, or
to provide an interim solution to a problem where a more general solution is
anticipated. No claims are made about either source or binary compatibility from
one minor release to the next.

The Unstable interface level is a warning that these interfaces are  subject to
change without warning and should not be used in unbundled products.

Given such caveats, customer impact need not be a factor when considering
incompatible changes to an Unstable interface in a major or minor release.
Nonetheless, when such changes are introduced, the changes should still be
mentioned in the release notes for the affected release.
"><span class="acronym">Unstable</span></acronym></p>
</div>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-High-Level-Meta-Textures.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="CoglMetaTexture"></a><h3>CoglMetaTexture</h3>
<pre class="programlisting">typedef void CoglMetaTexture;
</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>