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.10.0-0ubuntu2.

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
<!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</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.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.18 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="cogl-meta-textures.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="cogl-meta-textures.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Cogl 2.0 Reference Manual</th>
<td><a accesskey="n" href="cogl-2.0-experimental-Sub-Textures.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#cogl-2.0-experimental-High-Level-Meta-Textures.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#cogl-2.0-experimental-High-Level-Meta-Textures.description" class="shortcut">Description</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 valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="cogl-2.0-experimental-High-Level-Meta-Textures.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">                    <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture">CoglMetaTexture</a>;
<span class="returnvalue">void</span>                (<a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTextureCallback" title="CoglMetaTextureCallback ()">*CoglMetaTextureCallback</a>)          (<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>);
<span class="returnvalue">void</span>                <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> (<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><span class="type">CoglPipelineWrapMode</span> wrap_s</code></em>,
                                                         <em class="parameter"><code><span class="type">CoglPipelineWrapMode</span> 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>
</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,
<span class="type">CoglTexturePixmapX11</span> 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
<code class="literal">COGL_PIPELINE_WRAP_MODE_REPEAT</code> 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 <code class="function">cogl_draw_attributes()</code> 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 <span class="type">CoglPipeline</span> 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-Rectangles.html#cogl-rectangle" title="cogl_rectangle ()"><code class="function">cogl_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 <code class="function">cogl_draw_attributes()</code>.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>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>
<p>
</p>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-High-Level-Meta-Textures.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="CoglMetaTexture"></a><h3>CoglMetaTexture</h3>
<pre class="programlisting">typedef struct _CoglMetaTexture CoglMetaTexture;</pre>
</div>
<hr>
<div class="refsect2">
<a name="CoglMetaTextureCallback"></a><h3>CoglMetaTextureCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*CoglMetaTextureCallback)          (<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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sub_texture</code></em> :</span></p></td>
<td>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>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sub_texture_coords</code></em> :</span></p></td>
<td>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.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>meta_coords</code></em> :</span></p></td>
<td>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.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>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>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.10</p>
<p class="stability">Stability Level: Unstable</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><span class="type">CoglPipelineWrapMode</span> wrap_s</code></em>,
                                                         <em class="parameter"><code><span class="type">CoglPipelineWrapMode</span> 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>,
<span class="type">CoglTexturePixmapX11</span>, 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>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>The low level drawing APIs such as <code class="function">cogl_draw_attributes()</code>
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>
</p>
<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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>meta_texture</code></em> :</span></p></td>
<td>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.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tx_1</code></em> :</span></p></td>
<td>The top-left x coordinate of the region to iterate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ty_1</code></em> :</span></p></td>
<td>The top-left y coordinate of the region to iterate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tx_2</code></em> :</span></p></td>
<td>The bottom-right x coordinate of the region to iterate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ty_2</code></em> :</span></p></td>
<td>The bottom-right y coordinate of the region to iterate</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrap_s</code></em> :</span></p></td>
<td>The wrap mode for the x-axis</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>wrap_t</code></em> :</span></p></td>
<td>The wrap mode for the y-axis</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>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.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>A private pointer that is passed to <em class="parameter"><code>callback</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.10</p>
<p class="stability">Stability Level: Unstable</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>