~noskcaj/ubuntu/trusty/cogl/1.16.2

« back to all changes in this revision

Viewing changes to doc/reference/cogl-2.0-experimental/html/cogl-2.0-experimental-Sliced-Textures.html

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha, Jeremy Bicha, Rico Tzschichholz
  • Date: 2013-02-26 16:43:25 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130226164325-t4z9rylpa20v0p6q
Tags: 1.13.4-0ubuntu1
[ Jeremy Bicha ]
* New upstream release
  - soname bump
* debian/control.in:
  - Bump minimum glib to 2.32
  - Drop obsolete breaks/replaces
  - Bump libclutter-1.0-dev breaks for soname transition
* debian/libcogl-dev.install:
  - Add some missing files

[ Rico Tzschichholz ]
* debian/control.in:
  - Build-depend on libxrandr-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>Sliced Textures</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7
7
<link rel="home" href="index.html" title="Cogl 2.0 Reference Manual">
8
8
<link rel="up" href="cogl-meta-textures.html" title="Meta Textures">
9
9
<link rel="prev" href="cogl-2.0-experimental-Sub-Textures.html" title="Sub Textures">
10
10
<link rel="next" href="cogl-2.0-experimental-X11-Texture-From-Pixmap.html" title="X11 Texture From Pixmap">
11
 
<meta name="generator" content="GTK-Doc V1.17.1 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
</head>
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
41
41
<a name="cogl-2.0-experimental-Sliced-Textures.synopsis"></a><h2>Synopsis</h2>
42
42
<pre class="synopsis">                    <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced">CoglTexture2DSliced</a>;
43
43
<a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="returnvalue">CoglTexture2DSliced</span></a> * <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 ()">cogl_texture_2d_sliced_new_with_size</a>
44
 
                                                        (<em class="parameter"><code><span class="type">CoglContext</span> *ctx</code></em>,
45
 
                                                         <em class="parameter"><code>unsigned <span class="type">int</span> width</code></em>,
46
 
                                                         <em class="parameter"><code>unsigned <span class="type">int</span> height</code></em>,
 
44
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#CoglContext" title="CoglContext"><span class="type">CoglContext</span></a> *ctx</code></em>,
 
45
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
 
46
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
47
47
                                                         <em class="parameter"><code><span class="type">int</span> max_waste</code></em>,
48
 
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> internal_format</code></em>,
49
 
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
50
 
<span class="returnvalue">CoglBool</span>            <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#cogl-is-texture-2d-sliced" title="cogl_is_texture_2d_sliced ()">cogl_is_texture_2d_sliced</a>           (<em class="parameter"><code><span class="type">void</span> *object</code></em>);
 
48
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> internal_format</code></em>);
 
49
<a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>            <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#cogl-is-texture-2d-sliced" title="cogl_is_texture_2d_sliced ()">cogl_is_texture_2d_sliced</a>           (<em class="parameter"><code><span class="type">void</span> *object</code></em>);
51
50
</pre>
52
51
</div>
53
52
<div class="refsect1">
90
89
<div class="refsect2">
91
90
<a name="cogl-texture-2d-sliced-new-with-size"></a><h3>cogl_texture_2d_sliced_new_with_size ()</h3>
92
91
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="returnvalue">CoglTexture2DSliced</span></a> * cogl_texture_2d_sliced_new_with_size
93
 
                                                        (<em class="parameter"><code><span class="type">CoglContext</span> *ctx</code></em>,
94
 
                                                         <em class="parameter"><code>unsigned <span class="type">int</span> width</code></em>,
95
 
                                                         <em class="parameter"><code>unsigned <span class="type">int</span> height</code></em>,
 
92
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#CoglContext" title="CoglContext"><span class="type">CoglContext</span></a> *ctx</code></em>,
 
93
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
 
94
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
96
95
                                                         <em class="parameter"><code><span class="type">int</span> max_waste</code></em>,
97
 
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> internal_format</code></em>,
98
 
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
 
96
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> internal_format</code></em>);</pre>
99
97
<p>
100
98
Creates a <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> that may internally be comprised of
101
 
1 or more <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a> textures with power-of-two sizes.
 
99
1 or more <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a> textures depending on GPU limitations.
 
100
For example if the GPU only supports power-of-two sized textures
 
101
then a sliced texture will turn a non-power-of-two size into a
 
102
combination of smaller power-of-two sized textures. If the
 
103
requested texture size is larger than is supported by the hardware
 
104
then the texture will be sliced into smaller textures that can be
 
105
accessed by the hardware.
 
106
</p>
 
107
<p>
102
108
<em class="parameter"><code>max_waste</code></em> is used as a threshold for recursively slicing the
103
 
