~oem-solutions-group/unity-2d/clutter-1.0

« back to all changes in this revision

Viewing changes to doc/reference/cogl/html/cogl-Textures.html

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
Import upstream version 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<link rel="up" href="ch01.html" title="COGL - GL Abstraction API">
9
9
<link rel="prev" href="cogl-Color-Type.html" title="Color Type">
10
10
<link rel="next" href="cogl-Blend-Strings.html" title="Material Blend Strings">
11
 
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="chapter" href="ch01.html" title="COGL - GL Abstraction API">
14
 
<link rel="index" href="ix01.html" title="Index">
 
14
<link rel="chapter" href="ch02.html" title="COGL experimental API">
 
15
<link rel="index" href="ix01.html" title="Index of all symbols">
 
16
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
 
17
<link rel="index" href="ix03.html" title="Index of new symbols in 0.8">
 
18
<link rel="index" href="ix04.html" title="Index of new symbols in 1.0">
 
19
<link rel="index" href="ix05.html" title="Index of new symbols in 1.2">
15
20
<link rel="appendix" href="license.html" title="Appendix A. License">
16
21
</head>
17
22
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
30
</tr>
26
31
<tr><td colspan="5" class="shortcuts">
27
32
<a href="#cogl-Textures.synopsis" class="shortcut">Top</a>
28
 
                 | 
29
 
                <a href="#cogl-Textures.description" class="shortcut">Description</a>
 
33
                   | 
 
34
                  <a href="#cogl-Textures.description" class="shortcut">Description</a>
30
35
</td></tr>
31
36
</table>
32
37
<div class="refentry" title="Textures">
40
45
</tr></table></div>
41
46
<div class="refsynopsisdiv" title="Synopsis">
42
47
<a name="cogl-Textures.synopsis"></a><h2>Synopsis</h2>
43
 
<pre class="synopsis">
44
 
                    <a class="link" href="cogl-Textures.html#CoglTextureVertex" title="CoglTextureVertex">CoglTextureVertex</a>;
 
48
<pre class="synopsis">                    <a class="link" href="cogl-Textures.html#CoglTextureVertex" title="CoglTextureVertex">CoglTextureVertex</a>;
45
49
enum                <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags">CoglTextureFlags</a>;
46
 
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          <a class="link" href="cogl-Textures.html#cogl-texture-new-with-size" title="cogl_texture_new_with_size ()">cogl_texture_new_with_size</a>          (<a
47
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
48
 
>guint</a> width,
49
 
                                                         <a
50
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
51
 
>guint</a> height,
52
 
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags">CoglTextureFlags</a> flags,
53
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> internal_format);
54
 
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          <a class="link" href="cogl-Textures.html#cogl-texture-new-from-file" title="cogl_texture_new_from_file ()">cogl_texture_new_from_file</a>          (const <a
55
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
56
 
>gchar</a> *filename,
57
 
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags">CoglTextureFlags</a> flags,
58
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> internal_format,
59
 
                                                         <a
60
 
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
61
 
>GError</a> **error);
62
 
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          <a class="link" href="cogl-Textures.html#cogl-texture-new-from-data" title="cogl_texture_new_from_data ()">cogl_texture_new_from_data</a>          (<a
63
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
64
 
>guint</a> width,
65
 
                                                         <a
66
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
67
 
>guint</a> height,
68
 
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags">CoglTextureFlags</a> flags,
69
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> format,
70
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> internal_format,
71
 
                                                         <a
72
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
73
 
>guint</a> rowstride,
74
 
                                                         const <a
75
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"
76
 
>guchar</a> *data);
77
 
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          <a class="link" href="cogl-Textures.html#cogl-texture-new-from-foreign" title="cogl_texture_new_from_foreign ()">cogl_texture_new_from_foreign</a>       (GLuint gl_handle,
78
 
                                                         GLenum gl_target,
79
 
                                                         GLuint width,
80
 
                                                         GLuint height,
81
 
                                                         GLuint x_pot_waste,
82
 
                                                         GLuint y_pot_waste,
83
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> format);
84
 
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          <a class="link" href="cogl-Textures.html#cogl-texture-new-from-bitmap" title="cogl_texture_new_from_bitmap ()">cogl_texture_new_from_bitmap</a>        (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> bmp_handle,
85
 
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags">CoglTextureFlags</a> flags,
86
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> internal_format);
87
 
<a
88
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
89
 
>gboolean</a>            <a class="link" href="cogl-Textures.html#cogl-is-texture" title="cogl_is_texture ()">cogl_is_texture</a>                     (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);
90
 
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          <a class="link" href="cogl-Textures.html#cogl-texture-ref" title="cogl_texture_ref ()">cogl_texture_ref</a>                    (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);
91
 
void                <a class="link" href="cogl-Textures.html#cogl-texture-unref" title="cogl_texture_unref ()">cogl_texture_unref</a>                  (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);
 
50
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          <a class="link" href="cogl-Textures.html#cogl-texture-new-with-size" title="cogl_texture_new_with_size ()">cogl_texture_new_with_size</a>          (unsigned <span class="returnvalue">int</span> width,
 
51
                                                         unsigned <span class="returnvalue">int</span> height,
 
52
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags"><span class="returnvalue">CoglTextureFlags</span></a> flags,
 
53
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> internal_format);
 
54
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          <a class="link" href="cogl-Textures.html#cogl-texture-new-from-file" title="cogl_texture_new_from_file ()">cogl_texture_new_from_file</a>          (const <span class="returnvalue">char</span> *filename,
 
55
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags"><span class="returnvalue">CoglTextureFlags</span></a> flags,
 
56
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> internal_format,
 
57
                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);
 
58
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          <a class="link" href="cogl-Textures.html#cogl-texture-new-from-data" title="cogl_texture_new_from_data ()">cogl_texture_new_from_data</a>          (unsigned <span class="returnvalue">int</span> width,
 
59
                                                         unsigned <span class="returnvalue">int</span> height,
 
60
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags"><span class="returnvalue">CoglTextureFlags</span></a> flags,
 
61
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> format,
 
62
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> internal_format,
 
63
                                                         unsigned <span class="returnvalue">int</span> rowstride,
 
64
                                                         const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> *data);
 
