This file is indexed.

/usr/share/gtk-doc/html/cogl-2.0-experimental/cogl-2.0-experimental-The-Texture-Interface.html is in libcogl-doc 1.22.2-2.

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

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>The Texture Interface: Cogl 2.0 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Cogl 2.0 Reference Manual">
<link rel="up" href="cogl-textures.html" title="Textures">
<link rel="prev" href="cogl-2.0-experimental-Bitmap.html" title="Bitmap">
<link rel="next" href="cogl-meta-textures.html" title="Meta Textures">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#cogl-2.0-experimental-The-Texture-Interface.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="cogl-textures.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="cogl-2.0-experimental-Bitmap.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="cogl-meta-textures.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="cogl-2.0-experimental-The-Texture-Interface"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="cogl-2.0-experimental-The-Texture-Interface.top_of_page"></a>The Texture Interface</span></h2>
<p>The Texture Interface — Functions for creating and manipulating textures</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="cogl-2.0-experimental-The-Texture-Interface.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-is-texture" title="cogl_is_texture ()">cogl_is_texture</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-allocate" title="cogl_texture_allocate ()">cogl_texture_allocate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">unsigned <span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-get-width" title="cogl_texture_get_width ()">cogl_texture_get_width</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">unsigned <span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-get-height" title="cogl_texture_get_height ()">cogl_texture_get_height</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-is-sliced" title="cogl_texture_is_sliced ()">cogl_texture_is_sliced</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-get-data" title="cogl_texture_get_data ()">cogl_texture_get_data</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-set-data" title="cogl_texture_set_data ()">cogl_texture_set_data</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-set-region" title="cogl_texture_set_region ()">cogl_texture_set_region</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-set-components" title="cogl_texture_set_components ()">cogl_texture_set_components</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTextureComponents" title="enum CoglTextureComponents"><span class="returnvalue">CoglTextureComponents</span></a>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-get-components" title="cogl_texture_get_components ()">cogl_texture_get_components</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-set-premultiplied" title="cogl_texture_set_premultiplied ()">cogl_texture_set_premultiplied</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>
</td>
<td class="function_name">
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-get-premultiplied" title="cogl_texture_get_premultiplied ()">cogl_texture_get_premultiplied</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-The-Texture-Interface.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture">CoglTexture</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#COGL-TEXTURE-ERROR:CAPS" title="COGL_TEXTURE_ERROR">COGL_TEXTURE_ERROR</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTextureError" title="enum CoglTextureError">CoglTextureError</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTextureType" title="enum CoglTextureType">CoglTextureType</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTextureComponents" title="enum CoglTextureComponents">CoglTextureComponents</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-The-Texture-Interface.description"></a><h2>Description</h2>
<p>Cogl allows creating and manipulating textures using a uniform
API that tries to hide all the various complexities of creating,
loading and manipulating textures.</p>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-The-Texture-Interface.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="cogl-is-texture"></a><h3>cogl_is_texture ()</h3>
<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 (<em class="parameter"><code><span class="type">void</span> *object</code></em>);</pre>
<p>Gets whether the given object references a texture object.</p>
<div class="refsect3">
<a name="cogl-is-texture.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p>A <a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a> pointer</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cogl-is-texture.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the <em class="parameter"><code>object</code></em>
references a texture, and
<code class="literal">FALSE</code> otherwise</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-texture-allocate"></a><h3>cogl_texture_allocate ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>
cogl_texture_allocate (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>,
                       <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Exception-handling.html#CoglError" title="CoglError"><span class="type">CoglError</span></a> **error</code></em>);</pre>
<p>Explicitly allocates the storage for the given <em class="parameter"><code>texture</code></em>
 which
allows you to be sure that there is enough memory for the
texture and if not then the error can be handled gracefully.</p>
<div class="note">Normally applications don't need to use this api directly
since the texture will be implicitly allocated when data is set on
the texture, or if the texture is attached to a <a class="link" href="cogl-2.0-experimental-Offscreen-Framebuffers.html#CoglOffscreen" title="CoglOffscreen"><span class="type">CoglOffscreen</span></a>
framebuffer and rendered too.</div>
<div class="refsect3">
<a name="cogl-texture-allocate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>texture</p></td>
<td class="parameter_description"><p>A <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>A <a class="link" href="cogl-2.0-experimental-Exception-handling.html#CoglError" title="CoglError"><span class="type">CoglError</span></a> to return exceptional errors or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cogl-texture-allocate.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the texture was successfully allocated,
otherwise <code class="literal">FALSE</code> and <em class="parameter"><code>error</code></em>
will be updated if it
wasn't <code class="literal">NULL</code>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-texture-get-width"></a><h3>cogl_texture_get_width ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">int</span>
cogl_texture_get_width (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>);</pre>
<p>Queries the width of a cogl texture.</p>
<div class="refsect3">
<a name="cogl-texture-get-width.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>texture</p></td>
<td class="parameter_description"><p>a <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> pointer.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cogl-texture-get-width.returns"></a><h4>Returns</h4>
<p> the width of the GPU side texture in pixels</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-texture-get-height"></a><h3>cogl_texture_get_height ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">int</span>
cogl_texture_get_height (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>);</pre>
<p>Queries the height of a cogl texture.</p>
<div class="refsect3">
<a name="cogl-texture-get-height.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>texture</p></td>
<td class="parameter_description"><p>a <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> pointer.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cogl-texture-get-height.returns"></a><h4>Returns</h4>
<p> the height of the GPU side texture in pixels</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-texture-is-sliced"></a><h3>cogl_texture_is_sliced ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>
cogl_texture_is_sliced (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>);</pre>
<p>Queries if a texture is sliced (stored as multiple GPU side tecture
objects).</p>
<div class="refsect3">
<a name="cogl-texture-is-sliced.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>texture</p></td>
<td class="parameter_description"><p>a <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> pointer.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cogl-texture-is-sliced.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the texture is sliced, <code class="literal">FALSE</code> if the texture
is stored as a single GPU texture</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-texture-get-data"></a><h3>cogl_texture_get_data ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
cogl_texture_get_data (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>,
                       <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> format</code></em>,
                       <em class="parameter"><code>unsigned <span class="type">int</span> rowstride</code></em>,
                       <em class="parameter"><code><span class="type">uint8_t</span> *data</code></em>);</pre>
<p>Copies the pixel data from a cogl texture to system memory.</p>
<div class="note">Don't pass the value of <code class="function">cogl_texture_get_rowstride()</code> as the
<em class="parameter"><code>rowstride</code></em> argument, the rowstride should be the rowstride you
want for the destination <em class="parameter"><code>data</code></em> buffer not the rowstride of the
source texture</div>
<div class="refsect3">
<a name="cogl-texture-get-data.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>texture</p></td>
<td class="parameter_description"><p>a <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> pointer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>the <a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> to store the texture as.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>rowstride</p></td>
<td class="parameter_description"><p>the rowstride of <em class="parameter"><code>data</code></em>
in bytes or pass 0 to calculate
from the bytes-per-pixel of <em class="parameter"><code>format</code></em>
multiplied by the
<em class="parameter"><code>texture</code></em>
width.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>memory location to write the <em class="parameter"><code>texture</code></em>
's contents, or <code class="literal">NULL</code>
to only query the data size through the return value.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cogl-texture-get-data.returns"></a><h4>Returns</h4>
<p> the size of the texture data in bytes</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-texture-set-data"></a><h3>cogl_texture_set_data ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>
cogl_texture_set_data (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>,
                       <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> format</code></em>,
                       <em class="parameter"><code><span class="type">int</span> rowstride</code></em>,
                       <em class="parameter"><code>const <span class="type">uint8_t</span> *data</code></em>,
                       <em class="parameter"><code><span class="type">int</span> level</code></em>,
                       <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Exception-handling.html#CoglError" title="CoglError"><span class="type">CoglError</span></a> **error</code></em>);</pre>
<p>Sets all the pixels for a given mipmap <em class="parameter"><code>level</code></em>
 by copying the pixel
data pointed to by the <em class="parameter"><code>data</code></em>
 argument into the given <em class="parameter"><code>texture</code></em>
.</p>
<p><em class="parameter"><code>data</code></em>
 should point to the first pixel to copy corresponding
to the top left of the mipmap <em class="parameter"><code>level</code></em>
 being set.</p>
<p>If <em class="parameter"><code>rowstride</code></em>
 equals 0 then it will be automatically calculated
from the width of the mipmap level and the bytes-per-pixel for the
given <em class="parameter"><code>format</code></em>
.</p>
<p>A mipmap <em class="parameter"><code>level</code></em>
 of 0 corresponds to the largest, base image of a
texture and <em class="parameter"><code>level</code></em>
 1 is half the width and height of level 0. If
dividing any dimension of the previous level by two results in a
fraction then round the number down (<code class="function">floor()</code>), but clamp to 1
something like this:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting">next_width <span class="gtkdoc opt">=</span> <span class="function">MAX</span> <span class="gtkdoc opt">(</span><span class="number">1</span><span class="gtkdoc opt">,</span> <span class="function">floor</span> <span class="gtkdoc opt">(</span>prev_width<span class="gtkdoc opt">));</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>You can determine the number of mipmap levels for a given texture
like this:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting">n_levels <span class="gtkdoc opt">=</span> <span class="number">1</span> <span class="gtkdoc opt">+</span> <span class="function">floor</span> <span class="gtkdoc opt">(</span><span class="function">log2</span> <span class="gtkdoc opt">(</span>max_dimension<span class="gtkdoc opt">));</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>Where <code class="literal">max_dimension</code> is the larger of <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-get-width" title="cogl_texture_get_width ()"><code class="function">cogl_texture_get_width()</code></a> and
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-get-height" title="cogl_texture_get_height ()"><code class="function">cogl_texture_get_height()</code></a>.</p>
<p>It is an error to pass a <em class="parameter"><code>level</code></em>
 number &gt;= the number of levels that
<em class="parameter"><code>texture</code></em>
 can have according to the above calculation.</p>
<div class="note">Since the storage for a <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> is allocated lazily then
if the given <em class="parameter"><code>texture</code></em> has not previously been allocated then this
api can return <code class="literal">FALSE</code> and throw an exceptional <em class="parameter"><code>error</code></em> if there is
not enough memory to allocate storage for <em class="parameter"><code>texture</code></em>.</div>
<div class="refsect3">
<a name="cogl-texture-set-data.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>the <a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> used in the source <em class="parameter"><code>data</code></em>
buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>rowstride</p></td>
<td class="parameter_description"><p>rowstride of the source <em class="parameter"><code>data</code></em>
buffer (computed from
the texture width and <em class="parameter"><code>format</code></em>
if it equals 0)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>the source data, pointing to the first top-left pixel to set</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>level</p></td>
<td class="parameter_description"><p>The mipmap level to update (Normally 0 for the largest,
base texture)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>A <a class="link" href="cogl-2.0-experimental-Exception-handling.html#CoglError" title="CoglError"><span class="type">CoglError</span></a> to return exceptional errors</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cogl-texture-set-data.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the data upload was successful, and
<code class="literal">FALSE</code> otherwise</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-texture-set-region"></a><h3>cogl_texture_set_region ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>
cogl_texture_set_region (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>,
                         <em class="parameter"><code><span class="type">int</span> src_x</code></em>,
                         <em class="parameter"><code><span class="type">int</span> src_y</code></em>,
                         <em class="parameter"><code><span class="type">int</span> dst_x</code></em>,
                         <em class="parameter"><code><span class="type">int</span> dst_y</code></em>,
                         <em class="parameter"><code>unsigned <span class="type">int</span> dst_width</code></em>,
                         <em class="parameter"><code>unsigned <span class="type">int</span> dst_height</code></em>,
                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
                         <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> format</code></em>,
                         <em class="parameter"><code>unsigned <span class="type">int</span> rowstride</code></em>,
                         <em class="parameter"><code>const <span class="type">uint8_t</span> *data</code></em>);</pre>
<p>Sets the pixels in a rectangular subregion of <em class="parameter"><code>texture</code></em>
 from an in-memory
buffer containing pixel data.</p>
<div class="note">The region set can't be larger than the source <em class="parameter"><code>data</code></em>
</div>
<div class="refsect3">
<a name="cogl-texture-set-region.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>texture</p></td>
<td class="parameter_description"><p>a <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src_x</p></td>
<td class="parameter_description"><p>upper left coordinate to use from source data.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>src_y</p></td>
<td class="parameter_description"><p>upper left coordinate to use from source data.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dst_x</p></td>
<td class="parameter_description"><p>upper left destination horizontal coordinate.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dst_y</p></td>
<td class="parameter_description"><p>upper left destination vertical coordinate.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dst_width</p></td>
<td class="parameter_description"><p>width of destination region to write. (Must be less
than or equal to <em class="parameter"><code>width</code></em>
)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dst_height</p></td>
<td class="parameter_description"><p>height of destination region to write. (Must be less
than or equal to <em class="parameter"><code>height</code></em>
)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>width of source data buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>height of source data buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>the <a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> used in the source buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>rowstride</p></td>
<td class="parameter_description"><p>rowstride of source buffer (computed from width if none
specified)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>the actual pixel data.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cogl-texture-set-region.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the subregion upload was successful, and
<code class="literal">FALSE</code> otherwise</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cogl-texture-set-components"></a><h3>cogl_texture_set_components ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
cogl_texture_set_components (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>,
                             <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTextureComponents" title="enum CoglTextureComponents"><span class="type">CoglTextureComponents</span></a> components</code></em>);</pre>
<p>Affects the internal storage format for this texture by specifying
what components will be required for sampling later.</p>
<p>This api affects how data is uploaded to the GPU since unused
components can potentially be discarded from source data.</p>
<p>For textures created by the ‘_with_size’ constructors the default
is <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#COGL-TEXTURE-COMPONENTS-RGBA:CAPS"><code class="literal">COGL_TEXTURE_COMPONENTS_RGBA</code></a>. The other constructors which take
a <a class="link" href="cogl-2.0-experimental-Bitmap.html#CoglBitmap" title="CoglBitmap"><code class="literal">CoglBitmap</code></a> or a data pointer default to the same components as
the pixel format of the data.</p>
<p>Note that the <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#COGL-TEXTURE-COMPONENTS-RG:CAPS"><code class="literal">COGL_TEXTURE_COMPONENTS_RG</code></a> format is not available
on all drivers. The availability can be determined by checking for
the <a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#COGL-FEATURE-ID-TEXTURE-RG:CAPS"><code class="literal">COGL_FEATURE_ID_TEXTURE_RG</code></a> feature. If this format is used on
a driver where it is not available then <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#COGL-TEXTURE-ERROR-FORMAT:CAPS"><code class="literal">COGL_TEXTURE_ERROR_FORMAT</code></a>
will be raised when the texture is allocated. Even if the feature
is not available then <a class="link" href="cogl-2.0-experimental-Common-Types.html#COGL-PIXEL-FORMAT-RG-88:CAPS"><code class="literal">COGL_PIXEL_FORMAT_RG_88</code></a> can still be used as
an image format as long as <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#COGL-TEXTURE-COMPONENTS-RG:CAPS"><code class="literal">COGL_TEXTURE_COMPONENTS_RG</code></a> isn't used
as the texture's components.</p>
<div class="refsect3">
<a name="cogl-texture-set-components.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>texture</p></td>
<td class="parameter_description"><p>a <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> pointer.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 1.18</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-texture-get-components"></a><h3>cogl_texture_get_components ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTextureComponents" title="enum CoglTextureComponents"><span class="returnvalue">CoglTextureComponents</span></a>
cogl_texture_get_components (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>);</pre>
<p>Queries what components the given <em class="parameter"><code>texture</code></em>
 stores internally as set
via <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-set-components" title="cogl_texture_set_components ()"><code class="function">cogl_texture_set_components()</code></a>.</p>
<p>For textures created by the ‘_with_size’ constructors the default
is <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#COGL-TEXTURE-COMPONENTS-RGBA:CAPS"><code class="literal">COGL_TEXTURE_COMPONENTS_RGBA</code></a>. The other constructors which take
a <a class="link" href="cogl-2.0-experimental-Bitmap.html#CoglBitmap" title="CoglBitmap"><code class="literal">CoglBitmap</code></a> or a data pointer default to the same components as
the pixel format of the data.</p>
<div class="refsect3">
<a name="cogl-texture-get-components.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>texture</p></td>
<td class="parameter_description"><p>a <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> pointer.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 1.18</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-texture-set-premultiplied"></a><h3>cogl_texture_set_premultiplied ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
cogl_texture_set_premultiplied (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>,
                                <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="type">CoglBool</span></a> premultiplied</code></em>);</pre>
<p>Affects the internal storage format for this texture by specifying
whether red, green and blue color components should be stored as
pre-multiplied alpha values.</p>
<p>This api affects how data is uploaded to the GPU since Cogl will
convert source data to have premultiplied or unpremultiplied
components according to this state.</p>
<p>For example if you create a texture via
<a class="link" href="cogl-2.0-experimental-2D-textures.html#cogl-texture-2d-new-with-size" title="cogl_texture_2d_new_with_size ()"><code class="function">cogl_texture_2d_new_with_size()</code></a> and then upload data via
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-set-data" title="cogl_texture_set_data ()"><code class="function">cogl_texture_set_data()</code></a> passing a source format of
<a class="link" href="cogl-2.0-experimental-Common-Types.html#COGL-PIXEL-FORMAT-RGBA-8888:CAPS"><code class="literal">COGL_PIXEL_FORMAT_RGBA_8888</code></a> then Cogl will internally multiply the
red, green and blue components of the source data by the alpha
component, for each pixel so that the internally stored data has
pre-multiplied alpha components. If you instead upload data that
already has pre-multiplied components by passing
<a class="link" href="cogl-2.0-experimental-Common-Types.html#COGL-PIXEL-FORMAT-RGBA-8888-PRE:CAPS"><code class="literal">COGL_PIXEL_FORMAT_RGBA_8888_PRE</code></a> as the source format to
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-set-data" title="cogl_texture_set_data ()"><code class="function">cogl_texture_set_data()</code></a> then the data can be uploaded without being
converted.</p>
<p>By default the <em class="parameter"><code>premultipled</code></em>
 state is <em class="parameter"><code>TRUE</code></em>
.</p>
<div class="refsect3">
<a name="cogl-texture-set-premultiplied.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>texture</p></td>
<td class="parameter_description"><p>a <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> pointer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>premultiplied</p></td>
<td class="parameter_description"><p>Whether any internally stored red, green or blue
components are pre-multiplied by an alpha
component.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.18</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-texture-get-premultiplied"></a><h3>cogl_texture_get_premultiplied ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>
cogl_texture_get_premultiplied (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>);</pre>
<p>Queries the pre-multiplied alpha status for internally stored red,
green and blue components for the given <em class="parameter"><code>texture</code></em>
 as set by
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-set-premultiplied" title="cogl_texture_set_premultiplied ()"><code class="function">cogl_texture_set_premultiplied()</code></a>.</p>
<p>By default the pre-multipled state is <em class="parameter"><code>TRUE</code></em>
.</p>
<div class="refsect3">
<a name="cogl-texture-get-premultiplied.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>texture</p></td>
<td class="parameter_description"><p>a <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> pointer.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cogl-texture-get-premultiplied.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if red, green and blue components are
internally stored pre-multiplied by the alpha
value or <code class="literal">FALSE</code> if not.</p>
</div>
<p class="since">Since: 1.18</p>
</div>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-The-Texture-Interface.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="CoglTexture"></a><h3>CoglTexture</h3>
<pre class="programlisting">typedef void CoglTexture;
</pre>
</div>
<hr>
<div class="refsect2">
<a name="COGL-TEXTURE-ERROR:CAPS"></a><h3>COGL_TEXTURE_ERROR</h3>
<pre class="programlisting">#define COGL_TEXTURE_ERROR (cogl_texture_error_quark ())
</pre>
<p><a class="link" href="cogl-2.0-experimental-Exception-handling.html#CoglError" title="CoglError"><span class="type">CoglError</span></a> domain for texture errors.</p>
<p class="since">Since: 1.8</p>
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
give outside developers early access to new or rapidly changing technology, or
to provide an interim solution to a problem where a more general solution is
anticipated. No claims are made about either source or binary compatibility from
one minor release to the next.

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

Given such caveats, customer impact need not be a factor when considering
incompatible changes to an Unstable interface in a major or minor release.
Nonetheless, when such changes are introduced, the changes should still be
mentioned in the release notes for the affected release.
"><span class="acronym">Unstable</span></acronym></p>
</div>
<hr>
<div class="refsect2">
<a name="CoglTextureError"></a><h3>enum CoglTextureError</h3>
<p>Error codes that can be thrown when allocating textures.</p>
<div class="refsect3">
<a name="CoglTextureError.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="COGL-TEXTURE-ERROR-SIZE:CAPS"></a>COGL_TEXTURE_ERROR_SIZE</p></td>
<td class="enum_member_description">
<p>Unsupported size</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="COGL-TEXTURE-ERROR-FORMAT:CAPS"></a>COGL_TEXTURE_ERROR_FORMAT</p></td>
<td class="enum_member_description">
<p>Unsupported format</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="COGL-TEXTURE-ERROR-BAD-PARAMETER:CAPS"></a>COGL_TEXTURE_ERROR_BAD_PARAMETER</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="COGL-TEXTURE-ERROR-TYPE:CAPS"></a>COGL_TEXTURE_ERROR_TYPE</p></td>
<td class="enum_member_description">
<p>A primitive texture type that is
  unsupported by the driver was used</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.8</p>
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
give outside developers early access to new or rapidly changing technology, or
to provide an interim solution to a problem where a more general solution is
anticipated. No claims are made about either source or binary compatibility from
one minor release to the next.

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

Given such caveats, customer impact need not be a factor when considering
incompatible changes to an Unstable interface in a major or minor release.
Nonetheless, when such changes are introduced, the changes should still be
mentioned in the release notes for the affected release.
"><span class="acronym">Unstable</span></acronym></p>
</div>
<hr>
<div class="refsect2">
<a name="CoglTextureType"></a><h3>enum CoglTextureType</h3>
<p>Constants representing the underlying hardware texture type of a
<a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a>.</p>
<div class="refsect3">
<a name="CoglTextureType.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="COGL-TEXTURE-TYPE-2D:CAPS"></a>COGL_TEXTURE_TYPE_2D</p></td>
<td class="enum_member_description">
<p>A <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a></p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="COGL-TEXTURE-TYPE-3D:CAPS"></a>COGL_TEXTURE_TYPE_3D</p></td>
<td class="enum_member_description">
<p>A <a class="link" href="cogl-2.0-experimental-3D-textures.html#CoglTexture3D" title="CoglTexture3D"><span class="type">CoglTexture3D</span></a></p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="COGL-TEXTURE-TYPE-RECTANGLE:CAPS"></a>COGL_TEXTURE_TYPE_RECTANGLE</p></td>
<td class="enum_member_description">
<p>A <a class="link" href="cogl-2.0-experimental-Rectangle-textures-(non-normalized-coordinates).html#CoglTextureRectangle" title="CoglTextureRectangle"><span class="type">CoglTextureRectangle</span></a></p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.10</p>
<p class="stability">Stability Level: <acronym title="Unstable interfaces are experimental or transitional. They are typically used to
give outside developers early access to new or rapidly changing technology, or
to provide an interim solution to a problem where a more general solution is
anticipated. No claims are made about either source or binary compatibility from
one minor release to the next.

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

Given such caveats, customer impact need not be a factor when considering
incompatible changes to an Unstable interface in a major or minor release.
Nonetheless, when such changes are introduced, the changes should still be
mentioned in the release notes for the affected release.
"><span class="acronym">Unstable</span></acronym></p>
</div>
<hr>
<div class="refsect2">
<a name="CoglTextureComponents"></a><h3>enum CoglTextureComponents</h3>
<p>See <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#cogl-texture-set-components" title="cogl_texture_set_components ()"><code class="function">cogl_texture_set_components()</code></a>.</p>
<div class="refsect3">
<a name="CoglTextureComponents.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="COGL-TEXTURE-COMPONENTS-A:CAPS"></a>COGL_TEXTURE_COMPONENTS_A</p></td>
<td class="enum_member_description">
<p>Only the alpha component</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="COGL-TEXTURE-COMPONENTS-RG:CAPS"></a>COGL_TEXTURE_COMPONENTS_RG</p></td>
<td class="enum_member_description">
<p>Red and green components. Note that
  this can only be used if the <a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#COGL-FEATURE-ID-TEXTURE-RG:CAPS"><code class="literal">COGL_FEATURE_ID_TEXTURE_RG</code></a> feature
  is advertised.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="COGL-TEXTURE-COMPONENTS-RGB:CAPS"></a>COGL_TEXTURE_COMPONENTS_RGB</p></td>
<td class="enum_member_description">
<p>Red, green and blue components</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="COGL-TEXTURE-COMPONENTS-RGBA:CAPS"></a>COGL_TEXTURE_COMPONENTS_RGBA</p></td>
<td class="enum_member_description">
<p>Red, green, blue and alpha components</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="COGL-TEXTURE-COMPONENTS-DEPTH:CAPS"></a>COGL_TEXTURE_COMPONENTS_DEPTH</p></td>
<td class="enum_member_description">
<p>Only a depth component</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 1.18</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>