right-most or bottom-most slices into smaller power-of-two sizes
104
 
until the wasted padding at the bottom and right of the
105
 
power-of-two textures is less than specified.
106
 
</p>
107
 
<div class="variablelist"><table border="0">
 
109
right-most or bottom-most slices into smaller sizes until the
 
110
wasted padding at the bottom and right of the textures is less than
 
111
specified. A negative <em class="parameter"><code>max_waste</code></em> will disable slicing.
 
112
</p>
 
113
<p>
 
114
The storage for the texture is not allocated before this function
 
115
returns. You can call <code class="function">cogl_texture_allocate()</code> to explicitly
 
116
allocate the underlying storage or let Cogl automatically allocate
 
117
storage lazily.
 
118
</p>
 
119
<p>
 
120
</p>
 
121
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
 
122
<h3 class="title">Note</h3>It's possible for the allocation of a sliced texture to fail
 
123
later due to impossible slicing constraints if a negative
 
124
<em class="parameter"><code>max_waste</code></em> value is given. If the given virtual texture size size
 
125
is larger than is supported by the hardware but slicing is disabled
 
126
the texture size would be too large to handle.</div>
 
127
<p>
 
128
</p>
 
129
<div class="variablelist"><table border="0" class="variablelist">
 
130
<colgroup>
108
131
<col align="left" valign="top">
 
132
<col>
 
133
</colgroup>
109
134
<tbody>
110
135
<tr>
111
136
<td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
112
 
<td>A <span class="type">CoglContext</span>
 
137
<td>A <a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#CoglContext" title="CoglContext"><span class="type">CoglContext</span></a>
113
138
</td>
114
139
</tr>
115
140
<tr>
123
148
<tr>
124
149
<td><p><span class="term"><em class="parameter"><code>max_waste</code></em> :</span></p></td>
125
150
<td>The threshold of how wide a strip of wasted texels
126
 
are allowed in the non-power-of-two textures before
127
 
they must be sliced to reduce the amount of waste.</td>
 
151
are allowed along the right and bottom textures before
 
152
they must be sliced to reduce the amount of waste. A
 
153
negative can be passed to disable slicing.</td>
128
154
</tr>
129
155
<tr>
130
156
<td><p><span class="term"><em class="parameter"><code>internal_format</code></em> :</span></p></td>
131
157
<td>The format of the texture</td>
132
158
</tr>
133
159
<tr>
134
 
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
135
 
<td>A <span class="type">GError</span> for exceptions.</td>
136
 
</tr>
137
 
<tr>
138
160
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
139
 
<td>A newly allocated <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> or if there was
140
 
an error allocating any of the internal slices <code class="literal">NULL</code> is
141
 
returned and <em class="parameter"><code>error</code></em> is updated.</td>
 
161
<td>A new <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> object with no storage
 
162
allocated yet.</td>
142
163
</tr>
143
164
</tbody>
144
165
</table></div>
148
169
<hr>
149
170
<div class="refsect2">
150
171
<a name="cogl-is-texture-2d-sliced"></a><h3>cogl_is_texture_2d_sliced ()</h3>
151
 
<pre class="programlisting"><span class="returnvalue">CoglBool</span>            cogl_is_texture_2d_sliced           (<em class="parameter"><code><span class="type">void</span> *object</code></em>);</pre>
 
172
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>            cogl_is_texture_2d_sliced           (<em class="parameter"><code><span class="type">void</span> *object</code></em>);</pre>
152
173
<p>
153
 
Gets whether the given object references a <span class="type">CoglTexture2dSliced</span>.
 
174
Gets whether the given object references a <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a>.
154
175
</p>
155
 
<div class="variablelist"><table border="0">
 
176
<div class="variablelist"><table border="0" class="variablelist">
 
177
<colgroup>
156
178
<col align="left" valign="top">
 
179
<col>
 
180
</colgroup>
157
181
<tbody>
158
182
<tr>
159
183
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
162
186
<tr>
163
187
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
164
188
<td>
165
 
<code class="literal">TRUE</code> if the object references a <span class="type">CoglTexture2dSliced</span>
166
 
and <code class="literal">FALSE</code> otherwise.</td>
 
189
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the object references a <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a>
 
190
and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
167
191
</tr>
168
192
</tbody>
169
193
</table></div>
174
198
</div>
175
199
<div class="footer">
176
200
<hr>
177
 
          Generated by GTK-Doc V1.17.1</div>
 
201
          Generated by GTK-Doc V1.18.1</div>
178
202
</body>
179
203
</html>
 
 
b'\\ No newline at end of file'