65
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          <a class="link" href="cogl-Textures.html#cogl-texture-new-from-foreign" title="cogl_texture_new_from_foreign ()">cogl_texture_new_from_foreign</a>       (<span class="returnvalue">GLuint</span> gl_handle,
 
66
                                                         <span class="returnvalue">GLenum</span> gl_target,
 
67
                                                         <span class="returnvalue">GLuint</span> width,
 
68
                                                         <span class="returnvalue">GLuint</span> height,
 
69
                                                         <span class="returnvalue">GLuint</span> x_pot_waste,
 
70
                                                         <span class="returnvalue">GLuint</span> y_pot_waste,
 
71
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> format);
 
72
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          <a class="link" href="cogl-Textures.html#cogl-texture-new-from-bitmap" title="cogl_texture_new_from_bitmap ()">cogl_texture_new_from_bitmap</a>        (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> bmp_handle,
 
73
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags"><span class="returnvalue">CoglTextureFlags</span></a> flags,
 
74
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> internal_format);
 
75
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          <a class="link" href="cogl-Textures.html#cogl-texture-new-from-sub-texture" title="cogl_texture_new_from_sub_texture ()">cogl_texture_new_from_sub_texture</a>   (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> full_texture,
 
76
                                                         <span class="returnvalue">int</span> sub_x,
 
77
                                                         <span class="returnvalue">int</span> sub_y,
 
78
                                                         <span class="returnvalue">int</span> sub_width,
 
79
                                                         <span class="returnvalue">int</span> sub_height);
 
80
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="cogl-Textures.html#cogl-is-texture" title="cogl_is_texture ()">cogl_is_texture</a>                     (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);
 
81
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          <a class="link" href="cogl-Textures.html#cogl-texture-ref" title="cogl_texture_ref ()">cogl_texture_ref</a>                    (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);
 
82
<span class="returnvalue">void</span>                <a class="link" href="cogl-Textures.html#cogl-texture-unref" title="cogl_texture_unref ()">cogl_texture_unref</a>                  (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);
92
83
 
93
 
<a
94
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
95
 
>guint</a>               <a class="link" href="cogl-Textures.html#cogl-texture-get-width" title="cogl_texture_get_width ()">cogl_texture_get_width</a>              (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);
96
 
<a
97
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
98
 
>guint</a>               <a class="link" href="cogl-Textures.html#cogl-texture-get-height" title="cogl_texture_get_height ()">cogl_texture_get_height</a>             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);
99
 
<a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a>     <a class="link" href="cogl-Textures.html#cogl-texture-get-format" title="cogl_texture_get_format ()">cogl_texture_get_format</a>             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);
100
 
<a
101
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
102
 
>guint</a>               <a class="link" href="cogl-Textures.html#cogl-texture-get-rowstride" title="cogl_texture_get_rowstride ()">cogl_texture_get_rowstride</a>          (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);
103
 
<a
104
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
105
 
>gint</a>                <a class="link" href="cogl-Textures.html#cogl-texture-get-max-waste" title="cogl_texture_get_max_waste ()">cogl_texture_get_max_waste</a>          (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);
106
 
<a
107
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
108
 
>gboolean</a>            <a class="link" href="cogl-Textures.html#cogl-texture-is-sliced" title="cogl_texture_is_sliced ()">cogl_texture_is_sliced</a>              (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);
109
 
<a
110
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
111
 
>gboolean</a>            <a class="link" href="cogl-Textures.html#cogl-texture-get-gl-texture" title="cogl_texture_get_gl_texture ()">cogl_texture_get_gl_texture</a>         (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle,
112
 
                                                         GLuint *out_gl_handle,
113
 
                                                         GLenum *out_gl_target);
114
 
<a
115
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
116
 
>gint</a>                <a class="link" href="cogl-Textures.html#cogl-texture-get-data" title="cogl_texture_get_data ()">cogl_texture_get_data</a>               (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle,
117
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> format,
118
 
                                                         <a
119
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
120
 
>guint</a> rowstride,
121
 
                                                         <a
122
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"
123
 
>guchar</a> *data);
124
 
<a
125
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
126
 
>gboolean</a>            <a class="link" href="cogl-Textures.html#cogl-texture-set-region" title="cogl_texture_set_region ()">cogl_texture_set_region</a>             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle,
127
 
                                                         <a
128
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
129
 
>gint</a> src_x,
130
 
                                                         <a
131
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
132
 
>gint</a> src_y,
133
 
                                                         <a
134
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
135
 
>gint</a> dst_x,
136
 
                                                         <a
137
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
138
 
>gint</a> dst_y,
139
 
                                                         <a
140
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
141
 
>guint</a> dst_width,
142
 
                                                         <a
143
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
144
 
>guint</a> dst_height,
145
 
                                                         <a
146
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
147
 
>gint</a> width,
148
 
                                                         <a
149
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
150
 
>gint</a> height,
151
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> format,
152
 
                                                         <a
153
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
154
 
>guint</a> rowstride,
155
 
                                                         const <a
156
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"
157
 
>guchar</a> *data);
 
84
unsigned <span class="returnvalue">int</span>        <a class="link" href="cogl-Textures.html#cogl-texture-get-width" title="cogl_texture_get_width ()">cogl_texture_get_width</a>              (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);
 
85
unsigned <span class="returnvalue">int</span>        <a class="link" href="cogl-Textures.html#cogl-texture-get-height" title="cogl_texture_get_height ()">cogl_texture_get_height</a>             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);
 
86
<a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a>     <a class="link" href="cogl-Textures.html#cogl-texture-get-format" title="cogl_texture_get_format ()">cogl_texture_get_format</a>             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);
 
87
unsigned <span class="returnvalue">int</span>        <a class="link" href="cogl-Textures.html#cogl-texture-get-rowstride" title="cogl_texture_get_rowstride ()">cogl_texture_get_rowstride</a>          (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);
 
88
<span class="returnvalue">int</span>                 <a class="link" href="cogl-Textures.html#cogl-texture-get-max-waste" title="cogl_texture_get_max_waste ()">cogl_texture_get_max_waste</a>          (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);
 
89
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="cogl-Textures.html#cogl-texture-is-sliced" title="cogl_texture_is_sliced ()">cogl_texture_is_sliced</a>              (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);
 
90
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="cogl-Textures.html#cogl-texture-get-gl-texture" title="cogl_texture_get_gl_texture ()">cogl_texture_get_gl_texture</a>         (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle,
 
91
                                                         <span class="returnvalue">GLuint</span> *out_gl_handle,
 
92
                                                         <span class="returnvalue">GLenum</span> *out_gl_target);
 
93
<span class="returnvalue">int</span>                 <a class="link" href="cogl-Textures.html#cogl-texture-get-data" title="cogl_texture_get_data ()">cogl_texture_get_data</a>               (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle,
 
94
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> format,
 
95
                                                         unsigned <span class="returnvalue">int</span> rowstride,
 
96
                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> *data);
 
97
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="cogl-Textures.html#cogl-texture-set-region" title="cogl_texture_set_region ()">cogl_texture_set_region</a>             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle,
 
98
                                                         <span class="returnvalue">int</span> src_x,
 
99
                                                         <span class="returnvalue">int</span> src_y,
 
100
                                                         <span class="returnvalue">int</span> dst_x,
 
101
                                                         <span class="returnvalue">int</span> dst_y,
 
102
                                                         unsigned <span class="returnvalue">int</span> dst_width,
 
103
                                                         unsigned <span class="returnvalue">int</span> dst_height,
 
104
                                                         <span class="returnvalue">int</span> width,
 
105
                                                         <span class="returnvalue">int</span> height,
 
106
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> format,
 
107
                                                         unsigned <span class="returnvalue">int</span> rowstride,
 
108
                                                         const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> *data);
158
109
</pre>
159
110
</div>
160
111
<div class="refsect1" title="Description">
163
114
COGL allows creating and manipulating GL textures using a uniform
164
115
API that tries to hide all the various complexities of creating,
165
116
loading and manipulating textures.</p>
166
 
<p>
167
 
</p>
168
117
</div>
169
118
<div class="refsect1" title="Details">
170
119
<a name="cogl-Textures.details"></a><h2>Details</h2>
179
128
</pre>
180
129
<p>
181
130
Used to specify vertex information when calling <a class="link" href="cogl-Primitives.html#cogl-polygon" title="cogl_polygon ()"><code class="function">cogl_polygon()</code></a></p>
182
 
<p>
183
 
</p>
184
131
<div class="variablelist"><table border="0">
185
132
<col align="left" valign="top">
186
133
<tbody>
187
134
<tr>
188
 
<td><p><span class="term">float <em class="structfield"><code>x</code></em>;</span></p></td>
 
135
<td><p><span class="term"><span class="type">float</span> <em class="structfield"><code><a name="CoglTextureVertex.x"></a>x</code></em>;</span></p></td>
189
136
<td> Model x-coordinate
190
137
</td>
191
138
</tr>
192
139
<tr>
193
 
<td><p><span class="term">float <em class="structfield"><code>y</code></em>;</span></p></td>
 
140
<td><p><span class="term"><span class="type">float</span> <em class="structfield"><code><a name="CoglTextureVertex.y"></a>y</code></em>;</span></p></td>
194
141
<td> Model y-coordinate
195
142
</td>
196
143
</tr>
197
144
<tr>
198
 
<td><p><span class="term">float <em class="structfield"><code>z</code></em>;</span></p></td>
 
145
<td><p><span class="term"><span class="type">float</span> <em class="structfield"><code><a name="CoglTextureVertex.z"></a>z</code></em>;</span></p></td>
199
146
<td> Model z-coordinate
200
147
</td>
201
148
</tr>
202
149
<tr>
203
 
<td><p><span class="term">float <em class="structfield"><code>tx</code></em>;</span></p></td>
 
150
<td><p><span class="term"><span class="type">float</span> <em class="structfield"><code><a name="CoglTextureVertex.tx"></a>tx</code></em>;</span></p></td>
204
151
<td> Texture x-coordinate
205
152
</td>
206
153
</tr>
207
154
<tr>
208
 
<td><p><span class="term">float <em class="structfield"><code>ty</code></em>;</span></p></td>
 
155
<td><p><span class="term"><span class="type">float</span> <em class="structfield"><code><a name="CoglTextureVertex.ty"></a>ty</code></em>;</span></p></td>
209
156
<td> Texture y-coordinate
210
157
</td>
211
158
</tr>
212
159
<tr>
213
 
<td><p><span class="term"><a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor">CoglColor</a> <em class="structfield"><code>color</code></em>;</span></p></td>
 
160
<td><p><span class="term"><a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor"><span class="type">CoglColor</span></a> <em class="structfield"><code><a name="CoglTextureVertex.color"></a>color</code></em>;</span></p></td>
214
161
<td> The color to use at this vertex. This is ignored if
215
 
  use_color is <a
216
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
217
 
><code class="literal">FALSE</code></a> when calling <a class="link" href="cogl-Primitives.html#cogl-polygon" title="cogl_polygon ()"><code class="function">cogl_polygon()</code></a>
 
162
  use_color is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> when calling <a class="link" href="cogl-Primitives.html#cogl-polygon" title="cogl_polygon ()"><code class="function">cogl_polygon()</code></a>
218
163
</td>
219
164
</tr>
220
165
</tbody>
226
171
<pre class="programlisting">typedef enum {
227
172
  COGL_TEXTURE_NONE           = 0,
228
173
  COGL_TEXTURE_NO_AUTO_MIPMAP = 1 &lt;&lt; 0,
229
 
  COGL_TEXTURE_NO_SLICING     = 1 &lt;&lt; 1
 
174
  COGL_TEXTURE_NO_SLICING     = 1 &lt;&lt; 1,
 
175
  COGL_TEXTURE_NO_ATLAS       = 1 &lt;&lt; 2
230
176
} CoglTextureFlags;
231
177
</pre>
232
178
<p>
233
179
Flags to pass to the cogl_texture_new_* family of functions.</p>
234
 
<p>
235
 
</p>
236
180
<div class="variablelist"><table border="0">
237
181
<col align="left" valign="top">
238
182
<tbody>
239
183
<tr>
240
 
<td><p><a name="COGL-TEXTURE-NONE--CAPS"></a><span class="term"><code class="literal">COGL_TEXTURE_NONE</code></span></p></td>
 
184
<td><p><a name="COGL-TEXTURE-NONE:CAPS"></a><span class="term"><code class="literal">COGL_TEXTURE_NONE</code></span></p></td>
241
185
<td> No flags specified
242
186
</td>
243
187
</tr>
244
188
<tr>
245
 
<td><p><a name="COGL-TEXTURE-NO-AUTO-MIPMAP--CAPS"></a><span class="term"><code class="literal">COGL_TEXTURE_NO_AUTO_MIPMAP</code></span></p></td>
 
189
<td><p><a name="COGL-TEXTURE-NO-AUTO-MIPMAP:CAPS"></a><span class="term"><code class="literal">COGL_TEXTURE_NO_AUTO_MIPMAP</code></span></p></td>
246
190
<td> Disables the automatic generation of
247
191
  the mipmap pyramid from the base level image whenever it is
248
192
  updated. The mipmaps are only generated when the texture is
249
193
  rendered with a mipmap filter so it should be free to leave out
250
 
  this flag when using other filtering modes.
 
194
  this flag when using other filtering modes
251
195
</td>
252
196
</tr>
253
197
<tr>
254
 
<td><p><a name="COGL-TEXTURE-NO-SLICING--CAPS"></a><span class="term"><code class="literal">COGL_TEXTURE_NO_SLICING</code></span></p></td>
 
198
<td><p><a name="COGL-TEXTURE-NO-SLICING:CAPS"></a><span class="term"><code class="literal">COGL_TEXTURE_NO_SLICING</code></span></p></td>
255
199
<td> Disables the slicing of the texture
256
200
</td>
257
201
</tr>
 
202
<tr>
 
203
<td><p><a name="COGL-TEXTURE-NO-ATLAS:CAPS"></a><span class="term"><code class="literal">COGL_TEXTURE_NO_ATLAS</code></span></p></td>
 
204
<td> Disables the insertion of the texture inside
 
205
  the texture atlas used by Cogl
 
206
</td>
 
207
</tr>
258
208
</tbody>
259
209
</table></div>
260
210
<p class="since">Since 1.0</p>
262
212
<hr>
263
213
<div class="refsect2" title="cogl_texture_new_with_size ()">
264
214
<a name="cogl-texture-new-with-size"></a><h3>cogl_texture_new_with_size ()</h3>
265
 
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          cogl_texture_new_with_size          (<a
266
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
267
 
>guint</a> width,
268
 
                                                         <a
269
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
270
 
>guint</a> height,
271
 
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags">CoglTextureFlags</a> flags,
272
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> internal_format);</pre>
 
215
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          cogl_texture_new_with_size          (unsigned <span class="returnvalue">int</span> width,
 
216
                                                         unsigned <span class="returnvalue">int</span> height,
 
217
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags"><span class="returnvalue">CoglTextureFlags</span></a> flags,
 
218
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> internal_format);</pre>
273
219
<p>
274
220
Creates a new COGL texture with the specified dimensions and pixel format.</p>
275
 
<p>
276
 
</p>
277
221
<div class="variablelist"><table border="0">
278
222
<col align="left" valign="top">
279
223
<tbody>
289
233
</tr>
290
234
<tr>
291
235
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
292
 
<td> Optional flags for the texture, or <a class="link" href="cogl-Textures.html#COGL-TEXTURE-NONE--CAPS"><code class="literal">COGL_TEXTURE_NONE</code></a>
 
236
<td> Optional flags for the texture, or <a class="link" href="cogl-Textures.html#COGL-TEXTURE-NONE:CAPS"><code class="literal">COGL_TEXTURE_NONE</code></a>
293
237
</td>
294
238
</tr>
295
239
<tr>
301
245
<tr>
302
246
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
303
247
<td> a <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a> to the newly created texture or
304
 
  <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE--CAPS" title="COGL_INVALID_HANDLE"><code class="literal">COGL_INVALID_HANDLE</code></a> on failure
 
248
  <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE:CAPS" title="COGL_INVALID_HANDLE"><code class="literal">COGL_INVALID_HANDLE</code></a> on failure
305
249
 
306
250
</td>
307
251
</tr>
312
256
<hr>
313
257
<div class="refsect2" title="cogl_texture_new_from_file ()">
314
258
<a name="cogl-texture-new-from-file"></a><h3>cogl_texture_new_from_file ()</h3>
315
 
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          cogl_texture_new_from_file          (const <a
316
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
317
 
>gchar</a> *filename,
318
 
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags">CoglTextureFlags</a> flags,
319
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> internal_format,
320
 
                                                         <a
321
 
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
322
 
>GError</a> **error);</pre>
 
259
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          cogl_texture_new_from_file          (const <span class="returnvalue">char</span> *filename,
 
260
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags"><span class="returnvalue">CoglTextureFlags</span></a> flags,
 
261
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> internal_format,
 
262
                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="returnvalue">GError</span></a> **error);</pre>
323
263
<p>
324
264
Creates a COGL texture from an image file.</p>
325
 
<p>
326
 
</p>
327
265
<div class="variablelist"><table border="0">
328
266
<col align="left" valign="top">
329
267
<tbody>
334
272
</tr>
335
273
<tr>
336
274
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
337
 
<td> Optional flags for the texture, or <a class="link" href="cogl-Textures.html#COGL-TEXTURE-NONE--CAPS"><code class="literal">COGL_TEXTURE_NONE</code></a>
 
275
<td> Optional flags for the texture, or <a class="link" href="cogl-Textures.html#COGL-TEXTURE-NONE:CAPS"><code class="literal">COGL_TEXTURE_NONE</code></a>
338
276
</td>
339
277
</tr>
340
278
<tr>
341
279
<td><p><span class="term"><em class="parameter"><code>internal_format</code></em> :</span></p></td>
342
280
<td> the <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> to use for the GPU storage of the
343
 
   texture. If COGL_PIXEL_FORMAT_ANY is given then a premultiplied
 
281
   texture. If <a class="link" href="cogl-General-API.html#COGL-PIXEL-FORMAT-ANY:CAPS"><code class="literal">COGL_PIXEL_FORMAT_ANY</code></a> is given then a premultiplied
344
282
   format similar to the format of the source data will be used. The
345
283
   default blending equations of Cogl expect premultiplied color data;
346
284
   the main use of passing a non-premultiplied format here is if you
351
289
</tr>
352
290
<tr>
353
291
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
354
 
<td> return location for a <a
355
 
href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"
356
 
><span class="type">GError</span></a> or <a
357
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
358
 
><code class="literal">NULL</code></a>
 
292
<td> return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
359
293
</td>
360
294
</tr>
361
295
<tr>
362
296
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
363
297
<td> a <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a> to the newly created texture or
364
 
   <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE--CAPS" title="COGL_INVALID_HANDLE"><code class="literal">COGL_INVALID_HANDLE</code></a> on failure
 
298
   <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE:CAPS" title="COGL_INVALID_HANDLE"><code class="literal">COGL_INVALID_HANDLE</code></a> on failure
365
299
 
366
300
</td>
367
301
</tr>
372
306
<hr>
373
307
<div class="refsect2" title="cogl_texture_new_from_data ()">
374
308
<a name="cogl-texture-new-from-data"></a><h3>cogl_texture_new_from_data ()</h3>
375
 
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          cogl_texture_new_from_data          (<a
376
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
377
 
>guint</a> width,
378
 
                                                         <a
379
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
380
 
>guint</a> height,
381
 
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags">CoglTextureFlags</a> flags,
382
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> format,
383
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> internal_format,
384
 
                                                         <a
385
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
386
 
>guint</a> rowstride,
387
 
                                                         const <a
388
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"
389
 
>guchar</a> *data);</pre>
 
309
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          cogl_texture_new_from_data          (unsigned <span class="returnvalue">int</span> width,
 
310
                                                         unsigned <span class="returnvalue">int</span> height,
 
311
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags"><span class="returnvalue">CoglTextureFlags</span></a> flags,
 
312
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> format,
 
313
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> internal_format,
 
314
                                                         unsigned <span class="returnvalue">int</span> rowstride,
 
315
                                                         const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> *data);</pre>
390
316
<p>
391
317
Creates a new COGL texture based on data residing in memory.</p>
392
 
<p>
393
 
</p>
394
318
<div class="variablelist"><table border="0">
395
319
<col align="left" valign="top">
396
320
<tbody>
406
330
</tr>
407
331
<tr>
408
332
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
409
 
<td> Optional flags for the texture, or <a class="link" href="cogl-Textures.html#COGL-TEXTURE-NONE--CAPS"><code class="literal">COGL_TEXTURE_NONE</code></a>
 
333
<td> Optional flags for the texture, or <a class="link" href="cogl-Textures.html#COGL-TEXTURE-NONE:CAPS"><code class="literal">COGL_TEXTURE_NONE</code></a>
410
334
</td>
411
335
</tr>
412
336
<tr>
440
364
<tr>
441
365
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
442
366
<td> a <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a> to the newly created texture or
443
 
  <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE--CAPS" title="COGL_INVALID_HANDLE"><code class="literal">COGL_INVALID_HANDLE</code></a> on failure
 
367
  <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE:CAPS" title="COGL_INVALID_HANDLE"><code class="literal">COGL_INVALID_HANDLE</code></a> on failure
444
368
 
445
369
</td>
446
370
</tr>
451
375
<hr>
452
376
<div class="refsect2" title="cogl_texture_new_from_foreign ()">
453
377
<a name="cogl-texture-new-from-foreign"></a><h3>cogl_texture_new_from_foreign ()</h3>
454
 
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          cogl_texture_new_from_foreign       (GLuint gl_handle,
455
 
                                                         GLenum gl_target,
456
 
                                                         GLuint width,
457
 
                                                         GLuint height,
458
 
                                                         GLuint x_pot_waste,
459
 
                                                         GLuint y_pot_waste,
460
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> format);</pre>
 
378
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          cogl_texture_new_from_foreign       (<span class="returnvalue">GLuint</span> gl_handle,
 
379
                                                         <span class="returnvalue">GLenum</span> gl_target,
 
380
                                                         <span class="returnvalue">GLuint</span> width,
 
381
                                                         <span class="returnvalue">GLuint</span> height,
 
382
                                                         <span class="returnvalue">GLuint</span> x_pot_waste,
 
383
                                                         <span class="returnvalue">GLuint</span> y_pot_waste,
 
384
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> format);</pre>
461
385
<p>
462
386
Creates a COGL texture based on an existing OpenGL texture; the
463
 
width, height and format are passed along since it is not possible
464
 
to query this from a handle with GLES 1.0.</p>
 
387
width, height and format are passed along since it is not always
 
388
possible to query these from OpenGL.
 
389
</p>
465
390
<p>
466
 
</p>
 
391
The waste arguments allow you to create a Cogl texture that maps to
 
392
a region smaller than the real OpenGL texture. For instance if your
 
393
hardware only supports power-of-two textures you may load a
 
394
non-power-of-two image into a larger power-of-two texture and use
 
395
the waste arguments to tell Cogl which region should be mapped to
 
396
the texture coordinate range [0:1].</p>
467
397
<div class="variablelist"><table border="0">
468
398
<col align="left" valign="top">
469
399
<tbody>
470
400
<tr>
471
401
<td><p><span class="term"><em class="parameter"><code>gl_handle</code></em> :</span></p></td>
 
402
<td> opengl handle of foreign texture.
 
403
</td>
 
404
</tr>
 
405
<tr>
 
406
<td><p><span class="term"><em class="parameter"><code>gl_target</code></em> :</span></p></td>
472
407
<td> opengl target type of foreign texture
473
408
</td>
474
409
</tr>
475
410
<tr>
476
 
<td><p><span class="term"><em class="parameter"><code>gl_target</code></em> :</span></p></td>
477
 
<td> opengl handle of foreign texture.
478
 
</td>
479
 
</tr>
480
 
<tr>
481
411
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
482
412
<td> width of foreign texture
483
413
</td>
489
419
</tr>
490
420
<tr>
491
421
<td><p><span class="term"><em class="parameter"><code>x_pot_waste</code></em> :</span></p></td>
492
 
<td> maximum horizontal waste.
 
422
<td> horizontal waste on the right hand edge of the texture.
493
423
</td>
494
424
</tr>
495
425
<tr>
496
426
<td><p><span class="term"><em class="parameter"><code>y_pot_waste</code></em> :</span></p></td>
497
 
<td> maximum vertical waste.
 
427
<td> vertical waste on the bottom edge of the texture.
498
428
</td>
499
429
</tr>
500
430
<tr>
505
435
<tr>
506
436
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
507
437
<td> a <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a> to the newly created texture or
508
 
  <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE--CAPS" title="COGL_INVALID_HANDLE"><code class="literal">COGL_INVALID_HANDLE</code></a> on failure
 
438
  <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE:CAPS" title="COGL_INVALID_HANDLE"><code class="literal">COGL_INVALID_HANDLE</code></a> on failure
509
439
 
510
440
</td>
511
441
</tr>
516
446
<hr>
517
447
<div class="refsect2" title="cogl_texture_new_from_bitmap ()">
518
448
<a name="cogl-texture-new-from-bitmap"></a><h3>cogl_texture_new_from_bitmap ()</h3>
519
 
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          cogl_texture_new_from_bitmap        (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> bmp_handle,
520
 
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags">CoglTextureFlags</a> flags,
521
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> internal_format);</pre>
 
449
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          cogl_texture_new_from_bitmap        (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> bmp_handle,
 
450
                                                         <a class="link" href="cogl-Textures.html#CoglTextureFlags" title="enum CoglTextureFlags"><span class="returnvalue">CoglTextureFlags</span></a> flags,
 
451
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> internal_format);</pre>
522
452
<p>
523
453
Creates a COGL texture from a CoglBitmap.</p>
524
 
<p>
525
 
</p>
526
454
<div class="variablelist"><table border="0">
527
455
<col align="left" valign="top">
528
456
<tbody>
533
461
</tr>
534
462
<tr>
535
463
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
536
 
<td> Optional flags for the texture, or <a class="link" href="cogl-Textures.html#COGL-TEXTURE-NONE--CAPS"><code class="literal">COGL_TEXTURE_NONE</code></a>
 
464
<td> Optional flags for the texture, or <a class="link" href="cogl-Textures.html#COGL-TEXTURE-NONE:CAPS"><code class="literal">COGL_TEXTURE_NONE</code></a>
537
465
</td>
538
466
</tr>
539
467
<tr>
545
473
<tr>
546
474
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
547
475
<td> a <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a> to the newly created texture or
548
 
  <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE--CAPS" title="COGL_INVALID_HANDLE"><code class="literal">COGL_INVALID_HANDLE</code></a> on failure
 
476
  <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE:CAPS" title="COGL_INVALID_HANDLE"><code class="literal">COGL_INVALID_HANDLE</code></a> on failure
549
477
 
550
478
</td>
551
479
</tr>
554
482
<p class="since">Since 1.0</p>
555
483
</div>
556
484
<hr>
 
485
<div class="refsect2" title="cogl_texture_new_from_sub_texture ()">
 
486
<a name="cogl-texture-new-from-sub-texture"></a><h3>cogl_texture_new_from_sub_texture ()</h3>
 
487
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          cogl_texture_new_from_sub_texture   (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> full_texture,
 
488
                                                         <span class="returnvalue">int</span> sub_x,
 
489
                                                         <span class="returnvalue">int</span> sub_y,
 
490
                                                         <span class="returnvalue">int</span> sub_width,
 
491
                                                         <span class="returnvalue">int</span> sub_height);</pre>
 
492
<p>
 
493
Creates a new texture which represents a subregion of another
 
494
texture. The GL resources will be shared so that no new texture
 
495
data is actually allocated.
 
496
</p>
 
497
<p>
 
498
Sub textures have undefined behaviour texture coordinates outside
 
499
of the range [0,1] are used. They also do not work with
 
500
CoglVertexBuffers.
 
501
</p>
 
502
<p>
 
503
The sub texture will keep a reference to the full texture so you do
 
504
not need to keep one separately if you only want to use the sub
 
505
texture.</p>
 
506
<div class="variablelist"><table border="0">
 
507
<col align="left" valign="top">
 
508
<tbody>
 
509
<tr>
 
510
<td><p><span class="term"><em class="parameter"><code>full_texture</code></em> :</span></p></td>
 
511
<td> a <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a> to an existing texture
 
512
</td>
 
513
</tr>
 
514
<tr>
 
515
<td><p><span class="term"><em class="parameter"><code>sub_x</code></em> :</span></p></td>
 
516
<td> X coordinate of the top-left of the subregion
 
517
</td>
 
518
</tr>
 
519
<tr>
 
520
<td><p><span class="term"><em class="parameter"><code>sub_y</code></em> :</span></p></td>
 
521
<td> Y coordinate of the top-left of the subregion
 
522
</td>
 
523
</tr>
 
524
<tr>
 
525
<td><p><span class="term"><em class="parameter"><code>sub_width</code></em> :</span></p></td>
 
526
<td> Width in pixels of the subregion
 
527
</td>
 
528
</tr>
 
529
<tr>
 
530
<td><p><span class="term"><em class="parameter"><code>sub_height</code></em> :</span></p></td>
 
531
<td> Height in pixels of the subregion
 
532
</td>
 
533
</tr>
 
534
<tr>
 
535
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
536
<td> a <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a> to the new texture.
 
537
 
 
538
</td>
 
539
</tr>
 
540
</tbody>
 
541
</table></div>
 
542
<p class="since">Since 1.2</p>
 
543
</div>
 
544
<hr>
557
545
<div class="refsect2" title="cogl_is_texture ()">
558
546
<a name="cogl-is-texture"></a><h3>cogl_is_texture ()</h3>
559
 
<pre class="programlisting"><a
560
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
561
 
>gboolean</a>            cogl_is_texture                     (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);</pre>
 
547
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            cogl_is_texture                     (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);</pre>
562
548
<p>
563
549
Gets whether the given handle references an existing texture object.</p>
564
 
<p>
565
 
</p>
566
550
<div class="variablelist"><table border="0">
567
551
<col align="left" valign="top">
568
552
<tbody>
573
557
</tr>
574
558
<tr>
575
559
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
576
 
<td> <a
577
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
578
 
><code class="literal">TRUE</code></a> if the handle references a texture,
579
 
  <a
580
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
581
 
><code class="literal">FALSE</code></a> otherwise
 
560
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the handle references a texture, and
 
561
  <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
582
562
</td>
583
563
</tr>
584
564
</tbody>
587
567
<hr>
588
568
<div class="refsect2" title="cogl_texture_ref ()">
589
569
<a name="cogl-texture-ref"></a><h3>cogl_texture_ref ()</h3>
590
 
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          cogl_texture_ref                    (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);</pre>
 
570
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          cogl_texture_ref                    (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);</pre>
 
571
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
572
<h3 class="title">Warning</h3>
 
573
<p><code class="literal">cogl_texture_ref</code> has been deprecated since version 1.2 and should not be used in newly-written code. Use <a class="link" href="cogl-General-API.html#cogl-handle-ref" title="cogl_handle_ref ()"><code class="function">cogl_handle_ref()</code></a> instead</p>
 
574
</div>
591
575
<p>
592
576
Increment the reference count for a cogl texture.</p>
593
 
<p>
594
 
</p>
595
577
<div class="variablelist"><table border="0">
596
578
<col align="left" valign="top">
597
579
<tbody>
611
593
<hr>
612
594
<div class="refsect2" title="cogl_texture_unref ()">
613
595
<a name="cogl-texture-unref"></a><h3>cogl_texture_unref ()</h3>
614
 
<pre class="programlisting">void                cogl_texture_unref                  (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);</pre>
615
 
<p>
616
 
Deccrement the reference count for a cogl texture.</p>
617
 
<p>
618
 
</p>
 
596
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_texture_unref                  (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);</pre>
 
597
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
598
<h3 class="title">Warning</h3>
 
599
<p><code class="literal">cogl_texture_unref</code> has been deprecated since version 1.2 and should not be used in newly-written code. Use <a class="link" href="cogl-General-API.html#cogl-handle-unref" title="cogl_handle_unref ()"><code class="function">cogl_handle_unref()</code></a> instead</p>
 
600
</div>
 
601
<p>
 
602
Decrement the reference count for a cogl texture.</p>
619
603
<div class="variablelist"><table border="0">
620
604
<col align="left" valign="top">
621
605
<tbody><tr>
628
612
<hr>
629
613
<div class="refsect2" title="cogl_texture_get_width ()">
630
614
<a name="cogl-texture-get-width"></a><h3>cogl_texture_get_width ()</h3>
631
 
<pre class="programlisting"><a
632
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
633
 
>guint</a>               cogl_texture_get_width              (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);</pre>
634
 
<p>
635
 
Query the width of a cogl texture.</p>
636
 
<p>
637
 
</p>
 
615
<pre class="programlisting">unsigned <span class="returnvalue">int</span>        cogl_texture_get_width              (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);</pre>
 
616
<p>
 
617
Queries the width of a cogl texture.</p>
638
618
<div class="variablelist"><table border="0">
639
619
<col align="left" valign="top">
640
620
<tbody>
645
625
</tr>
646
626
<tr>
647
627
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
648
 
<td> the width of the GPU side texture in pixels:
 
628
<td> the width of the GPU side texture in pixels
649
629
</td>
650
630
</tr>
651
631
</tbody>
654
634
<hr>
655
635
<div class="refsect2" title="cogl_texture_get_height ()">
656
636
<a name="cogl-texture-get-height"></a><h3>cogl_texture_get_height ()</h3>
657
 
<pre class="programlisting"><a
658
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
659
 
>guint</a>               cogl_texture_get_height             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);</pre>
660
 
<p>
661
 
Query the height of a cogl texture.</p>
662
 
<p>
663
 
</p>
 
637
<pre class="programlisting">unsigned <span class="returnvalue">int</span>        cogl_texture_get_height             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);</pre>
 
638
<p>
 
639
Queries the height of a cogl texture.</p>
664
640
<div class="variablelist"><table border="0">
665
641
<col align="left" valign="top">
666
642
<tbody>
671
647
</tr>
672
648
<tr>
673
649
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
674
 
<td> the height of the GPU side texture in pixels:
 
650
<td> the height of the GPU side texture in pixels
675
651
</td>
676
652
</tr>
677
653
</tbody>
680
656
<hr>
681
657
<div class="refsect2" title="cogl_texture_get_format ()">
682
658
<a name="cogl-texture-get-format"></a><h3>cogl_texture_get_format ()</h3>
683
 
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a>     cogl_texture_get_format             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);</pre>
684
 
<p>
685
 
Query the <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> of a cogl texture.</p>
686
 
<p>
687
 
</p>
 
659
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a>     cogl_texture_get_format             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);</pre>
 
660
<p>
 
661
Queries the <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> of a cogl texture.</p>
688
662
<div class="variablelist"><table border="0">
689
663
<col align="left" valign="top">
690
664
<tbody>
695
669
</tr>
696
670
<tr>
697
671
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
698
 
<td> the <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> of the GPU side texture.
 
672
<td> the <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> of the GPU side texture
699
673
</td>
700
674
</tr>
701
675
</tbody>
704
678
<hr>
705
679
<div class="refsect2" title="cogl_texture_get_rowstride ()">
706
680
<a name="cogl-texture-get-rowstride"></a><h3>cogl_texture_get_rowstride ()</h3>
707
 
<pre class="programlisting"><a
708
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
709
 
>guint</a>               cogl_texture_get_rowstride          (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);</pre>
710
 
<p>
711
 
Query the rowstride of a cogl texture.</p>
712
 
<p>
713
 
</p>
 
681
<pre class="programlisting">unsigned <span class="returnvalue">int</span>        cogl_texture_get_rowstride          (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);</pre>
 
682
<p>
 
683
Queries the rowstride of a cogl texture.</p>
714
684
<div class="variablelist"><table border="0">
715
685
<col align="left" valign="top">
716
686
<tbody>
721
691
</tr>
722
692
<tr>
723
693
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
724
 
<td> the offset in bytes between each consequetive row of pixels.
 
694
<td> the offset in bytes between each consequetive row of pixels
725
695
</td>
726
696
</tr>
727
697
</tbody>
730
700
<hr>
731
701
<div class="refsect2" title="cogl_texture_get_max_waste ()">
732
702
<a name="cogl-texture-get-max-waste"></a><h3>cogl_texture_get_max_waste ()</h3>
733
 
<pre class="programlisting"><a
734
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
735
 
>gint</a>                cogl_texture_get_max_waste          (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);</pre>
 
703
<pre class="programlisting"><span class="returnvalue">int</span>                 cogl_texture_get_max_waste          (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);</pre>
736
704
<p>
737
 
Query the maximum wasted (unused) pixels in one dimension of a GPU side
 
705
Queries the maximum wasted (unused) pixels in one dimension of a GPU side
738
706
texture.</p>
739
 
<p>
740
 
</p>
741
707
<div class="variablelist"><table border="0">
742
708
<col align="left" valign="top">
743
709
<tbody>
748
714
</tr>
749
715
<tr>
750
716
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
751
 
<td> the maximum waste.
 
717
<td> the maximum waste
752
718
</td>
753
719
</tr>
754
720
</tbody>
757
723
<hr>
758
724
<div class="refsect2" title="cogl_texture_is_sliced ()">
759
725
<a name="cogl-texture-is-sliced"></a><h3>cogl_texture_is_sliced ()</h3>
760
 
<pre class="programlisting"><a
761
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
762
 
>gboolean</a>            cogl_texture_is_sliced              (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);</pre>
 
726
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            cogl_texture_is_sliced              (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);</pre>
763
727
<p>
764
 
Query if a texture is sliced (stored as multiple GPU side tecture
 
728
Queries if a texture is sliced (stored as multiple GPU side tecture
765
729
objects).</p>
766
 
<p>
767
 
</p>
768
730
<div class="variablelist"><table border="0">
769
731
<col align="left" valign="top">
770
732
<tbody>
775
737
</tr>
776
738
<tr>
777
739
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
778
 
<td> <a
779
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
780
 
><code class="literal">TRUE</code></a> if the texture is sliced, <a
781
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
782
 
><code class="literal">FALSE</code></a> if the texture
783
 
is stored as a single GPU texture.
 
740
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the texture is sliced, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the texture
 
741
  is stored as a single GPU texture
784
742
</td>
785
743
</tr>
786
744
</tbody>
789
747
<hr>
790
748
<div class="refsect2" title="cogl_texture_get_gl_texture ()">
791
749
<a name="cogl-texture-get-gl-texture"></a><h3>cogl_texture_get_gl_texture ()</h3>
792
 
<pre class="programlisting"><a
793
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
794
 
>gboolean</a>            cogl_texture_get_gl_texture         (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle,
795
 
                                                         GLuint *out_gl_handle,
796
 
                                                         GLenum *out_gl_target);</pre>
797
 
<p>
798
 
Query the GL handles for a GPU side texture through it's <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a>,
799
 
if the texture is spliced the data for the first sub texture will be
 
750
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            cogl_texture_get_gl_texture         (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle,
 
751
                                                         <span class="returnvalue">GLuint</span> *out_gl_handle,
 
752
                                                         <span class="returnvalue">GLenum</span> *out_gl_target);</pre>
 
753
<p>
 
754
Queries the GL handles for a GPU side texture through its <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a>.
 
755
</p>
 
756
<p>
 
757
If the texture is spliced the data for the first sub texture will be
800
758
queried.</p>
801
 
<p>
802
 
</p>
803
759
<div class="variablelist"><table border="0">
804
760
<col align="left" valign="top">
805
761
<tbody>
818
774
</tr>
819
775
<tr>
820
776
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
821
 
<td> <a
822
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
823
 
><code class="literal">TRUE</code></a> if the handle was successfully retrieved <a
824
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
825
 
><code class="literal">FALSE</code></a>
826
 
if the handle was invalid.
 
777
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the handle was successfully retrieved, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
 
778
  if the handle was invalid
827
779
</td>
828
780
</tr>
829
781
</tbody>
832
784
<hr>
833
785
<div class="refsect2" title="cogl_texture_get_data ()">
834
786
<a name="cogl-texture-get-data"></a><h3>cogl_texture_get_data ()</h3>
835
 
<pre class="programlisting"><a
836
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
837
 
>gint</a>                cogl_texture_get_data               (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle,
838
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> format,
839
 
                                                         <a
840
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
841
 
>guint</a> rowstride,
842
 
                                                         <a
843
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"
844
 
>guchar</a> *data);</pre>
845
 
<p>
846
 
Copy the pixel data from a cogl texture to system memory.</p>
847
 
<p>
848
 
</p>
 
787
<pre class="programlisting"><span class="returnvalue">int</span>                 cogl_texture_get_data               (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle,
 
788
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> format,
 
789
                                                         unsigned <span class="returnvalue">int</span> rowstride,
 
790
                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> *data);</pre>
 
791
<p>
 
792
Copies the pixel data from a cogl texture to system memory.</p>
849
793
<div class="variablelist"><table border="0">
850
794
<col align="left" valign="top">
851
795
<tbody>
867
811
</tr>
868
812
<tr>
869
813
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
870
 
<td> memory location to write contents of buffer, or <a
871
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
872
 
><code class="literal">NULL</code></a> if we're
 
814
<td> memory location to write contents of buffer, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if we're
873
815
only querying the data size through the return value.
874
816
</td>
875
817
</tr>
876
818
<tr>
877
819
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
878
 
<td> the size of the texture data in bytes (or 0 if the texture
879
 
is not valid.)
 
820
<td> the size of the texture data in bytes, or 0 if the texture
 
821
  is not valid
880
822
</td>
881
823
</tr>
882
824
</tbody>
885
827
<hr>
886
828
<div class="refsect2" title="cogl_texture_set_region ()">
887
829
<a name="cogl-texture-set-region"></a><h3>cogl_texture_set_region ()</h3>
888
 
<pre class="programlisting"><a
889
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
890
 
>gboolean</a>            cogl_texture_set_region             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle,
891
 
                                                         <a
892
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
893
 
>gint</a> src_x,
894
 
                                                         <a
895
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
896
 
>gint</a> src_y,
897
 
                                                         <a
898
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
899
 
>gint</a> dst_x,
900
 
                                                         <a
901
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
902
 
>gint</a> dst_y,
903
 
                                                         <a
904
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
905
 
>guint</a> dst_width,
906
 
                                                         <a
907
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
908
 
>guint</a> dst_height,
909
 
                                                         <a
910
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
911
 
>gint</a> width,
912
 
                                                         <a
913
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
914
 
>gint</a> height,
915
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> format,
916
 
                                                         <a
917
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
918
 
>guint</a> rowstride,
919
 
                                                         const <a
920
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"
921
 
>guchar</a> *data);</pre>
 
830
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            cogl_texture_set_region             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle,
 
831
                                                         <span class="returnvalue">int</span> src_x,
 
832
                                                         <span class="returnvalue">int</span> src_y,
 
833
                                                         <span class="returnvalue">int</span> dst_x,
 
834
                                                         <span class="returnvalue">int</span> dst_y,
 
835
                                                         unsigned <span class="returnvalue">int</span> dst_width,
 
836
                                                         unsigned <span class="returnvalue">int</span> dst_height,
 
837
                                                         <span class="returnvalue">int</span> width,
 
838
                                                         <span class="returnvalue">int</span> height,
 
839
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> format,
 
840
                                                         unsigned <span class="returnvalue">int</span> rowstride,
 
841
                                                         const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> *data);</pre>
922
842
<p>
923
843
Sets the pixels in a rectangular subregion of <em class="parameter"><code>handle</code></em> from an in-memory
924
844
buffer containing pixel data.</p>
925
 
<p>
926
 
</p>
927
845
<div class="variablelist"><table border="0">
928
846
<col align="left" valign="top">
929
847
<tbody>
990
908
</tr>
991
909
<tr>
992
910
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
993
 
<td> <a
994
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
995
 
><code class="literal">TRUE</code></a> if the subregion upload was successful, otherwise <a
996
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
997
 
><code class="literal">FALSE</code></a>.
 
911
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the subregion upload was successful, and
 
912
  <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
998
913
</td>
999
914
</tr>
1000
915
</tbody>
1004
919
</div>
1005
920
<div class="footer">
1006
921
<hr>
1007
 
          Generated by GTK-Doc V1.11</div>
 
922
          Generated by GTK-Doc V1.13</div>
1008
923
</body>
1009
 
</html>
 
924
</html>
 
 
b'\\ No newline at end of file'