sync
[gir-1.1] / Cogl-1.0.gir
1 <?xml version="1.0"?>
2 <!-- This file was automatically generated from C sources - DO NOT EDIT!
3 To affect the contents of this file, edit the original C definitions,
4 and/or use gtk-doc annotations.  -->
5 <repository version="1.1"
6             xmlns="http://www.gtk.org/introspection/core/1.0"
7             xmlns:c="http://www.gtk.org/introspection/c/1.0"
8             xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
9   <include name="GL" version="1.0"/>
10   <include name="GLib" version="2.0"/>
11   <include name="GObject" version="2.0"/>
12   <package name="gobject-2.0"/>
13   <c:include name="cogl/cogl.h"/>
14   <namespace name="Cogl" version="1.0" shared-library="libclutter-glx-1.0.so.0" c:prefix="Cogl">
15     <alias name="Angle" target="int32" c:type="CoglAngle"/>
16     <alias name="Fixed" target="int32" c:type="CoglFixed"/>
17     <alias name="Handle" target="any" c:type="CoglHandle"/>
18     <constant name="AFIRST_BIT" value="64">
19       <type name="int"/>
20     </constant>
21     <constant name="A_BIT" value="16">
22       <type name="int"/>
23     </constant>
24     <enumeration name="AttributeType"
25                  version="1.0"
26                  glib:type-name="CoglAttributeType"
27                  glib:get-type="cogl_attribute_type_get_type"
28                  c:type="CoglAttributeType">
29       <doc xml:whitespace="preserve">Data types for the components of cogl_vertex_buffer_add()</doc>
30       <member name="byte"
31               value="5120"
32               c:identifier="COGL_ATTRIBUTE_TYPE_BYTE"
33               glib:nick="byte"/>
34       <member name="unsigned_byte"
35               value="5121"
36               c:identifier="COGL_ATTRIBUTE_TYPE_UNSIGNED_BYTE"
37               glib:nick="unsigned-byte"/>
38       <member name="short"
39               value="5122"
40               c:identifier="COGL_ATTRIBUTE_TYPE_SHORT"
41               glib:nick="short"/>
42       <member name="unsigned_short"
43               value="5123"
44               c:identifier="COGL_ATTRIBUTE_TYPE_UNSIGNED_SHORT"
45               glib:nick="unsigned-short"/>
46       <member name="float"
47               value="5126"
48               c:identifier="COGL_ATTRIBUTE_TYPE_FLOAT"
49               glib:nick="float"/>
50     </enumeration>
51     <constant name="BGR_BIT" value="32">
52       <type name="int"/>
53     </constant>
54     <record name="Bitmap" c:type="CoglBitmap">
55       <constructor name="new_from_file"
56                    c:identifier="cogl_bitmap_new_from_file"
57                    version="1.0"
58                    throws="1">
59         <doc xml:whitespace="preserve">Loads an image file from disk. This function can be safely called from
60 within a thread.
61 %NULL if loading the image failed.</doc>
62         <return-value transfer-ownership="full">
63           <doc xml:whitespace="preserve">a #CoglBitmap to the new loaded image data, or</doc>
64           <type name="Bitmap" c:type="CoglBitmap*"/>
65         </return-value>
66         <parameters>
67           <parameter name="filename" transfer-ownership="none">
68             <doc xml:whitespace="preserve">the file to load.</doc>
69             <type name="utf8" c:type="char*"/>
70           </parameter>
71         </parameters>
72       </constructor>
73     </record>
74     <enumeration name="BitmapError"
75                  version="1.4"
76                  glib:type-name="CoglBitmapError"
77                  glib:get-type="cogl_bitmap_error_get_type"
78                  c:type="CoglBitmapError"
79                  glib:error-quark="cogl_bitmap_error_quark">
80       <doc xml:whitespace="preserve">Error codes that can be thrown when performing bitmap
81 operations. Note that gdk_pixbuf_new_from_file() can also throw
82 errors directly from the underlying image loading library. For
83 example, if GdkPixbuf is used then errors #GdkPixbufError&lt;!-- --&gt;s
84 will be used directly.</doc>
85       <member name="failed"
86               value="0"
87               c:identifier="COGL_BITMAP_ERROR_FAILED"
88               glib:nick="failed"/>
89       <member name="unknown_type"
90               value="1"
91               c:identifier="COGL_BITMAP_ERROR_UNKNOWN_TYPE"
92               glib:nick="unknown-type"/>
93       <member name="corrupt_image"
94               value="2"
95               c:identifier="COGL_BITMAP_ERROR_CORRUPT_IMAGE"
96               glib:nick="corrupt-image"/>
97     </enumeration>
98     <enumeration name="BlendStringError"
99                  version="1.0"
100                  glib:type-name="CoglBlendStringError"
101                  glib:get-type="cogl_blend_string_error_get_type"
102                  c:type="CoglBlendStringError"
103                  glib:error-quark="cogl_blend_string_error_quark">
104       <doc xml:whitespace="preserve">Error enumeration for the blend strings parser</doc>
105       <member name="parse_error"
106               value="0"
107               c:identifier="COGL_BLEND_STRING_ERROR_PARSE_ERROR"
108               glib:nick="parse-error"/>
109       <member name="argument_parse_error"
110               value="1"
111               c:identifier="COGL_BLEND_STRING_ERROR_ARGUMENT_PARSE_ERROR"
112               glib:nick="argument-parse-error"/>
113       <member name="invalid_error"
114               value="2"
115               c:identifier="COGL_BLEND_STRING_ERROR_INVALID_ERROR"
116               glib:nick="invalid-error"/>
117       <member name="gpu_unsupported_error"
118               value="3"
119               c:identifier="COGL_BLEND_STRING_ERROR_GPU_UNSUPPORTED_ERROR"
120               glib:nick="gpu-unsupported-error"/>
121     </enumeration>
122     <record name="Buffer" c:type="CoglBuffer">
123       <method name="get_size_EXP" c:identifier="cogl_buffer_get_size_EXP">
124         <return-value transfer-ownership="none">
125           <type name="uint" c:type="unsigned int"/>
126         </return-value>
127       </method>
128       <method name="set_update_hint_EXP"
129               c:identifier="cogl_buffer_set_update_hint_EXP">
130         <return-value transfer-ownership="none">
131           <type name="none" c:type="void"/>
132         </return-value>
133         <parameters>
134           <parameter name="hint" transfer-ownership="none">
135             <type name="BufferUpdateHint" c:type="CoglBufferUpdateHint"/>
136           </parameter>
137         </parameters>
138       </method>
139       <method name="get_update_hint_EXP"
140               c:identifier="cogl_buffer_get_update_hint_EXP">
141         <return-value transfer-ownership="full">
142           <type name="BufferUpdateHint" c:type="CoglBufferUpdateHint"/>
143         </return-value>
144       </method>
145       <method name="map_EXP" c:identifier="cogl_buffer_map_EXP">
146         <return-value transfer-ownership="full">
147           <array c:type="guint8*">
148             <type name="uint8"/>
149           </array>
150         </return-value>
151         <parameters>
152           <parameter name="access" transfer-ownership="none">
153             <type name="BufferAccess" c:type="CoglBufferAccess"/>
154           </parameter>
155           <parameter name="hints" transfer-ownership="none">
156             <type name="BufferMapHint" c:type="CoglBufferMapHint"/>
157           </parameter>
158         </parameters>
159       </method>
160       <method name="unmap_EXP" c:identifier="cogl_buffer_unmap_EXP">
161         <return-value transfer-ownership="none">
162           <type name="none" c:type="void"/>
163         </return-value>
164       </method>
165       <method name="set_data_EXP" c:identifier="cogl_buffer_set_data_EXP">
166         <return-value transfer-ownership="none">
167           <type name="boolean" c:type="gboolean"/>
168         </return-value>
169         <parameters>
170           <parameter name="offset" transfer-ownership="none">
171             <type name="gsize" c:type="gsize"/>
172           </parameter>
173           <parameter name="data" transfer-ownership="none">
174             <array c:type="guint8*">
175               <type name="uint8"/>
176             </array>
177           </parameter>
178           <parameter name="size" transfer-ownership="none">
179             <type name="gsize" c:type="gsize"/>
180           </parameter>
181         </parameters>
182       </method>
183     </record>
184     <bitfield name="BufferAccess"
185               version="1.2"
186               glib:type-name="CoglBufferAccess"
187               glib:get-type="cogl_buffer_access_get_type"
188               c:type="CoglBufferAccess">
189       <doc xml:whitespace="preserve">The access hints for cogl_buffer_set_update_hint()</doc>
190       <member name="read"
191               value="1"
192               c:identifier="COGL_BUFFER_ACCESS_READ"
193               glib:nick="read"/>
194       <member name="write"
195               value="2"
196               c:identifier="COGL_BUFFER_ACCESS_WRITE"
197               glib:nick="write"/>
198       <member name="read_write"
199               value="3"
200               c:identifier="COGL_BUFFER_ACCESS_READ_WRITE"
201               glib:nick="read-write"/>
202       <member name="write"
203               value="2"
204               c:identifier="COGL_BUFFER_ACCESS_WRITE"
205               glib:nick="write"/>
206     </bitfield>
207     <bitfield name="BufferBit"
208               version="1.0"
209               glib:type-name="CoglBufferBit"
210               glib:get-type="cogl_buffer_bit_get_type"
211               c:type="CoglBufferBit">
212       <doc xml:whitespace="preserve">Types of auxiliary buffers</doc>
213       <member name="color"
214               value="1"
215               c:identifier="COGL_BUFFER_BIT_COLOR"
216               glib:nick="color"/>
217       <member name="depth"
218               value="2"
219               c:identifier="COGL_BUFFER_BIT_DEPTH"
220               glib:nick="depth"/>
221       <member name="stencil"
222               value="4"
223               c:identifier="COGL_BUFFER_BIT_STENCIL"
224               glib:nick="stencil"/>
225     </bitfield>
226     <bitfield name="BufferMapHint"
227               version="1.4"
228               glib:type-name="CoglBufferMapHint"
229               glib:get-type="cogl_buffer_map_hint_get_type"
230               c:type="CoglBufferMapHint">
231       <doc xml:whitespace="preserve">all the buffer's contents.
232 Hints to Cogl about how you are planning to modify the data once it
233 is mapped.</doc>
234       <member name="discard"
235               value="1"
236               c:identifier="COGL_BUFFER_MAP_HINT_DISCARD"
237               glib:nick="discard"/>
238     </bitfield>
239     <bitfield name="BufferTarget"
240               version="0.8"
241               glib:type-name="CoglBufferTarget"
242               glib:get-type="cogl_buffer_target_get_type"
243               c:type="CoglBufferTarget">
244       <doc xml:whitespace="preserve">Target flags for FBOs.</doc>
245       <member name="window_buffer"
246               value="2"
247               c:identifier="COGL_WINDOW_BUFFER"
248               glib:nick="window-buffer"/>
249       <member name="offscreen_buffer"
250               value="4"
251               c:identifier="COGL_OFFSCREEN_BUFFER"
252               glib:nick="offscreen-buffer"/>
253     </bitfield>
254     <enumeration name="BufferUpdateHint"
255                  version="1.2"
256                  glib:type-name="CoglBufferUpdateHint"
257                  glib:get-type="cogl_buffer_update_hint_get_type"
258                  c:type="CoglBufferUpdateHint">
259       <doc xml:whitespace="preserve">The update hint on a buffer allows the user to give some detail on how often
260 the buffer data is going to be updated.</doc>
261       <member name="static"
262               value="0"
263               c:identifier="COGL_BUFFER_UPDATE_HINT_STATIC"
264               glib:nick="static"/>
265       <member name="dynamic"
266               value="1"
267               c:identifier="COGL_BUFFER_UPDATE_HINT_DYNAMIC"
268               glib:nick="dynamic"/>
269       <member name="stream"
270               value="2"
271               c:identifier="COGL_BUFFER_UPDATE_HINT_STREAM"
272               glib:nick="stream"/>
273     </enumeration>
274     <record name="Color" c:type="CoglColor" version="1.0">
275       <doc xml:whitespace="preserve">A structure for holding a color definition. The contents of
276 the CoglColor structure are private and should never by accessed
277 directly.</doc>
278       <field name="red" writable="1">
279         <type name="uint8" c:type="guint8"/>
280       </field>
281       <field name="green" writable="1">
282         <type name="uint8" c:type="guint8"/>
283       </field>
284       <field name="blue" writable="1">
285         <type name="uint8" c:type="guint8"/>
286       </field>
287       <field name="alpha" writable="1">
288         <type name="uint8" c:type="guint8"/>
289       </field>
290       <field name="padding0" writable="1">
291         <type name="uint32" c:type="guint32"/>
292       </field>
293       <field name="padding1" writable="1">
294         <type name="uint32" c:type="guint32"/>
295       </field>
296       <field name="padding2" writable="1">
297         <type name="uint32" c:type="guint32"/>
298       </field>
299       <constructor name="new" c:identifier="cogl_color_new" version="1.0">
300         <doc xml:whitespace="preserve">Creates a new (empty) color
301 to free the allocated resources</doc>
302         <return-value transfer-ownership="full">
303           <doc xml:whitespace="preserve">a newly-allocated #CoglColor. Use cogl_color_free()</doc>
304           <type name="Color" c:type="CoglColor*"/>
305         </return-value>
306       </constructor>
307       <method name="copy" c:identifier="cogl_color_copy" version="1.0">
308         <doc xml:whitespace="preserve">Creates a copy of @color
309 to free the allocate resources</doc>
310         <return-value transfer-ownership="full">
311           <doc xml:whitespace="preserve">a newly-allocated #CoglColor. Use cogl_color_free()</doc>
312           <type name="Color" c:type="CoglColor*"/>
313         </return-value>
314       </method>
315       <method name="free" c:identifier="cogl_color_free" version="1.0">
316         <doc xml:whitespace="preserve">Frees the resources allocated by cogl_color_new() and cogl_color_copy()</doc>
317         <return-value transfer-ownership="none">
318           <type name="none" c:type="void"/>
319         </return-value>
320       </method>
321       <method name="init_from_4ub"
322               c:identifier="cogl_color_init_from_4ub"
323               version="1.4">
324         <doc xml:whitespace="preserve">Sets the values of the passed channels into a #CoglColor.</doc>
325         <return-value transfer-ownership="none">
326           <type name="none" c:type="void"/>
327         </return-value>
328         <parameters>
329           <parameter name="red" transfer-ownership="none">
330             <doc xml:whitespace="preserve">value of the red channel, between 0 and 255</doc>
331             <type name="uint8" c:type="guint8"/>
332           </parameter>
333           <parameter name="green" transfer-ownership="none">
334             <doc xml:whitespace="preserve">value of the green channel, between 0 and 255</doc>
335             <type name="uint8" c:type="guint8"/>
336           </parameter>
337           <parameter name="blue" transfer-ownership="none">
338             <doc xml:whitespace="preserve">value of the blue channel, between 0 and 255</doc>
339             <type name="uint8" c:type="guint8"/>
340           </parameter>
341           <parameter name="alpha" transfer-ownership="none">
342             <doc xml:whitespace="preserve">value of the alpha channel, between 0 and 255</doc>
343             <type name="uint8" c:type="guint8"/>
344           </parameter>
345         </parameters>
346       </method>
347       <method name="set_from_4ub"
348               c:identifier="cogl_color_set_from_4ub"
349               version="1.0"
350               deprecated="Use cogl_color_init_from_4ub instead."
351               deprecated-version="1.4">
352         <doc xml:whitespace="preserve">Sets the values of the passed channels into a #CoglColor.</doc>
353         <return-value transfer-ownership="none">
354           <type name="none" c:type="void"/>
355         </return-value>
356         <parameters>
357           <parameter name="red" transfer-ownership="none">
358             <doc xml:whitespace="preserve">value of the red channel, between 0 and 255</doc>
359             <type name="uint8" c:type="guint8"/>
360           </parameter>
361           <parameter name="green" transfer-ownership="none">
362             <doc xml:whitespace="preserve">value of the green channel, between 0 and 255</doc>
363             <type name="uint8" c:type="guint8"/>
364           </parameter>
365           <parameter name="blue" transfer-ownership="none">
366             <doc xml:whitespace="preserve">value of the blue channel, between 0 and 255</doc>
367             <type name="uint8" c:type="guint8"/>
368           </parameter>
369           <parameter name="alpha" transfer-ownership="none">
370             <doc xml:whitespace="preserve">value of the alpha channel, between 0 and 255</doc>
371             <type name="uint8" c:type="guint8"/>
372           </parameter>
373         </parameters>
374       </method>
375       <method name="init_from_4f"
376               c:identifier="cogl_color_init_from_4f"
377               version="1.4">
378         <doc xml:whitespace="preserve">Sets the values of the passed channels into a #CoglColor</doc>
379         <return-value transfer-ownership="none">
380           <type name="none" c:type="void"/>
381         </return-value>
382         <parameters>
383           <parameter name="red" transfer-ownership="none">
384             <doc xml:whitespace="preserve">value of the red channel, between 0 and %1.0</doc>
385             <type name="float" c:type="float"/>
386           </parameter>
387           <parameter name="green" transfer-ownership="none">
388             <doc xml:whitespace="preserve">value of the green channel, between 0 and %1.0</doc>
389             <type name="float" c:type="float"/>
390           </parameter>
391           <parameter name="blue" transfer-ownership="none">
392             <doc xml:whitespace="preserve">value of the blue channel, between 0 and %1.0</doc>
393             <type name="float" c:type="float"/>
394           </parameter>
395           <parameter name="alpha" transfer-ownership="none">
396             <doc xml:whitespace="preserve">value of the alpha channel, between 0 and %1.0</doc>
397             <type name="float" c:type="float"/>
398           </parameter>
399         </parameters>
400       </method>
401       <method name="set_from_4f"
402               c:identifier="cogl_color_set_from_4f"
403               version="1.0"
404               deprecated="Use cogl_color_init_from_4f instead."
405               deprecated-version="1.4">
406         <doc xml:whitespace="preserve">Sets the values of the passed channels into a #CoglColor</doc>
407         <return-value transfer-ownership="none">
408           <type name="none" c:type="void"/>
409         </return-value>
410         <parameters>
411           <parameter name="red" transfer-ownership="none">
412             <doc xml:whitespace="preserve">value of the red channel, between 0 and %1.0</doc>
413             <type name="float" c:type="float"/>
414           </parameter>
415           <parameter name="green" transfer-ownership="none">
416             <doc xml:whitespace="preserve">value of the green channel, between 0 and %1.0</doc>
417             <type name="float" c:type="float"/>
418           </parameter>
419           <parameter name="blue" transfer-ownership="none">
420             <doc xml:whitespace="preserve">value of the blue channel, between 0 and %1.0</doc>
421             <type name="float" c:type="float"/>
422           </parameter>
423           <parameter name="alpha" transfer-ownership="none">
424             <doc xml:whitespace="preserve">value of the alpha channel, between 0 and %1.0</doc>
425             <type name="float" c:type="float"/>
426           </parameter>
427         </parameters>
428       </method>
429       <method name="init_from_4fv"
430               c:identifier="cogl_color_init_from_4fv"
431               version="1.4">
432         <doc xml:whitespace="preserve">Sets the values of the passed channels into a #CoglColor</doc>
433         <return-value transfer-ownership="none">
434           <type name="none" c:type="void"/>
435         </return-value>
436         <parameters>
437           <parameter name="color_array"
438                      direction="out"
439                      caller-allocates="0"
440                      transfer-ownership="full">
441             <doc xml:whitespace="preserve">a pointer to an array of 4 float color components</doc>
442             <type name="float" c:type="float*"/>
443           </parameter>
444         </parameters>
445       </method>
446       <method name="get_red_byte"
447               c:identifier="cogl_color_get_red_byte"
448               version="1.0">
449         <doc xml:whitespace="preserve">Retrieves the red channel of @color as a byte value
450 between 0 and 255</doc>
451         <return-value transfer-ownership="none">
452           <doc xml:whitespace="preserve">the red channel of the passed color</doc>
453           <type name="uint8" c:type="unsigned char"/>
454         </return-value>
455       </method>
456       <method name="get_green_byte"
457               c:identifier="cogl_color_get_green_byte"
458               version="1.0">
459         <doc xml:whitespace="preserve">Retrieves the green channel of @color as a byte value
460 between 0 and 255</doc>
461         <return-value transfer-ownership="none">
462           <doc xml:whitespace="preserve">the green channel of the passed color</doc>
463           <type name="uint8" c:type="unsigned char"/>
464         </return-value>
465       </method>
466       <method name="get_blue_byte"
467               c:identifier="cogl_color_get_blue_byte"
468               version="1.0">
469         <doc xml:whitespace="preserve">Retrieves the blue channel of @color as a byte value
470 between 0 and 255</doc>
471         <return-value transfer-ownership="none">
472           <doc xml:whitespace="preserve">the blue channel of the passed color</doc>
473           <type name="uint8" c:type="unsigned char"/>
474         </return-value>
475       </method>
476       <method name="get_alpha_byte"
477               c:identifier="cogl_color_get_alpha_byte"
478               version="1.0">
479         <doc xml:whitespace="preserve">Retrieves the alpha channel of @color as a byte value
480 between 0 and 255</doc>
481         <return-value transfer-ownership="none">
482           <doc xml:whitespace="preserve">the alpha channel of the passed color</doc>
483           <type name="uint8" c:type="unsigned char"/>
484         </return-value>
485       </method>
486       <method name="get_red_float"
487               c:identifier="cogl_color_get_red_float"
488               version="1.0">
489         <doc xml:whitespace="preserve">Retrieves the red channel of @color as a floating point
490 value between 0.0 and 1.0</doc>
491         <return-value transfer-ownership="none">
492           <doc xml:whitespace="preserve">the red channel of the passed color</doc>
493           <type name="float" c:type="float"/>
494         </return-value>
495       </method>
496       <method name="get_green_float"
497               c:identifier="cogl_color_get_green_float"
498               version="1.0">
499         <doc xml:whitespace="preserve">Retrieves the green channel of @color as a floating point
500 value between 0.0 and 1.0</doc>
501         <return-value transfer-ownership="none">
502           <doc xml:whitespace="preserve">the green channel of the passed color</doc>
503           <type name="float" c:type="float"/>
504         </return-value>
505       </method>
506       <method name="get_blue_float"
507               c:identifier="cogl_color_get_blue_float"
508               version="1.0">
509         <doc xml:whitespace="preserve">Retrieves the blue channel of @color as a floating point
510 value between 0.0 and 1.0</doc>
511         <return-value transfer-ownership="none">
512           <doc xml:whitespace="preserve">the blue channel of the passed color</doc>
513           <type name="float" c:type="float"/>
514         </return-value>
515       </method>
516       <method name="get_alpha_float"
517               c:identifier="cogl_color_get_alpha_float"
518               version="1.0">
519         <doc xml:whitespace="preserve">Retrieves the alpha channel of @color as a floating point
520 value between 0.0 and 1.0</doc>
521         <return-value transfer-ownership="none">
522           <doc xml:whitespace="preserve">the alpha channel of the passed color</doc>
523           <type name="float" c:type="float"/>
524         </return-value>
525       </method>
526       <method name="get_red" c:identifier="cogl_color_get_red" version="1.0">
527         <doc xml:whitespace="preserve">Retrieves the red channel of @color as a fixed point
528 value between 0 and %1.0.</doc>
529         <return-value transfer-ownership="none">
530           <doc xml:whitespace="preserve">the red channel of the passed color</doc>
531           <type name="float" c:type="float"/>
532         </return-value>
533       </method>
534       <method name="get_green"
535               c:identifier="cogl_color_get_green"
536               version="1.0">
537         <doc xml:whitespace="preserve">Retrieves the green channel of @color as a fixed point
538 value between 0 and %1.0.</doc>
539         <return-value transfer-ownership="none">
540           <doc xml:whitespace="preserve">the green channel of the passed color</doc>
541           <type name="float" c:type="float"/>
542         </return-value>
543       </method>
544       <method name="get_blue" c:identifier="cogl_color_get_blue" version="1.0">
545         <doc xml:whitespace="preserve">Retrieves the blue channel of @color as a fixed point
546 value between 0 and %1.0.</doc>
547         <return-value transfer-ownership="none">
548           <doc xml:whitespace="preserve">the blue channel of the passed color</doc>
549           <type name="float" c:type="float"/>
550         </return-value>
551       </method>
552       <method name="get_alpha"
553               c:identifier="cogl_color_get_alpha"
554               version="1.0">
555         <doc xml:whitespace="preserve">Retrieves the alpha channel of @color as a fixed point
556 value between 0 and %1.0.</doc>
557         <return-value transfer-ownership="none">
558           <doc xml:whitespace="preserve">the alpha channel of the passed color</doc>
559           <type name="float" c:type="float"/>
560         </return-value>
561       </method>
562       <method name="set_red_byte"
563               c:identifier="cogl_color_set_red_byte"
564               version="1.4">
565         <doc xml:whitespace="preserve">Sets the red channel of @color to @red.</doc>
566         <return-value transfer-ownership="none">
567           <type name="none" c:type="void"/>
568         </return-value>
569         <parameters>
570           <parameter name="red" transfer-ownership="none">
571             <doc xml:whitespace="preserve">a byte value between 0 and 255</doc>
572             <type name="uint8" c:type="unsigned char"/>
573           </parameter>
574         </parameters>
575       </method>
576       <method name="set_green_byte"
577               c:identifier="cogl_color_set_green_byte"
578               version="1.4">
579         <doc xml:whitespace="preserve">Sets the green channel of @color to @green.</doc>
580         <return-value transfer-ownership="none">
581           <type name="none" c:type="void"/>
582         </return-value>
583         <parameters>
584           <parameter name="green" transfer-ownership="none">
585             <doc xml:whitespace="preserve">a byte value between 0 and 255</doc>
586             <type name="uint8" c:type="unsigned char"/>
587           </parameter>
588         </parameters>
589       </method>
590       <method name="set_blue_byte"
591               c:identifier="cogl_color_set_blue_byte"
592               version="1.4">
593         <doc xml:whitespace="preserve">Sets the blue channel of @color to @blue.</doc>
594         <return-value transfer-ownership="none">
595           <type name="none" c:type="void"/>
596         </return-value>
597         <parameters>
598           <parameter name="blue" transfer-ownership="none">
599             <doc xml:whitespace="preserve">a byte value between 0 and 255</doc>
600             <type name="uint8" c:type="unsigned char"/>
601           </parameter>
602         </parameters>
603       </method>
604       <method name="set_alpha_byte"
605               c:identifier="cogl_color_set_alpha_byte"
606               version="1.4">
607         <doc xml:whitespace="preserve">Sets the alpha channel of @color to @alpha.</doc>
608         <return-value transfer-ownership="none">
609           <type name="none" c:type="void"/>
610         </return-value>
611         <parameters>
612           <parameter name="alpha" transfer-ownership="none">
613             <doc xml:whitespace="preserve">a byte value between 0 and 255</doc>
614             <type name="uint8" c:type="unsigned char"/>
615           </parameter>
616         </parameters>
617       </method>
618       <method name="set_red_float"
619               c:identifier="cogl_color_set_red_float"
620               version="1.4">
621         <doc xml:whitespace="preserve">Sets the red channel of @color to @red.</doc>
622         <return-value transfer-ownership="none">
623           <type name="none" c:type="void"/>
624         </return-value>
625         <parameters>
626           <parameter name="red" transfer-ownership="none">
627             <doc xml:whitespace="preserve">a float value between 0.0f and 1.0f</doc>
628             <type name="float" c:type="float"/>
629           </parameter>
630         </parameters>
631       </method>
632       <method name="set_green_float"
633               c:identifier="cogl_color_set_green_float"
634               version="1.4">
635         <doc xml:whitespace="preserve">Sets the green channel of @color to @green.</doc>
636         <return-value transfer-ownership="none">
637           <type name="none" c:type="void"/>
638         </return-value>
639         <parameters>
640           <parameter name="green" transfer-ownership="none">
641             <doc xml:whitespace="preserve">a float value between 0.0f and 1.0f</doc>
642             <type name="float" c:type="float"/>
643           </parameter>
644         </parameters>
645       </method>
646       <method name="set_blue_float"
647               c:identifier="cogl_color_set_blue_float"
648               version="1.4">
649         <doc xml:whitespace="preserve">Sets the blue channel of @color to @blue.</doc>
650         <return-value transfer-ownership="none">
651           <type name="none" c:type="void"/>
652         </return-value>
653         <parameters>
654           <parameter name="blue" transfer-ownership="none">
655             <doc xml:whitespace="preserve">a float value between 0.0f and 1.0f</doc>
656             <type name="float" c:type="float"/>
657           </parameter>
658         </parameters>
659       </method>
660       <method name="set_alpha_float"
661               c:identifier="cogl_color_set_alpha_float"
662               version="1.4">
663         <doc xml:whitespace="preserve">Sets the alpha channel of @color to @alpha.</doc>
664         <return-value transfer-ownership="none">
665           <type name="none" c:type="void"/>
666         </return-value>
667         <parameters>
668           <parameter name="alpha" transfer-ownership="none">
669             <doc xml:whitespace="preserve">a float value between 0.0f and 1.0f</doc>
670             <type name="float" c:type="float"/>
671           </parameter>
672         </parameters>
673       </method>
674       <method name="set_red" c:identifier="cogl_color_set_red" version="1.4">
675         <doc xml:whitespace="preserve">Sets the red channel of @color to @red.</doc>
676         <return-value transfer-ownership="none">
677           <type name="none" c:type="void"/>
678         </return-value>
679         <parameters>
680           <parameter name="red" transfer-ownership="none">
681             <doc xml:whitespace="preserve">a float value between 0.0f and 1.0f</doc>
682             <type name="float" c:type="float"/>
683           </parameter>
684         </parameters>
685       </method>
686       <method name="set_green"
687               c:identifier="cogl_color_set_green"
688               version="1.4">
689         <doc xml:whitespace="preserve">Sets the green channel of @color to @green.</doc>
690         <return-value transfer-ownership="none">
691           <type name="none" c:type="void"/>
692         </return-value>
693         <parameters>
694           <parameter name="green" transfer-ownership="none">
695             <doc xml:whitespace="preserve">a float value between 0.0f and 1.0f</doc>
696             <type name="float" c:type="float"/>
697           </parameter>
698         </parameters>
699       </method>
700       <method name="set_blue" c:identifier="cogl_color_set_blue" version="1.4">
701         <doc xml:whitespace="preserve">Sets the blue channel of @color to @blue.</doc>
702         <return-value transfer-ownership="none">
703           <type name="none" c:type="void"/>
704         </return-value>
705         <parameters>
706           <parameter name="blue" transfer-ownership="none">
707             <doc xml:whitespace="preserve">a float value between 0.0f and 1.0f</doc>
708             <type name="float" c:type="float"/>
709           </parameter>
710         </parameters>
711       </method>
712       <method name="set_alpha"
713               c:identifier="cogl_color_set_alpha"
714               version="1.4">
715         <doc xml:whitespace="preserve">Sets the alpha channel of @color to @alpha.</doc>
716         <return-value transfer-ownership="none">
717           <type name="none" c:type="void"/>
718         </return-value>
719         <parameters>
720           <parameter name="alpha" transfer-ownership="none">
721             <doc xml:whitespace="preserve">a float value between 0.0f and 1.0f</doc>
722             <type name="float" c:type="float"/>
723           </parameter>
724         </parameters>
725       </method>
726       <method name="premultiply"
727               c:identifier="cogl_color_premultiply"
728               version="1.0">
729         <doc xml:whitespace="preserve">Converts a non-premultiplied color to a pre-multiplied color. For
730 example, semi-transparent red is (1.0, 0, 0, 0.5) when non-premultiplied
731 and (0.5, 0, 0, 0.5) when premultiplied.</doc>
732         <return-value transfer-ownership="none">
733           <type name="none" c:type="void"/>
734         </return-value>
735       </method>
736       <method name="unpremultiply"
737               c:identifier="cogl_color_unpremultiply"
738               version="1.4">
739         <doc xml:whitespace="preserve">Converts a pre-multiplied color to a non-premultiplied color. For
740 example, semi-transparent red is (0.5, 0, 0, 0.5) when premultiplied
741 and (1.0, 0, 0, 0.5) when non-premultiplied.</doc>
742         <return-value transfer-ownership="none">
743           <type name="none" c:type="void"/>
744         </return-value>
745       </method>
746     </record>
747     <enumeration name="DepthTestFunction"
748                  glib:type-name="CoglDepthTestFunction"
749                  glib:get-type="cogl_depth_test_function_get_type"
750                  c:type="CoglDepthTestFunction">
751       <doc xml:whitespace="preserve">When using depth testing one of these functions is used to compare
752 the depth of an incoming fragment against the depth value currently
753 stored in the depth buffer. The function is changed using
754 cogl_material_set_depth_test_function().
755 The test is only done when depth testing is explicitly enabled. (See
756 cogl_material_set_depth_test_enabled())</doc>
757       <member name="never"
758               value="512"
759               c:identifier="COGL_DEPTH_TEST_FUNCTION_NEVER"
760               glib:nick="never"/>
761       <member name="less"
762               value="513"
763               c:identifier="COGL_DEPTH_TEST_FUNCTION_LESS"
764               glib:nick="less"/>
765       <member name="equal"
766               value="514"
767               c:identifier="COGL_DEPTH_TEST_FUNCTION_EQUAL"
768               glib:nick="equal"/>
769       <member name="lequal"
770               value="515"
771               c:identifier="COGL_DEPTH_TEST_FUNCTION_LEQUAL"
772               glib:nick="lequal"/>
773       <member name="greater"
774               value="516"
775               c:identifier="COGL_DEPTH_TEST_FUNCTION_GREATER"
776               glib:nick="greater"/>
777       <member name="notequal"
778               value="517"
779               c:identifier="COGL_DEPTH_TEST_FUNCTION_NOTEQUAL"
780               glib:nick="notequal"/>
781       <member name="gequal"
782               value="518"
783               c:identifier="COGL_DEPTH_TEST_FUNCTION_GEQUAL"
784               glib:nick="gequal"/>
785       <member name="always"
786               value="519"
787               c:identifier="COGL_DEPTH_TEST_FUNCTION_ALWAYS"
788               glib:nick="always"/>
789     </enumeration>
790     <enumeration name="DriverError"
791                  glib:type-name="CoglDriverError"
792                  glib:get-type="cogl_driver_error_get_type"
793                  c:type="CoglDriverError">
794       <member name="unknown_version"
795               value="0"
796               c:identifier="COGL_DRIVER_ERROR_UNKNOWN_VERSION"
797               glib:nick="unknown-version"/>
798       <member name="invalid_version"
799               value="1"
800               c:identifier="COGL_DRIVER_ERROR_INVALID_VERSION"
801               glib:nick="invalid-version"/>
802     </enumeration>
803     <enumeration name="Error"
804                  version="1.4"
805                  glib:type-name="CoglError"
806                  glib:get-type="cogl_error_get_type"
807                  c:type="CoglError">
808       <doc xml:whitespace="preserve">Error enumeration for Cogl
809 The @COGL_ERROR_UNSUPPORTED error can be thrown for a variety of
810 reasons. For example:
811 &lt;itemizedlist&gt;
812 &lt;listitem&gt;&lt;para&gt;You've tried to use a feature that is not
813 advertised by cogl_get_features(). This could happen if you create
814 a non-sliced texture with a non-power-of-two size when
815 %COGL_FEATURE_TEXTURE_NPOT is not advertised.&lt;/para&gt;&lt;/listitem&gt;
816 &lt;listitem&gt;&lt;para&gt;The GPU can not handle the configuration you have
817 requested. An example might be if you try to use too many texture
818 layers in a single #CoglMaterial&lt;/para&gt;&lt;/listitem&gt;
819 &lt;listitem&gt;&lt;para&gt;The driver does not support some
820 configuration.&lt;/para&gt;&lt;/listiem&gt;
821 &lt;/itemizedlist&gt;
822 Currently this is only used by Cogl API marked as experimental so
823 this enum should also be considered experimental.</doc>
824       <member name="unsupported"
825               value="0"
826               c:identifier="COGL_ERROR_UNSUPPORTED"
827               glib:nick="unsupported"/>
828     </enumeration>
829     <constant name="FIXED_0_5" value="32768">
830       <type name="int"/>
831     </constant>
832     <constant name="FIXED_1" value="1">
833       <type name="int"/>
834     </constant>
835     <constant name="FIXED_2_PI" value="411775">
836       <type name="int"/>
837     </constant>
838     <constant name="FIXED_BITS" value="32">
839       <type name="int"/>
840     </constant>
841     <constant name="FIXED_EPSILON" value="1">
842       <type name="int"/>
843     </constant>
844     <constant name="FIXED_MAX" value="2147483647">
845       <type name="int"/>
846     </constant>
847     <constant name="FIXED_MIN" value="2147483647">
848       <type name="int"/>
849     </constant>
850     <constant name="FIXED_PI" value="205887">
851       <type name="int"/>
852     </constant>
853     <constant name="FIXED_PI_2" value="102944">
854       <type name="int"/>
855     </constant>
856     <constant name="FIXED_PI_4" value="51472">
857       <type name="int"/>
858     </constant>
859     <constant name="FIXED_Q" value="-16">
860       <type name="int"/>
861     </constant>
862     <bitfield name="FeatureFlags"
863               version="0.8"
864               glib:type-name="CoglFeatureFlags"
865               glib:get-type="cogl_feature_flags_get_type"
866               c:type="CoglFeatureFlags">
867       <doc xml:whitespace="preserve">Flags for the supported features.</doc>
868       <member name="texture_rectangle"
869               value="2"
870               c:identifier="COGL_FEATURE_TEXTURE_RECTANGLE"
871               glib:nick="texture-rectangle"/>
872       <member name="texture_npot"
873               value="4"
874               c:identifier="COGL_FEATURE_TEXTURE_NPOT"
875               glib:nick="texture-npot"/>
876       <member name="texture_yuv"
877               value="8"
878               c:identifier="COGL_FEATURE_TEXTURE_YUV"
879               glib:nick="texture-yuv"/>
880       <member name="texture_read_pixels"
881               value="16"
882               c:identifier="COGL_FEATURE_TEXTURE_READ_PIXELS"
883               glib:nick="texture-read-pixels"/>
884       <member name="shaders_glsl"
885               value="32"
886               c:identifier="COGL_FEATURE_SHADERS_GLSL"
887               glib:nick="shaders-glsl"/>
888       <member name="offscreen"
889               value="64"
890               c:identifier="COGL_FEATURE_OFFSCREEN"
891               glib:nick="offscreen"/>
892       <member name="offscreen_multisample"
893               value="128"
894               c:identifier="COGL_FEATURE_OFFSCREEN_MULTISAMPLE"
895               glib:nick="offscreen-multisample"/>
896       <member name="offscreen_blit"
897               value="256"
898               c:identifier="COGL_FEATURE_OFFSCREEN_BLIT"
899               glib:nick="offscreen-blit"/>
900       <member name="four_clip_planes"
901               value="512"
902               c:identifier="COGL_FEATURE_FOUR_CLIP_PLANES"
903               glib:nick="four-clip-planes"/>
904       <member name="stencil_buffer"
905               value="1024"
906               c:identifier="COGL_FEATURE_STENCIL_BUFFER"
907               glib:nick="stencil-buffer"/>
908       <member name="vbos"
909               value="2048"
910               c:identifier="COGL_FEATURE_VBOS"
911               glib:nick="vbos"/>
912       <member name="pbos"
913               value="4096"
914               c:identifier="COGL_FEATURE_PBOS"
915               glib:nick="pbos"/>
916       <member name="unsigned_int_indices"
917               value="8192"
918               c:identifier="COGL_FEATURE_UNSIGNED_INT_INDICES"
919               glib:nick="unsigned-int-indices"/>
920       <member name="depth_range"
921               value="16384"
922               c:identifier="COGL_FEATURE_DEPTH_RANGE"
923               glib:nick="depth-range"/>
924       <member name="texture_npot_basic"
925               value="32768"
926               c:identifier="COGL_FEATURE_TEXTURE_NPOT_BASIC"
927               glib:nick="texture-npot-basic"/>
928       <member name="texture_npot_mipmap"
929               value="65536"
930               c:identifier="COGL_FEATURE_TEXTURE_NPOT_MIPMAP"
931               glib:nick="texture-npot-mipmap"/>
932       <member name="texture_npot_repeat"
933               value="131072"
934               c:identifier="COGL_FEATURE_TEXTURE_NPOT_REPEAT"
935               glib:nick="texture-npot-repeat"/>
936       <member name="point_sprite"
937               value="262144"
938               c:identifier="COGL_FEATURE_POINT_SPRITE"
939               glib:nick="point-sprite"/>
940       <member name="texture_3d"
941               value="524288"
942               c:identifier="COGL_FEATURE_TEXTURE_3D"
943               glib:nick="texture-3d"/>
944       <member name="shaders_arbfp"
945               value="1048576"
946               c:identifier="COGL_FEATURE_SHADERS_ARBFP"
947               glib:nick="shaders-arbfp"/>
948     </bitfield>
949     <enumeration name="FogMode"
950                  version="1.0"
951                  glib:type-name="CoglFogMode"
952                  glib:get-type="cogl_fog_mode_get_type"
953                  c:type="CoglFogMode">
954       <doc xml:whitespace="preserve">The fog mode determines the equation used to calculate the fogging blend
955 factor while fogging is enabled. The simplest %COGL_FOG_MODE_LINEAR mode
956 determines f as:
957 |[
958 f = end - eye_distance / end - start
959 ]|
960 Where eye_distance is the distance of the current fragment in eye
961 coordinates from the origin.</doc>
962       <member name="linear"
963               value="0"
964               c:identifier="COGL_FOG_MODE_LINEAR"
965               glib:nick="linear"/>
966       <member name="exponential"
967               value="1"
968               c:identifier="COGL_FOG_MODE_EXPONENTIAL"
969               glib:nick="exponential"/>
970       <member name="exponential_squared"
971               value="2"
972               c:identifier="COGL_FOG_MODE_EXPONENTIAL_SQUARED"
973               glib:nick="exponential-squared"/>
974     </enumeration>
975     <record name="Framebuffer" c:type="CoglFramebuffer">
976     </record>
977     <callback name="FuncPtr" c:type="CoglFuncPtr">
978       <doc xml:whitespace="preserve">The type used by cogl for function pointers, note that this type
979 is used as a generic catch-all cast for function pointers and the
980 actual arguments and return type may be different.</doc>
981       <return-value transfer-ownership="none">
982         <type name="none" c:type="void"/>
983       </return-value>
984     </callback>
985     <glib:boxed c:type="CoglHandle"
986                 glib:name="Handle"
987                 glib:type-name="CoglHandle"
988                 glib:get-type="cogl_handle_get_type">
989       <method name="ref" c:identifier="cogl_handle_ref">
990         <doc xml:whitespace="preserve">Increases the reference count of @handle by 1</doc>
991         <return-value transfer-ownership="full">
992           <doc xml:whitespace="preserve">the handle, with its reference count increased</doc>
993           <type name="Handle" c:type="CoglHandle"/>
994         </return-value>
995       </method>
996       <method name="unref" c:identifier="cogl_handle_unref">
997         <doc xml:whitespace="preserve">Drecreases the reference count of @handle by 1; if the reference
998 count reaches 0, the resources allocated by @handle will be freed</doc>
999         <return-value transfer-ownership="none">
1000           <type name="none" c:type="void"/>
1001         </return-value>
1002       </method>
1003     </glib:boxed>
1004     <enumeration name="IndicesType"
1005                  glib:type-name="CoglIndicesType"
1006                  glib:get-type="cogl_indices_type_get_type"
1007                  c:type="CoglIndicesType">
1008       <doc xml:whitespace="preserve">You should aim to use the smallest data type that gives you enough
1009 range, since it reduces the size of your index array and can help
1010 reduce the demand on memory bandwidth.
1011 Note that %COGL_INDICES_TYPE_UNSIGNED_INT is only supported if the
1012 %COGL_FEATURE_UNSIGNED_INT_INDICES feature is available. This
1013 should always be available on OpenGL but on OpenGL ES it will only
1014 be available if the GL_OES_element_index_uint extension is
1015 advertized.</doc>
1016       <member name="byte"
1017               value="0"
1018               c:identifier="COGL_INDICES_TYPE_UNSIGNED_BYTE"
1019               glib:nick="byte"/>
1020       <member name="short"
1021               value="1"
1022               c:identifier="COGL_INDICES_TYPE_UNSIGNED_SHORT"
1023               glib:nick="short"/>
1024       <member name="int"
1025               value="2"
1026               c:identifier="COGL_INDICES_TYPE_UNSIGNED_INT"
1027               glib:nick="int"/>
1028     </enumeration>
1029     <record name="Material" c:type="CoglMaterial">
1030       <constructor name="new" c:identifier="cogl_material_new">
1031         <doc xml:whitespace="preserve">Allocates and initializes a blank white material</doc>
1032         <return-value transfer-ownership="full">
1033           <doc xml:whitespace="preserve">a pointer to a new #CoglMaterial</doc>
1034           <type name="Material" c:type="CoglMaterial*"/>
1035         </return-value>
1036       </constructor>
1037       <method name="copy" c:identifier="cogl_material_copy" version="1.2">
1038         <doc xml:whitespace="preserve">Creates a new material with the configuration copied from the
1039 source material.
1040 We would strongly advise developers to always aim to use
1041 cogl_material_copy() instead of cogl_material_new() whenever there will
1042 be any similarity between two materials. Copying a material helps Cogl
1043 keep track of a materials ancestry which we may use to help minimize GPU
1044 state changes.</doc>
1045         <return-value transfer-ownership="full">
1046           <doc xml:whitespace="preserve">a pointer to the newly allocated #CoglMaterial</doc>
1047           <type name="Material" c:type="CoglMaterial*"/>
1048         </return-value>
1049       </method>
1050       <method name="set_color"
1051               c:identifier="cogl_material_set_color"
1052               version="1.0">
1053         <doc xml:whitespace="preserve">Sets the basic color of the material, used when no lighting is enabled.
1054 Note that if you don't add any layers to the material then the color
1055 will be blended unmodified with the destination; the default blend
1056 semi-transparent red. See cogl_color_premultiply().
1057 The default value is (1.0, 1.0, 1.0, 1.0)</doc>
1058         <return-value transfer-ownership="none">
1059           <type name="none" c:type="void"/>
1060         </return-value>
1061         <parameters>
1062           <parameter name="color" transfer-ownership="none">
1063             <doc xml:whitespace="preserve">The components of the color</doc>
1064             <type name="Color" c:type="CoglColor*"/>
1065           </parameter>
1066         </parameters>
1067       </method>
1068       <method name="set_color4ub"
1069               c:identifier="cogl_material_set_color4ub"
1070               version="1.0">
1071         <doc xml:whitespace="preserve">Sets the basic color of the material, used when no lighting is enabled.
1072 The default value is (0xff, 0xff, 0xff, 0xff)</doc>
1073         <return-value transfer-ownership="none">
1074           <type name="none" c:type="void"/>
1075         </return-value>
1076         <parameters>
1077           <parameter name="red" transfer-ownership="none">
1078             <doc xml:whitespace="preserve">The red component</doc>
1079             <type name="uint8" c:type="guint8"/>
1080           </parameter>
1081           <parameter name="green" transfer-ownership="none">
1082             <doc xml:whitespace="preserve">The green component</doc>
1083             <type name="uint8" c:type="guint8"/>
1084           </parameter>
1085           <parameter name="blue" transfer-ownership="none">
1086             <doc xml:whitespace="preserve">The blue component</doc>
1087             <type name="uint8" c:type="guint8"/>
1088           </parameter>
1089           <parameter name="alpha" transfer-ownership="none">
1090             <doc xml:whitespace="preserve">The alpha component</doc>
1091             <type name="uint8" c:type="guint8"/>
1092           </parameter>
1093         </parameters>
1094       </method>
1095       <method name="set_color4f"
1096               c:identifier="cogl_material_set_color4f"
1097               version="1.0">
1098         <doc xml:whitespace="preserve">Sets the basic color of the material, used when no lighting is enabled.
1099 The default value is (1.0, 1.0, 1.0, 1.0)</doc>
1100         <return-value transfer-ownership="none">
1101           <type name="none" c:type="void"/>
1102         </return-value>
1103         <parameters>
1104           <parameter name="red" transfer-ownership="none">
1105             <doc xml:whitespace="preserve">The red component</doc>
1106             <type name="float" c:type="float"/>
1107           </parameter>
1108           <parameter name="green" transfer-ownership="none">
1109             <doc xml:whitespace="preserve">The green component</doc>
1110             <type name="float" c:type="float"/>
1111           </parameter>
1112           <parameter name="blue" transfer-ownership="none">
1113             <doc xml:whitespace="preserve">The blue component</doc>
1114             <type name="float" c:type="float"/>
1115           </parameter>
1116           <parameter name="alpha" transfer-ownership="none">
1117             <doc xml:whitespace="preserve">The alpha component</doc>
1118             <type name="float" c:type="float"/>
1119           </parameter>
1120         </parameters>
1121       </method>
1122       <method name="get_color"
1123               c:identifier="cogl_material_get_color"
1124               version="1.0">
1125         <doc xml:whitespace="preserve">Retrieves the current material color.</doc>
1126         <return-value transfer-ownership="none">
1127           <type name="none" c:type="void"/>
1128         </return-value>
1129         <parameters>
1130           <parameter name="color"
1131                      direction="out"
1132                      caller-allocates="1"
1133                      transfer-ownership="none">
1134             <doc xml:whitespace="preserve">The location to store the color</doc>
1135             <type name="Color" c:type="CoglColor*"/>
1136           </parameter>
1137         </parameters>
1138       </method>
1139       <method name="set_ambient"
1140               c:identifier="cogl_material_set_ambient"
1141               version="1.0">
1142         <doc xml:whitespace="preserve">Sets the material's ambient color, in the standard OpenGL lighting
1143 model. The ambient color affects the overall color of the object.
1144 Since the diffuse color will be intense when the light hits the surface
1145 directly, the ambient will be most apparent where the light hits at a
1146 slant.
1147 The default value is (0.2, 0.2, 0.2, 1.0)</doc>
1148         <return-value transfer-ownership="none">
1149           <type name="none" c:type="void"/>
1150         </return-value>
1151         <parameters>
1152           <parameter name="ambient" transfer-ownership="none">
1153             <doc xml:whitespace="preserve">The components of the desired ambient color</doc>
1154             <type name="Color" c:type="CoglColor*"/>
1155           </parameter>
1156         </parameters>
1157       </method>
1158       <method name="get_ambient"
1159               c:identifier="cogl_material_get_ambient"
1160               version="1.0">
1161         <doc xml:whitespace="preserve">Retrieves the current ambient color for @material</doc>
1162         <return-value transfer-ownership="none">
1163           <type name="none" c:type="void"/>
1164         </return-value>
1165         <parameters>
1166           <parameter name="ambient" transfer-ownership="none">
1167             <doc xml:whitespace="preserve">The location to store the ambient color</doc>
1168             <type name="Color" c:type="CoglColor*"/>
1169           </parameter>
1170         </parameters>
1171       </method>
1172       <method name="set_diffuse"
1173               c:identifier="cogl_material_set_diffuse"
1174               version="1.0">
1175         <doc xml:whitespace="preserve">Sets the material's diffuse color, in the standard OpenGL lighting
1176 model. The diffuse color is most intense where the light hits the
1177 surface directly - perpendicular to the surface.
1178 The default value is (0.8, 0.8, 0.8, 1.0)</doc>
1179         <return-value transfer-ownership="none">
1180           <type name="none" c:type="void"/>
1181         </return-value>
1182         <parameters>
1183           <parameter name="diffuse" transfer-ownership="none">
1184             <doc xml:whitespace="preserve">The components of the desired diffuse color</doc>
1185             <type name="Color" c:type="CoglColor*"/>
1186           </parameter>
1187         </parameters>
1188       </method>
1189       <method name="get_diffuse"
1190               c:identifier="cogl_material_get_diffuse"
1191               version="1.0">
1192         <doc xml:whitespace="preserve">Retrieves the current diffuse color for @material</doc>
1193         <return-value transfer-ownership="none">
1194           <type name="none" c:type="void"/>
1195         </return-value>
1196         <parameters>
1197           <parameter name="diffuse" transfer-ownership="none">
1198             <doc xml:whitespace="preserve">The location to store the diffuse color</doc>
1199             <type name="Color" c:type="CoglColor*"/>
1200           </parameter>
1201         </parameters>
1202       </method>
1203       <method name="set_ambient_and_diffuse"
1204               c:identifier="cogl_material_set_ambient_and_diffuse"
1205               version="1.0">
1206         <doc xml:whitespace="preserve">Conveniently sets the diffuse and ambient color of @material at the same
1207 time. See cogl_material_set_ambient() and cogl_material_set_diffuse().
1208 The default ambient color is (0.2, 0.2, 0.2, 1.0)
1209 The default diffuse color is (0.8, 0.8, 0.8, 1.0)</doc>
1210         <return-value transfer-ownership="none">
1211           <type name="none" c:type="void"/>
1212         </return-value>
1213         <parameters>
1214           <parameter name="color" transfer-ownership="none">
1215             <doc xml:whitespace="preserve">The components of the desired ambient and diffuse colors</doc>
1216             <type name="Color" c:type="CoglColor*"/>
1217           </parameter>
1218         </parameters>
1219       </method>
1220       <method name="set_specular"
1221               c:identifier="cogl_material_set_specular"
1222               version="1.0">
1223         <doc xml:whitespace="preserve">Sets the material's specular color, in the standard OpenGL lighting
1224 model. The intensity of the specular color depends on the viewport
1225 position, and is brightest along the lines of reflection.
1226 The default value is (0.0, 0.0, 0.0, 1.0)</doc>
1227         <return-value transfer-ownership="none">
1228           <type name="none" c:type="void"/>
1229         </return-value>
1230         <parameters>
1231           <parameter name="specular" transfer-ownership="none">
1232             <doc xml:whitespace="preserve">The components of the desired specular color</doc>
1233             <type name="Color" c:type="CoglColor*"/>
1234           </parameter>
1235         </parameters>
1236       </method>
1237       <method name="get_specular"
1238               c:identifier="cogl_material_get_specular"
1239               version="1.0">
1240         <doc xml:whitespace="preserve">Retrieves the materials current specular color.</doc>
1241         <return-value transfer-ownership="none">
1242           <type name="none" c:type="void"/>
1243         </return-value>
1244         <parameters>
1245           <parameter name="specular" transfer-ownership="none">
1246             <doc xml:whitespace="preserve">The location to store the specular color</doc>
1247             <type name="Color" c:type="CoglColor*"/>
1248           </parameter>
1249         </parameters>
1250       </method>
1251       <method name="set_shininess"
1252               c:identifier="cogl_material_set_shininess"
1253               version="1.0">
1254         <doc xml:whitespace="preserve">Sets the shininess of the material, in the standard OpenGL lighting
1255 model, which determines the size of the specular highlights. A
1256 higher @shininess will produce smaller highlights which makes the
1257 object appear more shiny.
1258 The default value is 0.0</doc>
1259         <return-value transfer-ownership="none">
1260           <type name="none" c:type="void"/>
1261         </return-value>
1262         <parameters>
1263           <parameter name="shininess" transfer-ownership="none">
1264             <doc xml:whitespace="preserve">The desired shininess; must be &gt;= 0.0</doc>
1265             <type name="float" c:type="float"/>
1266           </parameter>
1267         </parameters>
1268       </method>
1269       <method name="get_shininess"
1270               c:identifier="cogl_material_get_shininess"
1271               version="1.0">
1272         <doc xml:whitespace="preserve">Retrieves the materials current emission color.</doc>
1273         <return-value transfer-ownership="none">
1274           <doc xml:whitespace="preserve">The materials current shininess value</doc>
1275           <type name="float" c:type="float"/>
1276         </return-value>
1277       </method>
1278       <method name="set_emission"
1279               c:identifier="cogl_material_set_emission"
1280               version="1.0">
1281         <doc xml:whitespace="preserve">Sets the material's emissive color, in the standard OpenGL lighting
1282 model. It will look like the surface is a light source emitting this
1283 color.
1284 The default value is (0.0, 0.0, 0.0, 1.0)</doc>
1285         <return-value transfer-ownership="none">
1286           <type name="none" c:type="void"/>
1287         </return-value>
1288         <parameters>
1289           <parameter name="emission" transfer-ownership="none">
1290             <doc xml:whitespace="preserve">The components of the desired emissive color</doc>
1291             <type name="Color" c:type="CoglColor*"/>
1292           </parameter>
1293         </parameters>
1294       </method>
1295       <method name="get_emission"
1296               c:identifier="cogl_material_get_emission"
1297               version="1.0">
1298         <doc xml:whitespace="preserve">Retrieves the materials current emission color.</doc>
1299         <return-value transfer-ownership="none">
1300           <type name="none" c:type="void"/>
1301         </return-value>
1302         <parameters>
1303           <parameter name="emission" transfer-ownership="none">
1304             <doc xml:whitespace="preserve">The location to store the emission color</doc>
1305             <type name="Color" c:type="CoglColor*"/>
1306           </parameter>
1307         </parameters>
1308       </method>
1309       <method name="set_alpha_test_function"
1310               c:identifier="cogl_material_set_alpha_test_function"
1311               version="1.0">
1312         <doc xml:whitespace="preserve">Before a primitive is blended with the framebuffer, it goes through an
1313 alpha test stage which lets you discard fragments based on the current
1314 alpha value. This function lets you change the function used to evaluate
1315 the alpha channel, and thus determine which fragments are discarded
1316 and which continue on to the blending stage.
1317 The default is %COGL_MATERIAL_ALPHA_FUNC_ALWAYS</doc>
1318         <return-value transfer-ownership="none">
1319           <type name="none" c:type="void"/>
1320         </return-value>
1321         <parameters>
1322           <parameter name="alpha_func" transfer-ownership="none">
1323             <doc xml:whitespace="preserve">A @CoglMaterialAlphaFunc constant</doc>
1324             <type name="MaterialAlphaFunc" c:type="CoglMaterialAlphaFunc"/>
1325           </parameter>
1326           <parameter name="alpha_reference" transfer-ownership="none">
1327             <doc xml:whitespace="preserve">A reference point that the chosen alpha function uses to compare incoming fragments to.</doc>
1328             <type name="float" c:type="float"/>
1329           </parameter>
1330         </parameters>
1331       </method>
1332       <method name="set_blend"
1333               c:identifier="cogl_material_set_blend"
1334               version="1.0"
1335               throws="1">
1336         <doc xml:whitespace="preserve">If not already familiar; please refer &lt;link linkend="cogl-Blend-Strings"&gt;here&lt;/link&gt;
1337 for an overview of what blend strings are, and their syntax.
1338 Blending occurs after the alpha test function, and combines fragments with
1339 the framebuffer.
1340 Currently the only blend function Cogl exposes is ADD(). So any valid
1341 blend statements will be of the form:
1342 |[
1343 &amp;lt;channel-mask&amp;gt;=ADD(SRC_COLOR*(&amp;lt;factor&amp;gt;), DST_COLOR*(&amp;lt;factor&amp;gt;))
1344 ]|
1345 &lt;warning&gt;The brackets around blend factors are currently not
1346 optional!&lt;/warning&gt;
1347 This is the list of source-names usable as blend factors:
1348 &lt;itemizedlist&gt;
1349 &lt;listitem&gt;&lt;para&gt;SRC_COLOR: The color of the in comming fragment&lt;/para&gt;&lt;/listitem&gt;
1350 &lt;listitem&gt;&lt;para&gt;DST_COLOR: The color of the framebuffer&lt;/para&gt;&lt;/listitem&gt;
1351 &lt;listitem&gt;&lt;para&gt;CONSTANT: The constant set via cogl_material_set_blend_constant()&lt;/para&gt;&lt;/listitem&gt;
1352 &lt;/itemizedlist&gt;
1353 The source names can be used according to the
1354 &lt;link linkend="cogl-Blend-String-syntax"&gt;color-source and factor syntax&lt;/link&gt;,
1355 so for example "(1-SRC_COLOR[A])" would be a valid factor, as would
1356 "(CONSTANT[RGB])"
1357 These can also be used as factors:
1358 &lt;itemizedlist&gt;
1359 &lt;listitem&gt;0: (0, 0, 0, 0)&lt;/listitem&gt;
1360 &lt;listitem&gt;1: (1, 1, 1, 1)&lt;/listitem&gt;
1361 &lt;listitem&gt;SRC_ALPHA_SATURATE_FACTOR: (f,f,f,1) where f = MIN(SRC_COLOR[A],1-DST_COLOR[A])&lt;/listitem&gt;
1362 &lt;/itemizedlist&gt;
1363 &lt;note&gt;Remember; all color components are normalized to the range [0, 1]
1364 before computing the result of blending.&lt;/note&gt;
1365 &lt;example id="cogl-Blend-Strings-blend-unpremul"&gt;
1366 &lt;title&gt;Blend Strings/1&lt;/title&gt;
1367 &lt;para&gt;Blend a non-premultiplied source over a destination with
1368 premultiplied alpha:&lt;/para&gt;
1369 &lt;programlisting&gt;
1370 "RGB = ADD(SRC_COLOR*(SRC_COLOR[A]), DST_COLOR*(1-SRC_COLOR[A]))"
1371 "A   = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))"
1372 &lt;/programlisting&gt;
1373 &lt;/example&gt;
1374 &lt;example id="cogl-Blend-Strings-blend-premul"&gt;
1375 &lt;title&gt;Blend Strings/2&lt;/title&gt;
1376 &lt;para&gt;Blend a premultiplied source over a destination with
1377 premultiplied alpha&lt;/para&gt;
1378 &lt;programlisting&gt;
1379 "RGBA = ADD(SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))"
1380 &lt;/programlisting&gt;
1381 &lt;/example&gt;
1382 The default blend string is:
1383 |[
1384 RGBA = ADD (SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))
1385 ]|
1386 That gives normal alpha-blending when the calculated color for the material
1387 is in premultiplied form.
1388 described blending is supported by the underlying driver/hardware. If
1389 there was an error, %FALSE is returned and @error is set accordingly (if
1390 present).</doc>
1391         <return-value transfer-ownership="none">
1392           <doc xml:whitespace="preserve">%TRUE if the blend string was successfully parsed, and the</doc>
1393           <type name="boolean" c:type="gboolean"/>
1394         </return-value>
1395         <parameters>
1396           <parameter name="blend_string" transfer-ownership="none">
1397             <doc xml:whitespace="preserve">A &lt;link linkend="cogl-Blend-Strings"&gt;Cogl blend string&lt;/link&gt; describing the desired blend function.</doc>
1398             <type name="utf8" c:type="char*"/>
1399           </parameter>
1400         </parameters>
1401       </method>
1402       <method name="set_blend_constant"
1403               c:identifier="cogl_material_set_blend_constant"
1404               version="1.0">
1405         <doc xml:whitespace="preserve">When blending is setup to reference a CONSTANT blend factor then
1406 blending will depend on the constant set with this function.</doc>
1407         <return-value transfer-ownership="none">
1408           <type name="none" c:type="void"/>
1409         </return-value>
1410         <parameters>
1411           <parameter name="constant_color" transfer-ownership="none">
1412             <doc xml:whitespace="preserve">The constant color you want</doc>
1413             <type name="Color" c:type="CoglColor*"/>
1414           </parameter>
1415         </parameters>
1416       </method>
1417       <method name="get_user_program"
1418               c:identifier="cogl_material_get_user_program"
1419               version="1.4">
1420         <doc xml:whitespace="preserve">Queries what user program has been associated with the given</doc>
1421         <return-value transfer-ownership="full">
1422           <doc xml:whitespace="preserve">The current user program or %COGL_INVALID_HANDLE.</doc>
1423           <type name="Handle" c:type="CoglHandle"/>
1424         </return-value>
1425       </method>
1426       <method name="set_user_program"
1427               c:identifier="cogl_material_set_user_program"
1428               version="1.4">
1429         <doc xml:whitespace="preserve">Associates a linked CoglProgram with the given material so that the
1430 program can take full control of vertex and/or fragment processing.
1431 This is an example of how it can be used to associate an ARBfp
1432 program with a #CoglMaterial:
1433 |[
1434 CoglHandle shader;
1435 CoglHandle program;
1436 CoglMaterial *material;
1437 shader = cogl_create_shader (COGL_SHADER_TYPE_FRAGMENT);
1438 cogl_shader_source (shader,
1439 "!!ARBfp1.0\n"
1440 "MOV result.color,fragment.color;\n"
1441 "END\n");
1442 cogl_shader_compile (shader);
1443 program = cogl_create_program ();
1444 cogl_program_attach_shader (program, shader);
1445 cogl_program_link (program);
1446 material = cogl_material_new ();
1447 cogl_material_set_user_program (material, program);
1448 cogl_set_source_color4ub (0xff, 0x00, 0x00, 0xff);
1449 cogl_rectangle (0, 0, 100, 100);
1450 ]|
1451 It is possibly worth keeping in mind that this API is not part of
1452 the long term design for how we want to expose shaders to Cogl
1453 developers (We are planning on deprecating the cogl_program and
1454 cogl_shader APIs in favour of a "snippet" framework) but in the
1455 meantime we hope this will handle most practical GLSL and ARBfp
1456 requirements.
1457 Also remember you need to check for either the
1458 %COGL_FEATURE_SHADERS_GLSL or %COGL_FEATURE_SHADERS_ARBFP before
1459 using the cogl_program or cogl_shader API.</doc>
1460         <return-value transfer-ownership="none">
1461           <type name="none" c:type="void"/>
1462         </return-value>
1463         <parameters>
1464           <parameter name="program" transfer-ownership="none">
1465             <doc xml:whitespace="preserve">A #CoglHandle to a linked CoglProgram</doc>
1466             <type name="Handle" c:type="CoglHandle"/>
1467           </parameter>
1468         </parameters>
1469       </method>
1470       <method name="set_layer"
1471               c:identifier="cogl_material_set_layer"
1472               version="1.0">
1473         <doc xml:whitespace="preserve">In addition to the standard OpenGL lighting model a Cogl material may have
1474 one or more layers comprised of textures that can be blended together in
1475 order, with a number of different texture combine modes. This function
1476 defines a new texture layer.
1477 The index values of multiple layers do not have to be consecutive; it is
1478 only their relative order that is important.
1479 &lt;note&gt;In the future, we may define other types of material layers, such
1480 as purely GLSL based layers.&lt;/note&gt;</doc>
1481         <return-value transfer-ownership="none">
1482           <type name="none" c:type="void"/>
1483         </return-value>
1484         <parameters>
1485           <parameter name="layer_index" transfer-ownership="none">
1486             <doc xml:whitespace="preserve">the index of the layer</doc>
1487             <type name="int" c:type="int"/>
1488           </parameter>
1489           <parameter name="texture" transfer-ownership="none">
1490             <doc xml:whitespace="preserve">a #CoglHandle for the layer object</doc>
1491             <type name="Handle" c:type="CoglHandle"/>
1492           </parameter>
1493         </parameters>
1494       </method>
1495       <method name="remove_layer" c:identifier="cogl_material_remove_layer">
1496         <doc xml:whitespace="preserve">This function removes a layer from your material</doc>
1497         <return-value transfer-ownership="none">
1498           <type name="none" c:type="void"/>
1499         </return-value>
1500         <parameters>
1501           <parameter name="layer_index" transfer-ownership="none">
1502             <doc xml:whitespace="preserve">Specifies the layer you want to remove</doc>
1503             <type name="int" c:type="int"/>
1504           </parameter>
1505         </parameters>
1506       </method>
1507       <method name="set_layer_combine"
1508               c:identifier="cogl_material_set_layer_combine"
1509               version="1.0"
1510               throws="1">
1511         <doc xml:whitespace="preserve">If not already familiar; you can refer
1512 &lt;link linkend="cogl-Blend-Strings"&gt;here&lt;/link&gt; for an overview of what blend
1513 strings are and there syntax.
1514 These are all the functions available for texture combining:
1515 &lt;itemizedlist&gt;
1516 &lt;listitem&gt;REPLACE(arg0) = arg0&lt;/listitem&gt;
1517 &lt;listitem&gt;MODULATE(arg0, arg1) = arg0 x arg1&lt;/listitem&gt;
1518 &lt;listitem&gt;ADD(arg0, arg1) = arg0 + arg1&lt;/listitem&gt;
1519 &lt;listitem&gt;ADD_SIGNED(arg0, arg1) = arg0 + arg1 - 0.5&lt;/listitem&gt;
1520 &lt;listitem&gt;INTERPOLATE(arg0, arg1, arg2) = arg0 x arg2 + arg1 x (1 - arg2)&lt;/listitem&gt;
1521 &lt;listitem&gt;SUBTRACT(arg0, arg1) = arg0 - arg1&lt;/listitem&gt;
1522 &lt;listitem&gt;
1523 &lt;programlisting&gt;
1524 DOT3_RGB(arg0, arg1) = 4 x ((arg0[R] - 0.5)) * (arg1[R] - 0.5) +
1525 (arg0[G] - 0.5)) * (arg1[G] - 0.5) +
1526 (arg0[B] - 0.5)) * (arg1[B] - 0.5))
1527 &lt;/programlisting&gt;
1528 &lt;/listitem&gt;
1529 &lt;listitem&gt;
1530 &lt;programlisting&gt;
1531 DOT3_RGBA(arg0, arg1) = 4 x ((arg0[R] - 0.5)) * (arg1[R] - 0.5) +
1532 (arg0[G] - 0.5)) * (arg1[G] - 0.5) +
1533 (arg0[B] - 0.5)) * (arg1[B] - 0.5))
1534 &lt;/programlisting&gt;
1535 &lt;/listitem&gt;
1536 &lt;/itemizedlist&gt;
1537 Refer to the
1538 &lt;link linkend="cogl-Blend-String-syntax"&gt;color-source syntax&lt;/link&gt; for
1539 describing the arguments. The valid source names for texture combining
1540 are:
1541 &lt;variablelist&gt;
1542 &lt;varlistentry&gt;
1543 &lt;term&gt;TEXTURE&lt;/term&gt;
1544 &lt;listitem&gt;Use the color from the current texture layer&lt;/listitem&gt;
1545 &lt;/varlistentry&gt;
1546 &lt;varlistentry&gt;
1547 &lt;term&gt;TEXTURE_0, TEXTURE_1, etc&lt;/term&gt;
1548 &lt;listitem&gt;Use the color from the specified texture layer&lt;/listitem&gt;
1549 &lt;/varlistentry&gt;
1550 &lt;varlistentry&gt;
1551 &lt;term&gt;CONSTANT&lt;/term&gt;
1552 &lt;listitem&gt;Use the color from the constant given with
1553 cogl_material_set_layer_constant()&lt;/listitem&gt;
1554 &lt;/varlistentry&gt;
1555 &lt;varlistentry&gt;
1556 &lt;term&gt;PRIMARY&lt;/term&gt;
1557 &lt;listitem&gt;Use the color of the material as set with
1558 cogl_material_set_color()&lt;/listitem&gt;
1559 &lt;/varlistentry&gt;
1560 &lt;varlistentry&gt;
1561 &lt;term&gt;PREVIOUS&lt;/term&gt;
1562 &lt;listitem&gt;Either use the texture color from the previous layer, or
1563 if this is layer 0, use the color of the material as set with
1564 cogl_material_set_color()&lt;/listitem&gt;
1565 &lt;/varlistentry&gt;
1566 &lt;/variablelist&gt;
1567 &lt;refsect2 id="cogl-Layer-Combine-Examples"&gt;
1568 &lt;title&gt;Layer Combine Examples&lt;/title&gt;
1569 &lt;para&gt;This is effectively what the default blending is:&lt;/para&gt;
1570 &lt;informalexample&gt;&lt;programlisting&gt;
1571 RGBA = MODULATE (PREVIOUS, TEXTURE)
1572 &lt;/programlisting&gt;&lt;/informalexample&gt;
1573 &lt;para&gt;This could be used to cross-fade between two images, using
1574 the alpha component of a constant as the interpolator. The constant
1575 color is given by calling cogl_material_set_layer_constant.&lt;/para&gt;
1576 &lt;informalexample&gt;&lt;programlisting&gt;
1577 RGBA = INTERPOLATE (PREVIOUS, TEXTURE, CONSTANT[A])
1578 &lt;/programlisting&gt;&lt;/informalexample&gt;
1579 &lt;/refsect2&gt;
1580 &lt;note&gt;You can't give a multiplication factor for arguments as you can
1581 with blending.&lt;/note&gt;
1582 described texture combining is supported by the underlying driver and
1583 or hardware. On failure, %FALSE is returned and @error is set</doc>
1584         <return-value transfer-ownership="none">
1585           <doc xml:whitespace="preserve">%TRUE if the blend string was successfully parsed, and the</doc>
1586           <type name="boolean" c:type="gboolean"/>
1587         </return-value>
1588         <parameters>
1589           <parameter name="layer_index" transfer-ownership="none">
1590             <doc xml:whitespace="preserve">Specifies the layer you want define a combine function for</doc>
1591             <type name="int" c:type="int"/>
1592           </parameter>
1593           <parameter name="blend_string" transfer-ownership="none">
1594             <doc xml:whitespace="preserve">A &lt;link linkend="cogl-Blend-Strings"&gt;Cogl blend string&lt;/link&gt; describing the desired texture combine function.</doc>
1595             <type name="utf8" c:type="char*"/>
1596           </parameter>
1597         </parameters>
1598       </method>
1599       <method name="set_layer_combine_constant"
1600               c:identifier="cogl_material_set_layer_combine_constant"
1601               version="1.0">
1602         <doc xml:whitespace="preserve">When you are using the 'CONSTANT' color source in a layer combine
1603 description then you can use this function to define its value.</doc>
1604         <return-value transfer-ownership="none">
1605           <type name="none" c:type="void"/>
1606         </return-value>
1607         <parameters>
1608           <parameter name="layer_index" transfer-ownership="none">
1609             <doc xml:whitespace="preserve">Specifies the layer you want to specify a constant used for texture combining</doc>
1610             <type name="int" c:type="int"/>
1611           </parameter>
1612           <parameter name="constant" transfer-ownership="none">
1613             <doc xml:whitespace="preserve">The constant color you want</doc>
1614             <type name="Color" c:type="CoglColor*"/>
1615           </parameter>
1616         </parameters>
1617       </method>
1618       <method name="set_layer_matrix"
1619               c:identifier="cogl_material_set_layer_matrix">
1620         <doc xml:whitespace="preserve">This function lets you set a matrix that can be used to e.g. translate
1621 and rotate a single layer of a material used to fill your geometry.</doc>
1622         <return-value transfer-ownership="none">
1623           <type name="none" c:type="void"/>
1624         </return-value>
1625         <parameters>
1626           <parameter name="layer_index" transfer-ownership="none">
1627             <doc xml:whitespace="preserve">the index for the layer inside @material</doc>
1628             <type name="int" c:type="int"/>
1629           </parameter>
1630           <parameter name="matrix" transfer-ownership="none">
1631             <doc xml:whitespace="preserve">the transformation matrix for the layer</doc>
1632             <type name="Matrix" c:type="CoglMatrix*"/>
1633           </parameter>
1634         </parameters>
1635       </method>
1636       <method name="get_layers" c:identifier="cogl_material_get_layers">
1637         <doc xml:whitespace="preserve">This function lets you access a material's internal list of layers
1638 for iteration.
1639 &lt;note&gt;You should avoid using this API if possible since it was only
1640 made public by mistake and will be deprecated when we have
1641 suitable alternative.&lt;/note&gt;
1642 &lt;note&gt;It's important to understand that the list returned may not
1643 remain valid if you modify the material or any of the layers in any
1644 way and so you would have to re-get the list in that
1645 situation.&lt;/note&gt;
1646 list of #CoglMaterialLayer&lt;!-- --&gt;'s that can be passed to the
1647 cogl_material_layer_* functions. The list is owned by Cogl and it
1648 should not be modified or freed</doc>
1649         <return-value transfer-ownership="none">
1650           <doc xml:whitespace="preserve">A</doc>
1651           <type name="GLib.List" c:type="GList*">
1652             <type name="MaterialLayer"/>
1653           </type>
1654         </return-value>
1655       </method>
1656       <method name="get_n_layers"
1657               c:identifier="cogl_material_get_n_layers"
1658               version="1.0">
1659         <doc xml:whitespace="preserve">Retrieves the number of layers defined for the given @material</doc>
1660         <return-value transfer-ownership="none">
1661           <doc xml:whitespace="preserve">the number of layers</doc>
1662           <type name="int" c:type="int"/>
1663         </return-value>
1664       </method>
1665       <method name="set_layer_filters"
1666               c:identifier="cogl_material_set_layer_filters">
1667         <doc xml:whitespace="preserve">Changes the decimation and interpolation filters used when a texture is
1668 drawn at other scales than 100%.</doc>
1669         <return-value transfer-ownership="none">
1670           <type name="none" c:type="void"/>
1671         </return-value>
1672         <parameters>
1673           <parameter name="layer_index" transfer-ownership="none">
1674             <doc xml:whitespace="preserve">the layer number to change.</doc>
1675             <type name="int" c:type="int"/>
1676           </parameter>
1677           <parameter name="min_filter" transfer-ownership="none">
1678             <doc xml:whitespace="preserve">the filter used when scaling a texture down.</doc>
1679             <type name="MaterialFilter" c:type="CoglMaterialFilter"/>
1680           </parameter>
1681           <parameter name="mag_filter" transfer-ownership="none">
1682             <doc xml:whitespace="preserve">the filter used when magnifying a texture.</doc>
1683             <type name="MaterialFilter" c:type="CoglMaterialFilter"/>
1684           </parameter>
1685         </parameters>
1686       </method>
1687       <method name="set_layer_point_sprite_coords_enabled"
1688               c:identifier="cogl_material_set_layer_point_sprite_coords_enabled"
1689               version="1.4"
1690               throws="1">
1691         <doc xml:whitespace="preserve">When rendering points, if @enable is %TRUE then the texture
1692 coordinates for this layer will be replaced with coordinates that
1693 vary from 0.0 to 1.0 across the primitive. The top left of the
1694 point will have the coordinates 0.0,0.0 and the bottom right will
1695 have 1.0,1.0. If @enable is %FALSE then the coordinates will be
1696 fixed for the entire point.
1697 This function will only work if %COGL_FEATURE_POINT_SPRITE is
1698 available. If the feature is not available then the function will
1699 return %FALSE and set @error.</doc>
1700         <return-value transfer-ownership="none">
1701           <doc xml:whitespace="preserve">%TRUE if the function succeeds, %FALSE otherwise.</doc>
1702           <type name="boolean" c:type="gboolean"/>
1703         </return-value>
1704         <parameters>
1705           <parameter name="layer_index" transfer-ownership="none">
1706             <doc xml:whitespace="preserve">the layer number to change.</doc>
1707             <type name="int" c:type="int"/>
1708           </parameter>
1709           <parameter name="enable" transfer-ownership="none">
1710             <doc xml:whitespace="preserve">whether to enable point sprite coord generation.</doc>
1711             <type name="boolean" c:type="gboolean"/>
1712           </parameter>
1713         </parameters>
1714       </method>
1715       <method name="get_layer_point_sprite_coords_enabled"
1716               c:identifier="cogl_material_get_layer_point_sprite_coords_enabled"
1717               version="1.4">
1718         <doc xml:whitespace="preserve">Gets whether point sprite coordinate generation is enabled for this
1719 texture layer.
1720 point sprite coordinates.</doc>
1721         <return-value transfer-ownership="none">
1722           <doc xml:whitespace="preserve">whether the texture coordinates will be replaced with</doc>
1723           <type name="boolean" c:type="gboolean"/>
1724         </return-value>
1725         <parameters>
1726           <parameter name="layer_index" transfer-ownership="none">
1727             <doc xml:whitespace="preserve">the layer number to check.</doc>
1728             <type name="int" c:type="int"/>
1729           </parameter>
1730         </parameters>
1731       </method>
1732       <method name="set_layer_wrap_mode_s"
1733               c:identifier="cogl_material_set_layer_wrap_mode_s"
1734               version="1.4">
1735         <doc xml:whitespace="preserve">Sets the wrap mode for the 's' coordinate of texture lookups on this layer.</doc>
1736         <return-value transfer-ownership="none">
1737           <type name="none" c:type="void"/>
1738         </return-value>
1739         <parameters>
1740           <parameter name="layer_index" transfer-ownership="none">
1741             <doc xml:whitespace="preserve">the layer number to change.</doc>
1742             <type name="int" c:type="int"/>
1743           </parameter>
1744           <parameter name="mode" transfer-ownership="none">
1745             <doc xml:whitespace="preserve">the new wrap mode</doc>
1746             <type name="MaterialWrapMode" c:type="CoglMaterialWrapMode"/>
1747           </parameter>
1748         </parameters>
1749       </method>
1750       <method name="set_layer_wrap_mode_t"
1751               c:identifier="cogl_material_set_layer_wrap_mode_t"
1752               version="1.4">
1753         <doc xml:whitespace="preserve">Sets the wrap mode for the 't' coordinate of texture lookups on this layer.</doc>
1754         <return-value transfer-ownership="none">
1755           <type name="none" c:type="void"/>
1756         </return-value>
1757         <parameters>
1758           <parameter name="layer_index" transfer-ownership="none">
1759             <doc xml:whitespace="preserve">the layer number to change.</doc>
1760             <type name="int" c:type="int"/>
1761           </parameter>
1762           <parameter name="mode" transfer-ownership="none">
1763             <doc xml:whitespace="preserve">the new wrap mode</doc>
1764             <type name="MaterialWrapMode" c:type="CoglMaterialWrapMode"/>
1765           </parameter>
1766         </parameters>
1767       </method>
1768       <method name="set_layer_wrap_mode_p"
1769               c:identifier="cogl_material_set_layer_wrap_mode_p"
1770               version="1.4">
1771         <doc xml:whitespace="preserve">Sets the wrap mode for the 'p' coordinate of texture lookups on
1772 this layer. 'p' is the third coordinate.</doc>
1773         <return-value transfer-ownership="none">
1774           <type name="none" c:type="void"/>
1775         </return-value>
1776         <parameters>
1777           <parameter name="layer_index" transfer-ownership="none">
1778             <doc xml:whitespace="preserve">the layer number to change.</doc>
1779             <type name="int" c:type="int"/>
1780           </parameter>
1781           <parameter name="mode" transfer-ownership="none">
1782             <doc xml:whitespace="preserve">the new wrap mode</doc>
1783             <type name="MaterialWrapMode" c:type="CoglMaterialWrapMode"/>
1784           </parameter>
1785         </parameters>
1786       </method>
1787       <method name="set_layer_wrap_mode"
1788               c:identifier="cogl_material_set_layer_wrap_mode"
1789               version="1.4">
1790         <doc xml:whitespace="preserve">Sets the wrap mode for all three coordinates of texture lookups on
1791 this layer. This is equivalent to calling
1792 cogl_material_set_layer_wrap_mode_s(),
1793 cogl_material_set_layer_wrap_mode_t() and
1794 cogl_material_set_layer_wrap_mode_p() separately.</doc>
1795         <return-value transfer-ownership="none">
1796           <type name="none" c:type="void"/>
1797         </return-value>
1798         <parameters>
1799           <parameter name="layer_index" transfer-ownership="none">
1800             <doc xml:whitespace="preserve">the layer number to change.</doc>
1801             <type name="int" c:type="int"/>
1802           </parameter>
1803           <parameter name="mode" transfer-ownership="none">
1804             <doc xml:whitespace="preserve">the new wrap mode</doc>
1805             <type name="MaterialWrapMode" c:type="CoglMaterialWrapMode"/>
1806           </parameter>
1807         </parameters>
1808       </method>
1809       <method name="set_depth_test_enabled"
1810               c:identifier="cogl_material_set_depth_test_enabled"
1811               version="1.4">
1812         <doc xml:whitespace="preserve">Enables or disables depth testing according to the value of
1813 If depth testing is enable then the #CoglDepthTestFunction set
1814 using cogl_material_set_depth_test_function() us used to evaluate
1815 the depth value of incoming fragments against the corresponding
1816 value stored in the current depth buffer, and if the test passes
1817 then the fragments depth value is used to update the depth buffer.
1818 (unless you have disabled depth writing via
1819 cogl_material_set_depth_writing_enabled ())
1820 By default depth testing is disabled.</doc>
1821         <return-value transfer-ownership="none">
1822           <type name="none" c:type="void"/>
1823         </return-value>
1824         <parameters>
1825           <parameter name="enable" transfer-ownership="none">
1826             <doc xml:whitespace="preserve">The enable state you want</doc>
1827             <type name="boolean" c:type="gboolean"/>
1828           </parameter>
1829         </parameters>
1830       </method>
1831       <method name="get_depth_test_enabled"
1832               c:identifier="cogl_material_get_depth_test_enabled"
1833               version="1.4">
1834         <doc xml:whitespace="preserve">Gets the current depth test enabled state as previously set by
1835 cogl_material_set_depth_test_enabled().</doc>
1836         <return-value transfer-ownership="none">
1837           <doc xml:whitespace="preserve">The material's current depth test enabled state.</doc>
1838           <type name="boolean" c:type="gboolean"/>
1839         </return-value>
1840       </method>
1841       <method name="set_depth_writing_enabled"
1842               c:identifier="cogl_material_set_depth_writing_enabled"
1843               version="1.4">
1844         <doc xml:whitespace="preserve">Enables or disables depth buffer writing according to the value of
1845 between a fragment's depth value and the corresponding depth buffer
1846 value passes then the fragment's depth is written to the depth
1847 buffer unless writing is disabled here.
1848 By default depth writing is enabled</doc>
1849         <return-value transfer-ownership="none">
1850           <type name="none" c:type="void"/>
1851         </return-value>
1852         <parameters>
1853           <parameter name="enable" transfer-ownership="none">
1854             <doc xml:whitespace="preserve">The enable state you want</doc>
1855             <type name="boolean" c:type="gboolean"/>
1856           </parameter>
1857         </parameters>
1858       </method>
1859       <method name="get_depth_writing_enabled"
1860               c:identifier="cogl_material_get_depth_writing_enabled"
1861               version="1.4">
1862         <doc xml:whitespace="preserve">Gets the depth writing enable state as set by the corresponding
1863 cogl_material_set_depth_writing_enabled.</doc>
1864         <return-value transfer-ownership="none">
1865           <doc xml:whitespace="preserve">The current depth writing enable state</doc>
1866           <type name="boolean" c:type="gboolean"/>
1867         </return-value>
1868       </method>
1869       <method name="set_depth_test_function"
1870               c:identifier="cogl_material_set_depth_test_function"
1871               version="1.4">
1872         <doc xml:whitespace="preserve">Sets the #CoglDepthTestFunction used to compare the depth value of
1873 an incoming fragment against the corresponding value in the current
1874 depth buffer.</doc>
1875         <return-value transfer-ownership="none">
1876           <type name="none" c:type="void"/>
1877         </return-value>
1878         <parameters>
1879           <parameter name="function" transfer-ownership="none">
1880             <doc xml:whitespace="preserve">The #CoglDepthTestFunction to set</doc>
1881             <type name="DepthTestFunction" c:type="CoglDepthTestFunction"/>
1882           </parameter>
1883         </parameters>
1884       </method>
1885       <method name="get_depth_test_function"
1886               c:identifier="cogl_material_get_depth_test_function"
1887               version="1.4">
1888         <doc xml:whitespace="preserve">Gets the current depth test enable state as previously set via
1889 cogl_material_set_depth_test_enabled().</doc>
1890         <return-value transfer-ownership="full">
1891           <doc xml:whitespace="preserve">The current depth test enable state.</doc>
1892           <type name="DepthTestFunction" c:type="CoglDepthTestFunction"/>
1893         </return-value>
1894       </method>
1895       <method name="set_depth_range"
1896               c:identifier="cogl_material_set_depth_range"
1897               version="1.4"
1898               throws="1">
1899         <doc xml:whitespace="preserve">Sets the range to map depth values in normalized device coordinates
1900 to before writing out to a depth buffer.
1901 After your geometry has be transformed, clipped and had perspective
1902 division applied placing it in normalized device
1903 coordinates all depth values between the near and far z clipping
1904 planes are in the range -1 to 1. Before writing any depth value to
1905 the depth buffer though the value is mapped into the range [0, 1].
1906 With this function you can change the range which depth values are
1907 mapped too although the range must still lye within the range [0,
1908 1].
1909 If your driver does not support this feature (for example you are
1910 using GLES 1 drivers) then this will return %FALSE and set an error
1911 if @error isn't NULL. You can check ahead of time for the
1912 %COGL_FEATURE_DEPTH_RANGE feature with cogl_features_available() to
1913 know if this function will succeed.
1914 By default normalized device coordinate depth values are mapped to
1915 the full range of depth buffer values, [0, 1].</doc>
1916         <return-value transfer-ownership="none">
1917           <doc xml:whitespace="preserve">%TRUE if driver support is available else %FALSE.</doc>
1918           <type name="boolean" c:type="gboolean"/>
1919         </return-value>
1920         <parameters>
1921           <parameter name="near_val" transfer-ownership="none">
1922             <doc xml:whitespace="preserve">The near component of the desired depth range which will be clamped to the range [0, 1]</doc>
1923             <type name="float" c:type="float"/>
1924           </parameter>
1925           <parameter name="far_val" transfer-ownership="none">
1926             <doc xml:whitespace="preserve">The far component of the desired depth range which will be clamped to the range [0, 1]</doc>
1927             <type name="float" c:type="float"/>
1928           </parameter>
1929         </parameters>
1930       </method>
1931       <method name="get_depth_range"
1932               c:identifier="cogl_material_get_depth_range">
1933         <return-value transfer-ownership="none">
1934           <type name="none" c:type="void"/>
1935         </return-value>
1936         <parameters>
1937           <parameter name="near_val"
1938                      direction="out"
1939                      caller-allocates="0"
1940                      transfer-ownership="full">
1941             <type name="float" c:type="float*"/>
1942           </parameter>
1943           <parameter name="far_val"
1944                      direction="out"
1945                      caller-allocates="0"
1946                      transfer-ownership="full">
1947             <type name="float" c:type="float*"/>
1948           </parameter>
1949         </parameters>
1950       </method>
1951     </record>
1952     <enumeration name="MaterialAlphaFunc"
1953                  glib:type-name="CoglMaterialAlphaFunc"
1954                  glib:get-type="cogl_material_alpha_func_get_type"
1955                  c:type="CoglMaterialAlphaFunc">
1956       <doc xml:whitespace="preserve">Alpha testing happens before blending primitives with the framebuffer and
1957 gives an opportunity to discard fragments based on a comparison with the
1958 incoming alpha value and a reference alpha value. The #CoglMaterialAlphaFunc
1959 determines how the comparison is done.</doc>
1960       <member name="never"
1961               value="512"
1962               c:identifier="COGL_MATERIAL_ALPHA_FUNC_NEVER"
1963               glib:nick="never"/>
1964       <member name="less"
1965               value="513"
1966               c:identifier="COGL_MATERIAL_ALPHA_FUNC_LESS"
1967               glib:nick="less"/>
1968       <member name="equal"
1969               value="514"
1970               c:identifier="COGL_MATERIAL_ALPHA_FUNC_EQUAL"
1971               glib:nick="equal"/>
1972       <member name="lequal"
1973               value="515"
1974               c:identifier="COGL_MATERIAL_ALPHA_FUNC_LEQUAL"
1975               glib:nick="lequal"/>
1976       <member name="greater"
1977               value="516"
1978               c:identifier="COGL_MATERIAL_ALPHA_FUNC_GREATER"
1979               glib:nick="greater"/>
1980       <member name="notequal"
1981               value="517"
1982               c:identifier="COGL_MATERIAL_ALPHA_FUNC_NOTEQUAL"
1983               glib:nick="notequal"/>
1984       <member name="gequal"
1985               value="518"
1986               c:identifier="COGL_MATERIAL_ALPHA_FUNC_GEQUAL"
1987               glib:nick="gequal"/>
1988       <member name="always"
1989               value="519"
1990               c:identifier="COGL_MATERIAL_ALPHA_FUNC_ALWAYS"
1991               glib:nick="always"/>
1992     </enumeration>
1993     <enumeration name="MaterialFilter"
1994                  glib:type-name="CoglMaterialFilter"
1995                  glib:get-type="cogl_material_filter_get_type"
1996                  c:type="CoglMaterialFilter">
1997       <doc xml:whitespace="preserve">Texture filtering is used whenever the current pixel maps either to more
1998 than one texture element (texel) or less than one. These filter enums
1999 correspond to different strategies used to come up with a pixel color, by
2000 possibly referring to multiple neighbouring texels and taking a weighted
2001 average or simply using the nearest texel.</doc>
2002       <member name="nearest"
2003               value="9728"
2004               c:identifier="COGL_MATERIAL_FILTER_NEAREST"
2005               glib:nick="nearest"/>
2006       <member name="linear"
2007               value="9729"
2008               c:identifier="COGL_MATERIAL_FILTER_LINEAR"
2009               glib:nick="linear"/>
2010       <member name="nearest_mipmap_nearest"
2011               value="9984"
2012               c:identifier="COGL_MATERIAL_FILTER_NEAREST_MIPMAP_NEAREST"
2013               glib:nick="nearest-mipmap-nearest"/>
2014       <member name="linear_mipmap_nearest"
2015               value="9985"
2016               c:identifier="COGL_MATERIAL_FILTER_LINEAR_MIPMAP_NEAREST"
2017               glib:nick="linear-mipmap-nearest"/>
2018       <member name="nearest_mipmap_linear"
2019               value="9986"
2020               c:identifier="COGL_MATERIAL_FILTER_NEAREST_MIPMAP_LINEAR"
2021               glib:nick="nearest-mipmap-linear"/>
2022       <member name="linear_mipmap_linear"
2023               value="9987"
2024               c:identifier="COGL_MATERIAL_FILTER_LINEAR_MIPMAP_LINEAR"
2025               glib:nick="linear-mipmap-linear"/>
2026     </enumeration>
2027     <record name="MaterialLayer" c:type="CoglMaterialLayer">
2028       <method name="get_texture"
2029               c:identifier="cogl_material_layer_get_texture">
2030         <doc xml:whitespace="preserve">Extracts a texture handle for a specific layer.
2031 &lt;note&gt;In the future Cogl may support purely GLSL based layers; for those
2032 layers this function which will likely return %COGL_INVALID_HANDLE if you
2033 try to get the texture handle from them. Considering this scenario, you
2034 should call cogl_material_layer_get_type() first in order check it is of
2035 type %COGL_MATERIAL_LAYER_TYPE_TEXTURE before calling this function.&lt;/note&gt;</doc>
2036         <return-value transfer-ownership="full">
2037           <doc xml:whitespace="preserve">a #CoglHandle for the texture inside the layer</doc>
2038           <type name="Handle" c:type="CoglHandle"/>
2039         </return-value>
2040       </method>
2041       <method name="get_min_filter"
2042               c:identifier="cogl_material_layer_get_min_filter">
2043         <doc xml:whitespace="preserve">Queries the currently set downscaling filter for a material layer</doc>
2044         <return-value transfer-ownership="full">
2045           <doc xml:whitespace="preserve">the current downscaling filter</doc>
2046           <type name="MaterialFilter" c:type="CoglMaterialFilter"/>
2047         </return-value>
2048       </method>
2049       <method name="get_mag_filter"
2050               c:identifier="cogl_material_layer_get_mag_filter">
2051         <doc xml:whitespace="preserve">Queries the currently set downscaling filter for a material later</doc>
2052         <return-value transfer-ownership="full">
2053           <doc xml:whitespace="preserve">the current downscaling filter</doc>
2054           <type name="MaterialFilter" c:type="CoglMaterialFilter"/>
2055         </return-value>
2056       </method>
2057       <method name="get_wrap_mode_s"
2058               c:identifier="cogl_material_layer_get_wrap_mode_s"
2059               version="1.4">
2060         <doc xml:whitespace="preserve">Gets the wrap mode for the 's' coordinate of texture lookups on this layer.</doc>
2061         <return-value transfer-ownership="full">
2062           <doc xml:whitespace="preserve">the wrap mode value for the s coordinate.</doc>
2063           <type name="MaterialWrapMode" c:type="CoglMaterialWrapMode"/>
2064         </return-value>
2065       </method>
2066       <method name="get_wrap_mode_t"
2067               c:identifier="cogl_material_layer_get_wrap_mode_t"
2068               version="1.4">
2069         <doc xml:whitespace="preserve">Gets the wrap mode for the 't' coordinate of texture lookups on this layer.</doc>
2070         <return-value transfer-ownership="full">
2071           <doc xml:whitespace="preserve">the wrap mode value for the t coordinate.</doc>
2072           <type name="MaterialWrapMode" c:type="CoglMaterialWrapMode"/>
2073         </return-value>
2074       </method>
2075       <method name="get_wrap_mode_p"
2076               c:identifier="cogl_material_layer_get_wrap_mode_p"
2077               version="1.4">
2078         <doc xml:whitespace="preserve">Gets the wrap mode for the 'p' coordinate of texture lookups on
2079 this layer. 'p' is the third coordinate.</doc>
2080         <return-value transfer-ownership="full">
2081           <doc xml:whitespace="preserve">the wrap mode value for the p coordinate.</doc>
2082           <type name="MaterialWrapMode" c:type="CoglMaterialWrapMode"/>
2083         </return-value>
2084       </method>
2085     </record>
2086     <enumeration name="MaterialLayerType"
2087                  version="1.0"
2088                  glib:type-name="CoglMaterialLayerType"
2089                  glib:get-type="cogl_material_layer_type_get_type"
2090                  c:type="CoglMaterialLayerType">
2091       <doc xml:whitespace="preserve">Available types of layers for a #CoglMaterial. This enumeration
2092 might be expanded in later versions.</doc>
2093       <member name="texture"
2094               value="0"
2095               c:identifier="COGL_MATERIAL_LAYER_TYPE_TEXTURE"
2096               glib:nick="texture"/>
2097     </enumeration>
2098     <enumeration name="MaterialWrapMode"
2099                  version="1.4"
2100                  glib:type-name="CoglMaterialWrapMode"
2101                  glib:get-type="cogl_material_wrap_mode_get_type"
2102                  c:type="CoglMaterialWrapMode">
2103       <doc xml:whitespace="preserve">The wrap mode specifies what happens when texture coordinates
2104 outside the range 0→1 are used. Note that if the filter mode is
2105 anything but %COGL_MATERIAL_FILTER_NEAREST then texels outside the
2106 range 0→1 might be used even when the coordinate is exactly 0 or 1
2107 because OpenGL will try to sample neighbouring pixels. For example
2108 if you are trying to render the full texture then you may get
2109 artifacts around the edges when the pixels from the other side are
2110 merged in if the wrap mode is set to repeat.</doc>
2111       <member name="repeat"
2112               value="10497"
2113               c:identifier="COGL_MATERIAL_WRAP_MODE_REPEAT"
2114               glib:nick="repeat"/>
2115       <member name="clamp_to_edge"
2116               value="33071"
2117               c:identifier="COGL_MATERIAL_WRAP_MODE_CLAMP_TO_EDGE"
2118               glib:nick="clamp-to-edge"/>
2119       <member name="automatic"
2120               value="519"
2121               c:identifier="COGL_MATERIAL_WRAP_MODE_AUTOMATIC"
2122               glib:nick="automatic"/>
2123     </enumeration>
2124     <record name="Matrix" c:type="CoglMatrix">
2125       <doc xml:whitespace="preserve">A CoglMatrix holds a 4x4 transform matrix. This is a single precision,
2126 column-major matrix which means it is compatible with what OpenGL expects.
2127 A CoglMatrix can represent transforms such as, rotations, scaling,
2128 translation, sheering, and linear projections. You can combine these
2129 transforms by multiplying multiple matrices in the order you want them
2130 applied.
2131 The transformation of a vertex (x, y, z, w) by a CoglMatrix is given by:
2132 |[
2133 x_new = xx * x + xy * y + xz * z + xw * w
2134 y_new = yx * x + yy * y + yz * z + yw * w
2135 z_new = zx * x + zy * y + zz * z + zw * w
2136 w_new = wx * x + wy * y + wz * z + ww * w
2137 ]|
2138 Where w is normally 1
2139 &lt;note&gt;You must consider the members of the CoglMatrix structure read only,
2140 and all matrix modifications must be done via the cogl_matrix API. This
2141 allows Cogl to annotate the matrices internally. Violation of this will give
2142 undefined results. If you need to initialize a matrix with a constant other
2143 than the identity matrix you can use cogl_matrix_init_from_array().&lt;/note&gt;</doc>
2144       <field name="xx" writable="1">
2145         <type name="float" c:type="float"/>
2146       </field>
2147       <field name="yx" writable="1">
2148         <type name="float" c:type="float"/>
2149       </field>
2150       <field name="zx" writable="1">
2151         <type name="float" c:type="float"/>
2152       </field>
2153       <field name="wx" writable="1">
2154         <type name="float" c:type="float"/>
2155       </field>
2156       <field name="xy" writable="1">
2157         <type name="float" c:type="float"/>
2158       </field>
2159       <field name="yy" writable="1">
2160         <type name="float" c:type="float"/>
2161       </field>
2162       <field name="zy" writable="1">
2163         <type name="float" c:type="float"/>
2164       </field>
2165       <field name="wy" writable="1">
2166         <type name="float" c:type="float"/>
2167       </field>
2168       <field name="xz" writable="1">
2169         <type name="float" c:type="float"/>
2170       </field>
2171       <field name="yz" writable="1">
2172         <type name="float" c:type="float"/>
2173       </field>
2174       <field name="zz" writable="1">
2175         <type name="float" c:type="float"/>
2176       </field>
2177       <field name="wz" writable="1">
2178         <type name="float" c:type="float"/>
2179       </field>
2180       <field name="xw" writable="1">
2181         <type name="float" c:type="float"/>
2182       </field>
2183       <field name="yw" writable="1">
2184         <type name="float" c:type="float"/>
2185       </field>
2186       <field name="zw" writable="1">
2187         <type name="float" c:type="float"/>
2188       </field>
2189       <field name="ww" writable="1">
2190         <type name="float" c:type="float"/>
2191       </field>
2192       <field name="inv" writable="1">
2193         <array zero-terminated="0" c:type="float" fixed-size="16">
2194           <type name="float"/>
2195         </array>
2196       </field>
2197       <field name="type" writable="1">
2198         <type name="uint" c:type="unsigned"/>
2199       </field>
2200       <field name="flags" writable="1">
2201         <type name="uint" c:type="unsigned"/>
2202       </field>
2203       <field name="_padding3" writable="1">
2204         <type name="uint" c:type="unsigned"/>
2205       </field>
2206       <method name="init_identity" c:identifier="cogl_matrix_init_identity">
2207         <doc xml:whitespace="preserve">Resets matrix to the identity matrix:
2208 |[
2209 .xx=1; .xy=0; .xz=0; .xw=0;
2210 .yx=0; .yy=1; .yz=0; .yw=0;
2211 .zx=0; .zy=0; .zz=1; .zw=0;
2212 .wx=0; .wy=0; .wz=0; .ww=1;
2213 ]|</doc>
2214         <return-value transfer-ownership="none">
2215           <type name="none" c:type="void"/>
2216         </return-value>
2217       </method>
2218       <method name="multiply" c:identifier="cogl_matrix_multiply">
2219         <doc xml:whitespace="preserve">Multiplies the two supplied matrices together and stores
2220 the resulting matrix inside @result</doc>
2221         <return-value transfer-ownership="none">
2222           <type name="none" c:type="void"/>
2223         </return-value>
2224         <parameters>
2225           <parameter name="a" transfer-ownership="none">
2226             <doc xml:whitespace="preserve">A 4x4 transformation matrix</doc>
2227             <type name="Matrix" c:type="CoglMatrix*"/>
2228           </parameter>
2229           <parameter name="b" transfer-ownership="none">
2230             <doc xml:whitespace="preserve">A 4x4 transformation matrix</doc>
2231             <type name="Matrix" c:type="CoglMatrix*"/>
2232           </parameter>
2233         </parameters>
2234       </method>
2235       <method name="rotate" c:identifier="cogl_matrix_rotate">
2236         <doc xml:whitespace="preserve">Multiplies @matrix with a rotation matrix that applies a rotation
2237 of @angle degrees around the specified 3D vector.</doc>
2238         <return-value transfer-ownership="none">
2239           <type name="none" c:type="void"/>
2240         </return-value>
2241         <parameters>
2242           <parameter name="angle" transfer-ownership="none">
2243             <doc xml:whitespace="preserve">The angle you want to rotate in degrees</doc>
2244             <type name="float" c:type="float"/>
2245           </parameter>
2246           <parameter name="x" transfer-ownership="none">
2247             <doc xml:whitespace="preserve">X component of your rotation vector</doc>
2248             <type name="float" c:type="float"/>
2249           </parameter>
2250           <parameter name="y" transfer-ownership="none">
2251             <doc xml:whitespace="preserve">Y component of your rotation vector</doc>
2252             <type name="float" c:type="float"/>
2253           </parameter>
2254           <parameter name="z" transfer-ownership="none">
2255             <doc xml:whitespace="preserve">Z component of your rotation vector</doc>
2256             <type name="float" c:type="float"/>
2257           </parameter>
2258         </parameters>
2259       </method>
2260       <method name="translate" c:identifier="cogl_matrix_translate">
2261         <doc xml:whitespace="preserve">Multiplies @matrix with a transform matrix that translates along
2262 the X, Y and Z axis.</doc>
2263         <return-value transfer-ownership="none">
2264           <type name="none" c:type="void"/>
2265         </return-value>
2266         <parameters>
2267           <parameter name="x" transfer-ownership="none">
2268             <doc xml:whitespace="preserve">The X translation you want to apply</doc>
2269             <type name="float" c:type="float"/>
2270           </parameter>
2271           <parameter name="y" transfer-ownership="none">
2272             <doc xml:whitespace="preserve">The Y translation you want to apply</doc>
2273             <type name="float" c:type="float"/>
2274           </parameter>
2275           <parameter name="z" transfer-ownership="none">
2276             <doc xml:whitespace="preserve">The Z translation you want to apply</doc>
2277             <type name="float" c:type="float"/>
2278           </parameter>
2279         </parameters>
2280       </method>
2281       <method name="scale" c:identifier="cogl_matrix_scale">
2282         <doc xml:whitespace="preserve">Multiplies @matrix with a transform matrix that scales along the X,
2283 Y and Z axis.</doc>
2284         <return-value transfer-ownership="none">
2285           <type name="none" c:type="void"/>
2286         </return-value>
2287         <parameters>
2288           <parameter name="sx" transfer-ownership="none">
2289             <doc xml:whitespace="preserve">The X scale factor</doc>
2290             <type name="float" c:type="float"/>
2291           </parameter>
2292           <parameter name="sy" transfer-ownership="none">
2293             <doc xml:whitespace="preserve">The Y scale factor</doc>
2294             <type name="float" c:type="float"/>
2295           </parameter>
2296           <parameter name="sz" transfer-ownership="none">
2297             <doc xml:whitespace="preserve">The Z scale factor</doc>
2298             <type name="float" c:type="float"/>
2299           </parameter>
2300         </parameters>
2301       </method>
2302       <method name="frustum" c:identifier="cogl_matrix_frustum">
2303         <doc xml:whitespace="preserve">Multiplies @matrix by the given frustum perspective matrix.</doc>
2304         <return-value transfer-ownership="none">
2305           <type name="none" c:type="void"/>
2306         </return-value>
2307         <parameters>
2308           <parameter name="left" transfer-ownership="none">
2309             <doc xml:whitespace="preserve">coord of left vertical clipping plane</doc>
2310             <type name="float" c:type="float"/>
2311           </parameter>
2312           <parameter name="right" transfer-ownership="none">
2313             <doc xml:whitespace="preserve">coord of right vertical clipping plane</doc>
2314             <type name="float" c:type="float"/>
2315           </parameter>
2316           <parameter name="bottom" transfer-ownership="none">
2317             <doc xml:whitespace="preserve">coord of bottom horizontal clipping plane</doc>
2318             <type name="float" c:type="float"/>
2319           </parameter>
2320           <parameter name="top" transfer-ownership="none">
2321             <doc xml:whitespace="preserve">coord of top horizontal clipping plane</doc>
2322             <type name="float" c:type="float"/>
2323           </parameter>
2324           <parameter name="z_near" transfer-ownership="none">
2325             <doc xml:whitespace="preserve">positive distance to near depth clipping plane</doc>
2326             <type name="float" c:type="float"/>
2327           </parameter>
2328           <parameter name="z_far" transfer-ownership="none">
2329             <doc xml:whitespace="preserve">positive distance to far depth clipping plane</doc>
2330             <type name="float" c:type="float"/>
2331           </parameter>
2332         </parameters>
2333       </method>
2334       <method name="perspective" c:identifier="cogl_matrix_perspective">
2335         <doc xml:whitespace="preserve">Multiplies @matrix by the described perspective matrix
2336 &lt;note&gt;You should be careful not to have to great a @z_far / @z_near ratio
2337 since that will reduce the effectiveness of depth testing since there wont
2338 be enough precision to identify the depth of objects near to each
2339 other.&lt;/note&gt;</doc>
2340         <return-value transfer-ownership="none">
2341           <type name="none" c:type="void"/>
2342         </return-value>
2343         <parameters>
2344           <parameter name="fov_y" transfer-ownership="none">
2345             <doc xml:whitespace="preserve">A field of view angle for the Y axis</doc>
2346             <type name="float" c:type="float"/>
2347           </parameter>
2348           <parameter name="aspect" transfer-ownership="none">
2349             <doc xml:whitespace="preserve">The ratio of width to height determining the field of view angle for the x axis.</doc>
2350             <type name="float" c:type="float"/>
2351           </parameter>
2352           <parameter name="z_near" transfer-ownership="none">
2353             <doc xml:whitespace="preserve">The distance to the near clip plane. Never pass 0 and always pass a positive number.</doc>
2354             <type name="float" c:type="float"/>
2355           </parameter>
2356           <parameter name="z_far" transfer-ownership="none">
2357             <doc xml:whitespace="preserve">The distance to the far clip plane. (Should always be positive)</doc>
2358             <type name="float" c:type="float"/>
2359           </parameter>
2360         </parameters>
2361       </method>
2362       <method name="ortho" c:identifier="cogl_matrix_ortho">
2363         <doc xml:whitespace="preserve">Multiplies @matrix by a parallel projection matrix.</doc>
2364         <return-value transfer-ownership="none">
2365           <type name="none" c:type="void"/>
2366         </return-value>
2367         <parameters>
2368           <parameter name="left" transfer-ownership="none">
2369             <doc xml:whitespace="preserve">The coordinate for the left clipping plane</doc>
2370             <type name="float" c:type="float"/>
2371           </parameter>
2372           <parameter name="right" transfer-ownership="none">
2373             <doc xml:whitespace="preserve">The coordinate for the right clipping plane</doc>
2374             <type name="float" c:type="float"/>
2375           </parameter>
2376           <parameter name="bottom" transfer-ownership="none">
2377             <doc xml:whitespace="preserve">The coordinate for the bottom clipping plane</doc>
2378             <type name="float" c:type="float"/>
2379           </parameter>
2380           <parameter name="top" transfer-ownership="none">
2381             <doc xml:whitespace="preserve">The coordinate for the top clipping plane</doc>
2382             <type name="float" c:type="float"/>
2383           </parameter>
2384           <parameter name="z_near" transfer-ownership="none">
2385             <doc xml:whitespace="preserve">The coordinate for the near clipping plane (may be negative if the plane is behind the viewer)</doc>
2386             <type name="float" c:type="float"/>
2387           </parameter>
2388           <parameter name="z_far" transfer-ownership="none">
2389             <doc xml:whitespace="preserve">The coordinate for the far clipping plane (may be negative if the plane is behind the viewer)</doc>
2390             <type name="float" c:type="float"/>
2391           </parameter>
2392         </parameters>
2393       </method>
2394       <method name="init_from_array"
2395               c:identifier="cogl_matrix_init_from_array">
2396         <doc xml:whitespace="preserve">Initializes @matrix with the contents of @array</doc>
2397         <return-value transfer-ownership="none">
2398           <type name="none" c:type="void"/>
2399         </return-value>
2400         <parameters>
2401           <parameter name="array"
2402                      direction="out"
2403                      caller-allocates="0"
2404                      transfer-ownership="none">
2405             <doc xml:whitespace="preserve">A linear array of 16 floats (column-major order)</doc>
2406             <type name="float" c:type="float*"/>
2407           </parameter>
2408         </parameters>
2409       </method>
2410       <method name="get_array" c:identifier="cogl_matrix_get_array">
2411         <doc xml:whitespace="preserve">Casts @matrix to a float array which can be directly passed to OpenGL.</doc>
2412         <return-value transfer-ownership="none">
2413           <doc xml:whitespace="preserve">a pointer to the float array</doc>
2414           <type name="float" c:type="float*"/>
2415         </return-value>
2416       </method>
2417       <method name="get_inverse"
2418               c:identifier="cogl_matrix_get_inverse"
2419               version="1.2">
2420         <doc xml:whitespace="preserve">Gets the inverse transform of a given matrix and uses it to initialize
2421 a new #CoglMatrix.
2422 &lt;note&gt;Although the first parameter is annotated as const to indicate
2423 that the transform it represents isn't modified this function may
2424 technically save a copy of the inverse transform within the given
2425 #CoglMatrix so that subsequent requests for the inverse transform may
2426 avoid costly inversion calculations.&lt;/note&gt;
2427 for degenerate transformations that can't be inverted (in this case the</doc>
2428         <return-value transfer-ownership="none">
2429           <doc xml:whitespace="preserve">%TRUE if the inverse was successfully calculated or %FALSE</doc>
2430           <type name="boolean" c:type="gboolean"/>
2431         </return-value>
2432         <parameters>
2433           <parameter name="inverse"
2434                      direction="out"
2435                      caller-allocates="1"
2436                      transfer-ownership="none">
2437             <doc xml:whitespace="preserve">The destination for a 4x4 inverse transformation matrix</doc>
2438             <type name="Matrix" c:type="CoglMatrix*"/>
2439           </parameter>
2440         </parameters>
2441       </method>
2442       <method name="transform_point"
2443               c:identifier="cogl_matrix_transform_point">
2444         <doc xml:whitespace="preserve">Transforms a point whos position is given and returned as four float
2445 components.</doc>
2446         <return-value transfer-ownership="none">
2447           <type name="none" c:type="void"/>
2448         </return-value>
2449         <parameters>
2450           <parameter name="x"
2451                      direction="inout"
2452                      caller-allocates="0"
2453                      transfer-ownership="full">
2454             <doc xml:whitespace="preserve">The X component of your points position</doc>
2455             <type name="float" c:type="float*"/>
2456           </parameter>
2457           <parameter name="y"
2458                      direction="inout"
2459                      caller-allocates="0"
2460                      transfer-ownership="full">
2461             <doc xml:whitespace="preserve">The Y component of your points position</doc>
2462             <type name="float" c:type="float*"/>
2463           </parameter>
2464           <parameter name="z"
2465                      direction="inout"
2466                      caller-allocates="0"
2467                      transfer-ownership="full">
2468             <doc xml:whitespace="preserve">The Z component of your points position</doc>
2469             <type name="float" c:type="float*"/>
2470           </parameter>
2471           <parameter name="w"
2472                      direction="inout"
2473                      caller-allocates="0"
2474                      transfer-ownership="full">
2475             <doc xml:whitespace="preserve">The W component of your points position</doc>
2476             <type name="float" c:type="float*"/>
2477           </parameter>
2478         </parameters>
2479       </method>
2480     </record>
2481     <record name="Object" c:type="CoglObject">
2482       <method name="set_user_data"
2483               c:identifier="cogl_object_set_user_data"
2484               version="1.4">
2485         <doc xml:whitespace="preserve">Associates some private @user_data with a given #CoglObject. To
2486 later remove the association call cogl_object_set_user_data() with
2487 the same @key but NULL for the @user_data.</doc>
2488         <return-value transfer-ownership="none">
2489           <type name="none" c:type="void"/>
2490         </return-value>
2491         <parameters>
2492           <parameter name="key" transfer-ownership="none">
2493             <doc xml:whitespace="preserve">The address of a #CoglUserDataKey which provides a unique value with which to index the private data.</doc>
2494             <type name="UserDataKey" c:type="CoglUserDataKey*"/>
2495           </parameter>
2496           <parameter name="user_data" transfer-ownership="none">
2497             <doc xml:whitespace="preserve">The data to associate with the given object, or NULL to remove a previous association.</doc>
2498             <type name="any" c:type="void*"/>
2499           </parameter>
2500           <parameter name="destroy" transfer-ownership="none" scope="call">
2501             <doc xml:whitespace="preserve">A #CoglUserDataDestroyCallback to call if the object is destroyed or if the association is removed by later setting NULL data for the same key.</doc>
2502             <type name="UserDataDestroyCallback"
2503                   c:type="CoglUserDataDestroyCallback"/>
2504           </parameter>
2505         </parameters>
2506       </method>
2507       <method name="get_user_data"
2508               c:identifier="cogl_object_get_user_data"
2509               version="1.4">
2510         <doc xml:whitespace="preserve">Finds the user data previously associated with @object using
2511 the given @key. If no user data has been associated with @object
2512 for the given @key this function returns NULL.
2513 the given @key; or NULL if no associated data is found.</doc>
2514         <return-value transfer-ownership="none">
2515           <doc xml:whitespace="preserve">The user data previously associated with @object using</doc>
2516           <type name="any" c:type="void*"/>
2517         </return-value>
2518         <parameters>
2519           <parameter name="key" transfer-ownership="none">
2520             <doc xml:whitespace="preserve">The address of a #CoglUserDataKey which provides a unique value with which to index the private data.</doc>
2521             <type name="UserDataKey" c:type="CoglUserDataKey*"/>
2522           </parameter>
2523         </parameters>
2524       </method>
2525     </record>
2526     <constant name="PIXEL_FORMAT_24" value="2">
2527       <type name="int"/>
2528     </constant>
2529     <constant name="PIXEL_FORMAT_32" value="3">
2530       <type name="int"/>
2531     </constant>
2532     <constant name="PREMULT_BIT" value="128">
2533       <type name="int"/>
2534     </constant>
2535     <record name="Path" c:type="CoglPath">
2536       <method name="copy" c:identifier="cogl_path_copy">
2537         <doc xml:whitespace="preserve">Returns a new copy of the path in @path. The new path has a
2538 reference count of 1 so you should unref it with
2539 cogl_object_unref() if you no longer need it.
2540 Internally the path will share the data until one of the paths is
2541 modified so copying paths should be relatively cheap.</doc>
2542         <return-value transfer-ownership="full">
2543           <doc xml:whitespace="preserve">a copy of the path in @path.</doc>
2544           <type name="Path" c:type="CoglPath*"/>
2545         </return-value>
2546       </method>
2547     </record>
2548     <enumeration name="PathFillRule"
2549                  version="1.4"
2550                  glib:type-name="CoglPathFillRule"
2551                  glib:get-type="cogl_path_fill_rule_get_type"
2552                  c:type="CoglPathFillRule">
2553       <doc xml:whitespace="preserve">#CoglPathFillRule is used to determine how a path is filled. There
2554 are two options - 'non-zero' and 'even-odd'. To work out whether any
2555 point will be filled imagine drawing an infinetely long line in any
2556 direction from that point. The number of times and the direction
2557 that the edges of the path crosses this line determines whether the
2558 line is filled as described below. Any open sub paths are treated
2559 as if there was an extra line joining the first point and the last
2560 point.
2561 The default fill rule is %COGL_PATH_FILL_RULE_EVEN_ODD. The fill
2562 rule is attached to the current path so preserving a path with
2563 cogl_get_path() also preserves the fill rule. Calling
2564 cogl_path_new() resets the current fill rule to the default.
2565 &lt;figure id="fill-rule-non-zero"&gt;
2566 &lt;title&gt;Example of filling various paths using the non-zero rule&lt;/title&gt;
2567 &lt;graphic fileref="fill-rule-non-zero.png" format="PNG"/&gt;
2568 &lt;/figure&gt;
2569 &lt;figure id="fill-rule-even-odd"&gt;
2570 &lt;title&gt;Example of filling various paths using the even-odd rule&lt;/title&gt;
2571 &lt;graphic fileref="fill-rule-even-odd.png" format="PNG"/&gt;
2572 &lt;/figure&gt;</doc>
2573       <member name="non_zero"
2574               value="0"
2575               c:identifier="COGL_PATH_FILL_RULE_NON_ZERO"
2576               glib:nick="non-zero"/>
2577       <member name="even_odd"
2578               value="1"
2579               c:identifier="COGL_PATH_FILL_RULE_EVEN_ODD"
2580               glib:nick="even-odd"/>
2581     </enumeration>
2582     <record name="PixelArray" c:type="CoglPixelArray">
2583       <constructor name="new_with_size_EXP"
2584                    c:identifier="cogl_pixel_array_new_with_size_EXP">
2585         <return-value transfer-ownership="full">
2586           <type name="PixelArray" c:type="CoglPixelArray*"/>
2587         </return-value>
2588         <parameters>
2589           <parameter name="width" transfer-ownership="none">
2590             <type name="uint" c:type="unsigned int"/>
2591           </parameter>
2592           <parameter name="height" transfer-ownership="none">
2593             <type name="uint" c:type="unsigned int"/>
2594           </parameter>
2595           <parameter name="format" transfer-ownership="none">
2596             <type name="PixelFormat" c:type="CoglPixelFormat"/>
2597           </parameter>
2598           <parameter name="stride"
2599                      direction="out"
2600                      caller-allocates="0"
2601                      transfer-ownership="full">
2602             <type name="uint" c:type="unsigned int*"/>
2603           </parameter>
2604         </parameters>
2605       </constructor>
2606     </record>
2607     <enumeration name="PixelFormat"
2608                  version="0.8"
2609                  glib:type-name="CoglPixelFormat"
2610                  glib:get-type="cogl_pixel_format_get_type"
2611                  c:type="CoglPixelFormat">
2612       <doc xml:whitespace="preserve">Pixel formats used by COGL. For the formats with a byte per
2613 component, the order of the components specify the order in
2614 increasing memory addresses. So for example
2615 %COGL_PIXEL_FORMAT_RGB_888 would have the red component in the
2616 lowest address, green in the next address and blue after that
2617 regardless of the endinanness of the system.
2618 For the 16-bit formats the component order specifies the order
2619 within a 16-bit number from most significant bit to least
2620 significant. So for %COGL_PIXEL_FORMAT_RGB_565, the red component
2621 would be in bits 11-15, the green component would be in 6-11 and
2622 the blue component would be in 1-5. Therefore the order in memory
2623 depends on the endianness of the system.
2624 When uploading a texture %COGL_PIXEL_FORMAT_ANY can be used as the
2625 internal format. Cogl will try to pick the best format to use
2626 internally and convert the texture data if necessary.</doc>
2627       <member name="any"
2628               value="0"
2629               c:identifier="COGL_PIXEL_FORMAT_ANY"
2630               glib:nick="any"/>
2631       <member name="a_8"
2632               value="17"
2633               c:identifier="COGL_PIXEL_FORMAT_A_8"
2634               glib:nick="a-8"/>
2635       <member name="rgb_565"
2636               value="4"
2637               c:identifier="COGL_PIXEL_FORMAT_RGB_565"
2638               glib:nick="rgb-565"/>
2639       <member name="rgba_4444"
2640               value="21"
2641               c:identifier="COGL_PIXEL_FORMAT_RGBA_4444"
2642               glib:nick="rgba-4444"/>
2643       <member name="rgba_5551"
2644               value="22"
2645               c:identifier="COGL_PIXEL_FORMAT_RGBA_5551"
2646               glib:nick="rgba-5551"/>
2647       <member name="yuv"
2648               value="7"
2649               c:identifier="COGL_PIXEL_FORMAT_YUV"
2650               glib:nick="yuv"/>
2651       <member name="g_8"
2652               value="8"
2653               c:identifier="COGL_PIXEL_FORMAT_G_8"
2654               glib:nick="g-8"/>
2655       <member name="rgb_888"
2656               value="2"
2657               c:identifier="COGL_PIXEL_FORMAT_RGB_888"
2658               glib:nick="rgb-888"/>
2659       <member name="bgr_888"
2660               value="34"
2661               c:identifier="COGL_PIXEL_FORMAT_BGR_888"
2662               glib:nick="bgr-888"/>
2663       <member name="rgba_8888"
2664               value="19"
2665               c:identifier="COGL_PIXEL_FORMAT_RGBA_8888"
2666               glib:nick="rgba-8888"/>
2667       <member name="bgra_8888"
2668               value="51"
2669               c:identifier="COGL_PIXEL_FORMAT_BGRA_8888"
2670               glib:nick="bgra-8888"/>
2671       <member name="argb_8888"
2672               value="83"
2673               c:identifier="COGL_PIXEL_FORMAT_ARGB_8888"
2674               glib:nick="argb-8888"/>
2675       <member name="abgr_8888"
2676               value="115"
2677               c:identifier="COGL_PIXEL_FORMAT_ABGR_8888"
2678               glib:nick="abgr-8888"/>
2679       <member name="rgba_8888_pre"
2680               value="147"
2681               c:identifier="COGL_PIXEL_FORMAT_RGBA_8888_PRE"
2682               glib:nick="rgba-8888-pre"/>
2683       <member name="bgra_8888_pre"
2684               value="179"
2685               c:identifier="COGL_PIXEL_FORMAT_BGRA_8888_PRE"
2686               glib:nick="bgra-8888-pre"/>
2687       <member name="argb_8888_pre"
2688               value="211"
2689               c:identifier="COGL_PIXEL_FORMAT_ARGB_8888_PRE"
2690               glib:nick="argb-8888-pre"/>
2691       <member name="abgr_8888_pre"
2692               value="243"
2693               c:identifier="COGL_PIXEL_FORMAT_ABGR_8888_PRE"
2694               glib:nick="abgr-8888-pre"/>
2695       <member name="rgba_4444_pre"
2696               value="149"
2697               c:identifier="COGL_PIXEL_FORMAT_RGBA_4444_PRE"
2698               glib:nick="rgba-4444-pre"/>
2699       <member name="rgba_5551_pre"
2700               value="150"
2701               c:identifier="COGL_PIXEL_FORMAT_RGBA_5551_PRE"
2702               glib:nick="rgba-5551-pre"/>
2703     </enumeration>
2704     <constant name="RADIANS_TO_DEGREES" value="3754936">
2705       <type name="int"/>
2706     </constant>
2707     <bitfield name="ReadPixelsFlags"
2708               version="1.0"
2709               glib:type-name="CoglReadPixelsFlags"
2710               glib:get-type="cogl_read_pixels_flags_get_type"
2711               c:type="CoglReadPixelsFlags">
2712       <doc xml:whitespace="preserve">Flags for cogl_read_pixels()</doc>
2713       <member name="color_buffer"
2714               value="1"
2715               c:identifier="COGL_READ_PIXELS_COLOR_BUFFER"
2716               glib:nick="color-buffer"/>
2717     </bitfield>
2718     <constant name="SQRTI_ARG_10_PERCENT" value="5590">
2719       <type name="int"/>
2720     </constant>
2721     <constant name="SQRTI_ARG_5_PERCENT" value="210">
2722       <type name="int"/>
2723     </constant>
2724     <constant name="SQRTI_ARG_MAX" value="4194303">
2725       <type name="int"/>
2726     </constant>
2727     <enumeration name="ShaderType"
2728                  version="1.0"
2729                  glib:type-name="CoglShaderType"
2730                  glib:get-type="cogl_shader_type_get_type"
2731                  c:type="CoglShaderType">
2732       <doc xml:whitespace="preserve">Types of shaders</doc>
2733       <member name="vertex"
2734               value="0"
2735               c:identifier="COGL_SHADER_TYPE_VERTEX"
2736               glib:nick="vertex"/>
2737       <member name="fragment"
2738               value="1"
2739               c:identifier="COGL_SHADER_TYPE_FRAGMENT"
2740               glib:nick="fragment"/>
2741     </enumeration>
2742     <constant name="TEXTURE_MAX_WASTE" value="127">
2743       <type name="int"/>
2744     </constant>
2745     <bitfield name="TextureFlags"
2746               version="1.0"
2747               glib:type-name="CoglTextureFlags"
2748               glib:get-type="cogl_texture_flags_get_type"
2749               c:type="CoglTextureFlags">
2750       <doc xml:whitespace="preserve">Flags to pass to the cogl_texture_new_* family of functions.</doc>
2751       <member name="none"
2752               value="0"
2753               c:identifier="COGL_TEXTURE_NONE"
2754               glib:nick="none"/>
2755       <member name="no_auto_mipmap"
2756               value="1"
2757               c:identifier="COGL_TEXTURE_NO_AUTO_MIPMAP"
2758               glib:nick="no-auto-mipmap"/>
2759       <member name="no_slicing"
2760               value="2"
2761               c:identifier="COGL_TEXTURE_NO_SLICING"
2762               glib:nick="no-slicing"/>
2763       <member name="no_atlas"
2764               value="4"
2765               c:identifier="COGL_TEXTURE_NO_ATLAS"
2766               glib:nick="no-atlas"/>
2767     </bitfield>
2768     <enumeration name="TexturePixmapX11ReportLevel"
2769                  glib:type-name="CoglTexturePixmapX11ReportLevel"
2770                  glib:get-type="cogl_texture_pixmap_x11_report_level_get_type"
2771                  c:type="CoglTexturePixmapX11ReportLevel">
2772       <member name="raw_rectangles"
2773               value="0"
2774               c:identifier="COGL_TEXTURE_PIXMAP_X11_DAMAGE_RAW_RECTANGLES"
2775               glib:nick="raw-rectangles"/>
2776       <member name="delta_rectangles"
2777               value="1"
2778               c:identifier="COGL_TEXTURE_PIXMAP_X11_DAMAGE_DELTA_RECTANGLES"
2779               glib:nick="delta-rectangles"/>
2780       <member name="bounding_box"
2781               value="2"
2782               c:identifier="COGL_TEXTURE_PIXMAP_X11_DAMAGE_BOUNDING_BOX"
2783               glib:nick="bounding-box"/>
2784       <member name="non_empty"
2785               value="3"
2786               c:identifier="COGL_TEXTURE_PIXMAP_X11_DAMAGE_NON_EMPTY"
2787               glib:nick="non-empty"/>
2788     </enumeration>
2789     <record name="TextureVertex" c:type="CoglTextureVertex">
2790       <doc xml:whitespace="preserve">Used to specify vertex information when calling cogl_polygon()</doc>
2791       <field name="x" writable="1">
2792         <type name="float" c:type="float"/>
2793       </field>
2794       <field name="y" writable="1">
2795         <type name="float" c:type="float"/>
2796       </field>
2797       <field name="z" writable="1">
2798         <type name="float" c:type="float"/>
2799       </field>
2800       <field name="tx" writable="1">
2801         <type name="float" c:type="float"/>
2802       </field>
2803       <field name="ty" writable="1">
2804         <type name="float" c:type="float"/>
2805       </field>
2806       <field name="color" writable="1">
2807         <type name="Color" c:type="CoglColor"/>
2808       </field>
2809     </record>
2810     <constant name="UNORDERED_MASK" value="15">
2811       <type name="int"/>
2812     </constant>
2813     <constant name="UNPREMULT_MASK" value="127">
2814       <type name="int"/>
2815     </constant>
2816     <callback name="UserDataDestroyCallback"
2817               c:type="CoglUserDataDestroyCallback"
2818               version="1.4">
2819       <doc xml:whitespace="preserve">When associating private data with a #CoglObject a callback can be
2820 given which will be called either if the object is destroyed or if
2821 cogl_object_set_user_data() is called with NULL user_data for the
2822 same key.</doc>
2823       <return-value transfer-ownership="none">
2824         <type name="none" c:type="void"/>
2825       </return-value>
2826       <parameters>
2827         <parameter name="user_data" transfer-ownership="none" closure="0">
2828           <doc xml:whitespace="preserve">The data whos association with a #CoglObject has been destoyed.</doc>
2829           <type name="any" c:type="void*"/>
2830         </parameter>
2831       </parameters>
2832     </callback>
2833     <record name="UserDataKey" c:type="CoglUserDataKey" version="1.4">
2834       <doc xml:whitespace="preserve">A #CoglUserDataKey is used to declare a key for attaching data to a
2835 #CoglObject using cogl_object_set_user_data. The typedef only exists as a
2836 formality to make code self documenting since only the unique address of a
2837 #CoglUserDataKey is used.
2838 Typically you would declare a static #CoglUserDataKey and set private data
2839 on an object something like this:
2840 |[
2841 static CoglUserDataKey path_private_key;
2842 static void
2843 destroy_path_private_cb (void *data)
2844 {
2845 g_free (data);
2846 }
2847 static void
2848 my_path_set_data (CoglPath *path, void *data)
2849 {
2850 cogl_object_set_user_data (COGL_OBJECT (path),
2851 &amp;private_key,
2852 data,
2853 destroy_path_private_cb);
2854 }
2855 ]|</doc>
2856       <field name="unused" writable="1">
2857         <type name="int" c:type="int"/>
2858       </field>
2859     </record>
2860     <record name="Vector3" c:type="CoglVector3">
2861       <field name="x" writable="1">
2862         <type name="float" c:type="float"/>
2863       </field>
2864       <field name="y" writable="1">
2865         <type name="float" c:type="float"/>
2866       </field>
2867       <field name="z" writable="1">
2868         <type name="float" c:type="float"/>
2869       </field>
2870       <method name="init_EXP" c:identifier="cogl_vector3_init_EXP">
2871         <return-value transfer-ownership="none">
2872           <type name="none" c:type="void"/>
2873         </return-value>
2874         <parameters>
2875           <parameter name="x" transfer-ownership="none">
2876             <type name="float" c:type="float"/>
2877           </parameter>
2878           <parameter name="y" transfer-ownership="none">
2879             <type name="float" c:type="float"/>
2880           </parameter>
2881           <parameter name="z" transfer-ownership="none">
2882             <type name="float" c:type="float"/>
2883           </parameter>
2884         </parameters>
2885       </method>
2886       <method name="init_zero_EXP" c:identifier="cogl_vector3_init_zero_EXP">
2887         <return-value transfer-ownership="none">
2888           <type name="none" c:type="void"/>
2889         </return-value>
2890       </method>
2891       <method name="equal_with_epsilon_EXP"
2892               c:identifier="cogl_vector3_equal_with_epsilon_EXP">
2893         <return-value transfer-ownership="none">
2894           <type name="boolean" c:type="gboolean"/>
2895         </return-value>
2896         <parameters>
2897           <parameter name="vector1" transfer-ownership="none">
2898             <type name="Vector3" c:type="CoglVector3*"/>
2899           </parameter>
2900           <parameter name="epsilon" transfer-ownership="none">
2901             <type name="float" c:type="float"/>
2902           </parameter>
2903         </parameters>
2904       </method>
2905       <method name="copy_EXP" c:identifier="cogl_vector3_copy_EXP">
2906         <return-value transfer-ownership="full">
2907           <type name="Vector3" c:type="CoglVector3*"/>
2908         </return-value>
2909       </method>
2910       <method name="free_EXP" c:identifier="cogl_vector3_free_EXP">
2911         <return-value transfer-ownership="none">
2912           <type name="none" c:type="void"/>
2913         </return-value>
2914       </method>
2915       <method name="invert_EXP" c:identifier="cogl_vector3_invert_EXP">
2916         <return-value transfer-ownership="none">
2917           <type name="none" c:type="void"/>
2918         </return-value>
2919       </method>
2920       <method name="add_EXP" c:identifier="cogl_vector3_add_EXP">
2921         <return-value transfer-ownership="none">
2922           <type name="none" c:type="void"/>
2923         </return-value>
2924         <parameters>
2925           <parameter name="a" transfer-ownership="none">
2926             <type name="Vector3" c:type="CoglVector3*"/>
2927           </parameter>
2928           <parameter name="b" transfer-ownership="none">
2929             <type name="Vector3" c:type="CoglVector3*"/>
2930           </parameter>
2931         </parameters>
2932       </method>
2933       <method name="subtract_EXP" c:identifier="cogl_vector3_subtract_EXP">
2934         <return-value transfer-ownership="none">
2935           <type name="none" c:type="void"/>
2936         </return-value>
2937         <parameters>
2938           <parameter name="a" transfer-ownership="none">
2939             <type name="Vector3" c:type="CoglVector3*"/>
2940           </parameter>
2941           <parameter name="b" transfer-ownership="none">
2942             <type name="Vector3" c:type="CoglVector3*"/>
2943           </parameter>
2944         </parameters>
2945       </method>
2946       <method name="multiply_scalar_EXP"
2947               c:identifier="cogl_vector3_multiply_scalar_EXP">
2948         <return-value transfer-ownership="none">
2949           <type name="none" c:type="void"/>
2950         </return-value>
2951         <parameters>
2952           <parameter name="scalar" transfer-ownership="none">
2953             <type name="float" c:type="float"/>
2954           </parameter>
2955         </parameters>
2956       </method>
2957       <method name="divide_scalar_EXP"
2958               c:identifier="cogl_vector3_divide_scalar_EXP">
2959         <return-value transfer-ownership="none">
2960           <type name="none" c:type="void"/>
2961         </return-value>
2962         <parameters>
2963           <parameter name="scalar" transfer-ownership="none">
2964             <type name="float" c:type="float"/>
2965           </parameter>
2966         </parameters>
2967       </method>
2968       <method name="normalize_EXP" c:identifier="cogl_vector3_normalize_EXP">
2969         <return-value transfer-ownership="none">
2970           <type name="none" c:type="void"/>
2971         </return-value>
2972       </method>
2973       <method name="magnitude_EXP" c:identifier="cogl_vector3_magnitude_EXP">
2974         <return-value transfer-ownership="none">
2975           <type name="float" c:type="float"/>
2976         </return-value>
2977       </method>
2978       <method name="cross_product_EXP"
2979               c:identifier="cogl_vector3_cross_product_EXP">
2980         <return-value transfer-ownership="none">
2981           <type name="none" c:type="void"/>
2982         </return-value>
2983         <parameters>
2984           <parameter name="u" transfer-ownership="none">
2985             <type name="Vector3" c:type="CoglVector3*"/>
2986           </parameter>
2987           <parameter name="v" transfer-ownership="none">
2988             <type name="Vector3" c:type="CoglVector3*"/>
2989           </parameter>
2990         </parameters>
2991       </method>
2992       <method name="dot_product_EXP"
2993               c:identifier="cogl_vector3_dot_product_EXP">
2994         <return-value transfer-ownership="none">
2995           <type name="float" c:type="float"/>
2996         </return-value>
2997         <parameters>
2998           <parameter name="b" transfer-ownership="none">
2999             <type name="Vector3" c:type="CoglVector3*"/>
3000           </parameter>
3001         </parameters>
3002       </method>
3003       <method name="distance_EXP" c:identifier="cogl_vector3_distance_EXP">
3004         <return-value transfer-ownership="none">
3005           <type name="float" c:type="float"/>
3006         </return-value>
3007         <parameters>
3008           <parameter name="b" transfer-ownership="none">
3009             <type name="Vector3" c:type="CoglVector3*"/>
3010           </parameter>
3011         </parameters>
3012       </method>
3013     </record>
3014     <enumeration name="VerticesMode"
3015                  version="1.0"
3016                  glib:type-name="CoglVerticesMode"
3017                  glib:get-type="cogl_vertices_mode_get_type"
3018                  c:type="CoglVerticesMode">
3019       <doc xml:whitespace="preserve">How vertices passed to cogl_vertex_buffer_draw() and
3020 cogl_vertex_buffer_draw_elements() should be interpreted</doc>
3021       <member name="points"
3022               value="0"
3023               c:identifier="COGL_VERTICES_MODE_POINTS"
3024               glib:nick="points"/>
3025       <member name="line_strip"
3026               value="3"
3027               c:identifier="COGL_VERTICES_MODE_LINE_STRIP"
3028               glib:nick="line-strip"/>
3029       <member name="line_loop"
3030               value="2"
3031               c:identifier="COGL_VERTICES_MODE_LINE_LOOP"
3032               glib:nick="line-loop"/>
3033       <member name="lines"
3034               value="1"
3035               c:identifier="COGL_VERTICES_MODE_LINES"
3036               glib:nick="lines"/>
3037       <member name="triangle_strip"
3038               value="5"
3039               c:identifier="COGL_VERTICES_MODE_TRIANGLE_STRIP"
3040               glib:nick="triangle-strip"/>
3041       <member name="triangle_fan"
3042               value="6"
3043               c:identifier="COGL_VERTICES_MODE_TRIANGLE_FAN"
3044               glib:nick="triangle-fan"/>
3045       <member name="triangles"
3046               value="4"
3047               c:identifier="COGL_VERTICES_MODE_TRIANGLES"
3048               glib:nick="triangles"/>
3049     </enumeration>
3050     <function name="angle_cos" c:identifier="cogl_angle_cos" version="1.0">
3051       <doc xml:whitespace="preserve">Computes the cosine of @angle</doc>
3052       <return-value transfer-ownership="full">
3053         <doc xml:whitespace="preserve">the cosine of the passed angle</doc>
3054         <type name="Fixed" c:type="CoglFixed"/>
3055       </return-value>
3056       <parameters>
3057         <parameter name="angle" transfer-ownership="none">
3058           <doc xml:whitespace="preserve">an angle expressed using #CoglAngle</doc>
3059           <type name="Angle" c:type="CoglAngle"/>
3060         </parameter>
3061       </parameters>
3062     </function>
3063     <function name="angle_sin" c:identifier="cogl_angle_sin" version="1.0">
3064       <doc xml:whitespace="preserve">Computes the sine of @angle</doc>
3065       <return-value transfer-ownership="full">
3066         <doc xml:whitespace="preserve">the sine of the passed angle</doc>
3067         <type name="Fixed" c:type="CoglFixed"/>
3068       </return-value>
3069       <parameters>
3070         <parameter name="angle" transfer-ownership="none">
3071           <doc xml:whitespace="preserve">an angle expressed using #CoglAngle</doc>
3072           <type name="Angle" c:type="CoglAngle"/>
3073         </parameter>
3074       </parameters>
3075     </function>
3076     <function name="angle_tan" c:identifier="cogl_angle_tan" version="1.0">
3077       <doc xml:whitespace="preserve">Computes the tangent of @angle</doc>
3078       <return-value transfer-ownership="full">
3079         <doc xml:whitespace="preserve">the tangent of the passed angle</doc>
3080         <type name="Fixed" c:type="CoglFixed"/>
3081       </return-value>
3082       <parameters>
3083         <parameter name="angle" transfer-ownership="none">
3084           <doc xml:whitespace="preserve">an angle expressed using #CoglAngle</doc>
3085           <type name="Angle" c:type="CoglAngle"/>
3086         </parameter>
3087       </parameters>
3088     </function>
3089     <function name="begin_gl" c:identifier="cogl_begin_gl" version="1.0">
3090       <doc xml:whitespace="preserve">We do not advise nor reliably support the interleaving of raw GL drawing and
3091 Cogl drawing functions, but if you insist, cogl_begin_gl() and cogl_end_gl()
3092 provide a simple mechanism that may at least give you a fighting chance of
3093 succeeding.
3094 through the modification of GL state; that will never be reliably supported,
3095 but if you are trying to do something like:
3096 |[
3097 {
3098 - setup some OpenGL state.
3099 - draw using OpenGL (e.g. glDrawArrays() )
3100 - reset modified OpenGL state.
3101 - continue using Cogl to draw
3102 }
3103 ]|
3104 You should surround blocks of drawing using raw GL with cogl_begin_gl()
3105 and cogl_end_gl():
3106 |[
3107 {
3108 cogl_begin_gl ();
3109 - setup some OpenGL state.
3110 - draw using OpenGL (e.g. glDrawArrays() )
3111 - reset modified OpenGL state.
3112 cogl_end_gl ();
3113 - continue using Cogl to draw
3114 }
3115 ]|
3116 Don't ever try and do:
3117 |[
3118 {
3119 - setup some OpenGL state.
3120 - use Cogl to draw
3121 - reset modified OpenGL state.
3122 }
3123 ]|
3124 When the internals of Cogl evolves, this is very liable to break.
3125 This function will flush all batched primitives, and subsequently flush
3126 all internal Cogl state to OpenGL as if it were going to draw something
3127 itself.
3128 The result is that the OpenGL modelview matrix will be setup; the state
3129 corresponding to the current source material will be set up and other world
3130 state such as backface culling, depth and fogging enabledness will be sent
3131 to OpenGL.
3132 &lt;note&gt;No special material state is flushed, so if you want Cogl to setup a
3133 simplified material state it is your responsibility to set a simple source
3134 material before calling cogl_begin_gl(). E.g. by calling
3135 cogl_set_source_color4ub().&lt;/note&gt;
3136 &lt;note&gt;It is your responsibility to restore any OpenGL state that you modify
3137 to how it was after calling cogl_begin_gl() if you don't do this then the
3138 result of further Cogl calls is undefined.&lt;/note&gt;
3139 &lt;note&gt;You can not nest begin/end blocks.&lt;/note&gt;
3140 Again we would like to stress, we do not advise the use of this API and if
3141 possible we would prefer to improve Cogl than have developers require raw
3142 OpenGL.</doc>
3143       <return-value transfer-ownership="none">
3144         <type name="none" c:type="void"/>
3145       </return-value>
3146     </function>
3147     <function name="bitmap_get_size_from_file"
3148               c:identifier="cogl_bitmap_get_size_from_file"
3149               version="1.0">
3150       <doc xml:whitespace="preserve">Parses an image file enough to extract the width and height
3151 of the bitmap.</doc>
3152       <return-value transfer-ownership="none">
3153         <doc xml:whitespace="preserve">%TRUE if the image was successfully parsed</doc>
3154         <type name="boolean" c:type="gboolean"/>
3155       </return-value>
3156       <parameters>
3157         <parameter name="filename" transfer-ownership="none">
3158           <doc xml:whitespace="preserve">the file to check</doc>
3159           <type name="utf8" c:type="char*"/>
3160         </parameter>
3161         <parameter name="width"
3162                    direction="out"
3163                    caller-allocates="0"
3164                    transfer-ownership="full">
3165           <doc xml:whitespace="preserve">return location for the bitmap width, or %NULL</doc>
3166           <type name="int" c:type="int*"/>
3167         </parameter>
3168         <parameter name="height"
3169                    direction="out"
3170                    caller-allocates="0"
3171                    transfer-ownership="full">
3172           <doc xml:whitespace="preserve">return location for the bitmap height, or %NULL</doc>
3173           <type name="int" c:type="int*"/>
3174         </parameter>
3175       </parameters>
3176     </function>
3177     <function name="check_extension"
3178               c:identifier="cogl_check_extension"
3179               deprecated="OpenGL is an implementation detail for Cogl and so it&apos;s"
3180               deprecated-version="1.2">
3181       <doc xml:whitespace="preserve">Check whether @name occurs in list of extensions in @ext.
3182 not appropriate to expose OpenGL extensions through the Cogl API. This
3183 function can be replaced by the following equivalent code:
3184 |[
3185 ]|</doc>
3186       <return-value transfer-ownership="none">
3187         <doc xml:whitespace="preserve">%TRUE if the extension occurs in the list, %FALSE otherwise.</doc>
3188         <type name="boolean" c:type="gboolean"/>
3189       </return-value>
3190       <parameters>
3191         <parameter name="name" transfer-ownership="none">
3192           <doc xml:whitespace="preserve">extension to check for</doc>
3193           <type name="utf8" c:type="char*"/>
3194         </parameter>
3195         <parameter name="ext" transfer-ownership="none">
3196           <doc xml:whitespace="preserve">list of extensions</doc>
3197           <type name="utf8" c:type="char*"/>
3198         </parameter>
3199       </parameters>
3200     </function>
3201     <function name="clear" c:identifier="cogl_clear">
3202       <doc xml:whitespace="preserve">Clears all the auxiliary buffers identified in the @buffers mask, and if
3203 that includes the color buffer then the specified @color is used.</doc>
3204       <return-value transfer-ownership="none">
3205         <type name="none" c:type="void"/>
3206       </return-value>
3207       <parameters>
3208         <parameter name="color" transfer-ownership="none">
3209           <doc xml:whitespace="preserve">Background color to clear to</doc>
3210           <type name="Color" c:type="CoglColor*"/>
3211         </parameter>
3212         <parameter name="buffers" transfer-ownership="none">
3213           <doc xml:whitespace="preserve">A mask of #CoglBufferBit&lt;!-- --&gt;'s identifying which auxiliary buffers to clear</doc>
3214           <type name="ulong" c:type="unsigned long"/>
3215         </parameter>
3216       </parameters>
3217     </function>
3218     <function name="clip_ensure"
3219               c:identifier="cogl_clip_ensure"
3220               version="1.0"
3221               deprecated="Calling this function has no effect"
3222               deprecated-version="1.2">
3223       <doc xml:whitespace="preserve">Ensures that the current clipping region has been set in GL. This
3224 will automatically be called before any Cogl primitives but it
3225 maybe be neccessary to call if you are using raw GL calls with
3226 clipping.</doc>
3227       <return-value transfer-ownership="none">
3228         <type name="none" c:type="void"/>
3229       </return-value>
3230     </function>
3231     <function name="clip_pop" c:identifier="cogl_clip_pop">
3232       <doc xml:whitespace="preserve">Reverts the clipping region to the state before the last call to
3233 cogl_clip_push().</doc>
3234       <return-value transfer-ownership="none">
3235         <type name="none" c:type="void"/>
3236       </return-value>
3237     </function>
3238     <function name="clip_push"
3239               c:identifier="cogl_clip_push"
3240               deprecated="The x, y, width, height arguments are inconsistent"
3241               deprecated-version="1.2">
3242       <doc xml:whitespace="preserve">Specifies a rectangular clipping area for all subsequent drawing
3243 operations. Any drawing commands that extend outside the rectangle
3244 will be clipped so that only the portion inside the rectangle will
3245 be displayed. The rectangle dimensions are transformed by the
3246 current model-view matrix.
3247 The rectangle is intersected with the current clip region. To undo
3248 the effect of this function, call cogl_clip_pop().
3249 with other API that specify rectangles in model space, and when used
3250 with a coordinate space that puts the origin at the center and y+
3251 extending up, it's awkward to use. Please use cogl_clip_push_rectangle()
3252 instead</doc>
3253       <return-value transfer-ownership="none">
3254         <type name="none" c:type="void"/>
3255       </return-value>
3256       <parameters>
3257         <parameter name="x_offset" transfer-ownership="none">
3258           <doc xml:whitespace="preserve">left edge of the clip rectangle</doc>
3259           <type name="float" c:type="float"/>
3260         </parameter>
3261         <parameter name="y_offset" transfer-ownership="none">
3262           <doc xml:whitespace="preserve">top edge of the clip rectangle</doc>
3263           <type name="float" c:type="float"/>
3264         </parameter>
3265         <parameter name="width" transfer-ownership="none">
3266           <doc xml:whitespace="preserve">width of the clip rectangle</doc>
3267           <type name="float" c:type="float"/>
3268         </parameter>
3269         <parameter name="height" transfer-ownership="none">
3270           <doc xml:whitespace="preserve">height of the clip rectangle</doc>
3271           <type name="float" c:type="float"/>
3272         </parameter>
3273       </parameters>
3274     </function>
3275     <function name="clip_push_from_path"
3276               c:identifier="cogl_clip_push_from_path"
3277               version="1.0">
3278       <doc xml:whitespace="preserve">Sets a new clipping area using the current path. The current path
3279 is then cleared. The clipping area is intersected with the previous
3280 clipping area. To restore the previous clipping area, call
3281 cogl_clip_pop().</doc>
3282       <return-value transfer-ownership="none">
3283         <type name="none" c:type="void"/>
3284       </return-value>
3285     </function>
3286     <function name="clip_push_from_path_preserve"
3287               c:identifier="cogl_clip_push_from_path_preserve"
3288               version="1.0">
3289       <doc xml:whitespace="preserve">Sets a new clipping area using the current path. The current path
3290 is then cleared. The clipping area is intersected with the previous
3291 clipping area. To restore the previous clipping area, call
3292 cogl_clip_pop().</doc>
3293       <return-value transfer-ownership="none">
3294         <type name="none" c:type="void"/>
3295       </return-value>
3296     </function>
3297     <function name="clip_push_rectangle"
3298               c:identifier="cogl_clip_push_rectangle"
3299               version="1.2">
3300       <doc xml:whitespace="preserve">Specifies a rectangular clipping area for all subsequent drawing
3301 operations. Any drawing commands that extend outside the rectangle
3302 will be clipped so that only the portion inside the rectangle will
3303 be displayed. The rectangle dimensions are transformed by the
3304 current model-view matrix.
3305 The rectangle is intersected with the current clip region. To undo
3306 the effect of this function, call cogl_clip_pop().</doc>
3307       <return-value transfer-ownership="none">
3308         <type name="none" c:type="void"/>
3309       </return-value>
3310       <parameters>
3311         <parameter name="x0" transfer-ownership="none">
3312           <doc xml:whitespace="preserve">x coordinate for top left corner of the clip rectangle</doc>
3313           <type name="float" c:type="float"/>
3314         </parameter>
3315         <parameter name="y0" transfer-ownership="none">
3316           <doc xml:whitespace="preserve">y coordinate for top left corner of the clip rectangle</doc>
3317           <type name="float" c:type="float"/>
3318         </parameter>
3319         <parameter name="x1" transfer-ownership="none">
3320           <doc xml:whitespace="preserve">x coordinate for bottom right corner of the clip rectangle</doc>
3321           <type name="float" c:type="float"/>
3322         </parameter>
3323         <parameter name="y1" transfer-ownership="none">
3324           <doc xml:whitespace="preserve">y coordinate for bottom right corner of the clip rectangle</doc>
3325           <type name="float" c:type="float"/>
3326         </parameter>
3327       </parameters>
3328     </function>
3329     <function name="clip_push_window_rect"
3330               c:identifier="cogl_clip_push_window_rect"
3331               deprecated="Use cogl_clip_push_window_rectangle() instead"
3332               deprecated-version="1.2">
3333       <doc xml:whitespace="preserve">Specifies a rectangular clipping area for all subsequent drawing
3334 operations. Any drawing commands that extend outside the rectangle
3335 will be clipped so that only the portion inside the rectangle will
3336 be displayed. The rectangle dimensions are not transformed by the
3337 current model-view matrix.
3338 The rectangle is intersected with the current clip region. To undo
3339 the effect of this function, call cogl_clip_pop().</doc>
3340       <return-value transfer-ownership="none">
3341         <type name="none" c:type="void"/>
3342       </return-value>
3343       <parameters>
3344         <parameter name="x_offset" transfer-ownership="none">
3345           <doc xml:whitespace="preserve">left edge of the clip rectangle in window coordinates</doc>
3346           <type name="float" c:type="float"/>
3347         </parameter>
3348         <parameter name="y_offset" transfer-ownership="none">
3349           <doc xml:whitespace="preserve">top edge of the clip rectangle in window coordinates</doc>
3350           <type name="float" c:type="float"/>
3351         </parameter>
3352         <parameter name="width" transfer-ownership="none">
3353           <doc xml:whitespace="preserve">width of the clip rectangle</doc>
3354           <type name="float" c:type="float"/>
3355         </parameter>
3356         <parameter name="height" transfer-ownership="none">
3357           <doc xml:whitespace="preserve">height of the clip rectangle</doc>
3358           <type name="float" c:type="float"/>
3359         </parameter>
3360       </parameters>
3361     </function>
3362     <function name="clip_push_window_rectangle"
3363               c:identifier="cogl_clip_push_window_rectangle"
3364               version="1.2">
3365       <doc xml:whitespace="preserve">Specifies a rectangular clipping area for all subsequent drawing
3366 operations. Any drawing commands that extend outside the rectangle
3367 will be clipped so that only the portion inside the rectangle will
3368 be displayed. The rectangle dimensions are not transformed by the
3369 current model-view matrix.
3370 The rectangle is intersected with the current clip region. To undo
3371 the effect of this function, call cogl_clip_pop().</doc>
3372       <return-value transfer-ownership="none">
3373         <type name="none" c:type="void"/>
3374       </return-value>
3375       <parameters>
3376         <parameter name="x_offset" transfer-ownership="none">
3377           <doc xml:whitespace="preserve">left edge of the clip rectangle in window coordinates</doc>
3378           <type name="int" c:type="int"/>
3379         </parameter>
3380         <parameter name="y_offset" transfer-ownership="none">
3381           <doc xml:whitespace="preserve">top edge of the clip rectangle in window coordinates</doc>
3382           <type name="int" c:type="int"/>
3383         </parameter>
3384         <parameter name="width" transfer-ownership="none">
3385           <doc xml:whitespace="preserve">width of the clip rectangle</doc>
3386           <type name="int" c:type="int"/>
3387         </parameter>
3388         <parameter name="height" transfer-ownership="none">
3389           <doc xml:whitespace="preserve">height of the clip rectangle</doc>
3390           <type name="int" c:type="int"/>
3391         </parameter>
3392       </parameters>
3393     </function>
3394     <function name="clip_stack_restore"
3395               c:identifier="cogl_clip_stack_restore"
3396               version="0.8.2"
3397               deprecated="This was originally added to allow us to restore"
3398               deprecated-version="1.2">
3399       <doc xml:whitespace="preserve">Restore the state of the clipping stack that was previously saved
3400 by cogl_clip_stack_save().
3401 the clip stack when switching back from an offscreen framebuffer,
3402 but it's not necessary anymore given that framebuffers now own
3403 separate clip stacks which will be automatically switched between
3404 when a new buffer is set. Calling this function has no effect</doc>
3405       <return-value transfer-ownership="none">
3406         <type name="none" c:type="void"/>
3407       </return-value>
3408     </function>
3409     <function name="clip_stack_save"
3410               c:identifier="cogl_clip_stack_save"
3411               version="0.8.2"
3412               deprecated="This was originally added to allow us to save the"
3413               deprecated-version="1.2">
3414       <doc xml:whitespace="preserve">Save the entire state of the clipping stack and then clear all
3415 clipping. The previous state can be returned to with
3416 cogl_clip_stack_restore(). Each call to cogl_clip_push() after this
3417 must be matched by a call to cogl_clip_pop() before calling
3418 cogl_clip_stack_restore().
3419 clip stack when switching to an offscreen framebuffer, but it's
3420 not necessary anymore given that framebuffers now own separate
3421 clip stacks which will be automatically switched between when a
3422 new buffer is set. Calling this function has no effect</doc>
3423       <return-value transfer-ownership="none">
3424         <type name="none" c:type="void"/>
3425       </return-value>
3426     </function>
3427     <function name="color_equal" c:identifier="cogl_color_equal" version="1.0">
3428       <doc xml:whitespace="preserve">Compares two #CoglColor&lt;!-- --&gt;s and checks if they are the same.
3429 This function can be passed to g_hash_table_new() as the @key_equal_func
3430 parameter, when using #CoglColor&lt;!-- --&gt;s as keys in a #GHashTable.</doc>
3431       <return-value transfer-ownership="none">
3432         <doc xml:whitespace="preserve">%TRUE if the two colors are the same.</doc>
3433         <type name="boolean" c:type="gboolean"/>
3434       </return-value>
3435       <parameters>
3436         <parameter name="v1" transfer-ownership="none">
3437           <doc xml:whitespace="preserve">a #CoglColor</doc>
3438           <type name="any" c:type="gconstpointer"/>
3439         </parameter>
3440         <parameter name="v2" transfer-ownership="none">
3441           <doc xml:whitespace="preserve">a #CoglColor</doc>
3442           <type name="any" c:type="gconstpointer"/>
3443         </parameter>
3444       </parameters>
3445     </function>
3446     <function name="create_program" c:identifier="cogl_create_program">
3447       <doc xml:whitespace="preserve">Create a new cogl program object that can be used to replace parts of the GL
3448 rendering pipeline with custom code.</doc>
3449       <return-value transfer-ownership="full">
3450         <doc xml:whitespace="preserve">a new cogl program.</doc>
3451         <type name="Handle" c:type="CoglHandle"/>
3452       </return-value>
3453     </function>
3454     <function name="create_shader" c:identifier="cogl_create_shader">
3455       <doc xml:whitespace="preserve">Create a new shader handle, use #cogl_shader_source to set the source code
3456 to be used on it.</doc>
3457       <return-value transfer-ownership="full">
3458         <doc xml:whitespace="preserve">a new shader handle.</doc>
3459         <type name="Handle" c:type="CoglHandle"/>
3460       </return-value>
3461       <parameters>
3462         <parameter name="shader_type" transfer-ownership="none">
3463           <doc xml:whitespace="preserve">COGL_SHADER_TYPE_VERTEX or COGL_SHADER_TYPE_FRAGMENT.</doc>
3464           <type name="ShaderType" c:type="CoglShaderType"/>
3465         </parameter>
3466       </parameters>
3467     </function>
3468     <function name="disable_fog" c:identifier="cogl_disable_fog">
3469       <doc xml:whitespace="preserve">This function disables fogging, so primitives drawn afterwards will not be
3470 blended with any previously set fog color.</doc>
3471       <return-value transfer-ownership="none">
3472         <type name="none" c:type="void"/>
3473       </return-value>
3474     </function>
3475     <function name="double_to_fixed" c:identifier="cogl_double_to_fixed">
3476       <return-value transfer-ownership="full">
3477         <type name="Fixed" c:type="CoglFixed"/>
3478       </return-value>
3479       <parameters>
3480         <parameter name="value" transfer-ownership="none">
3481           <type name="double" c:type="double"/>
3482         </parameter>
3483       </parameters>
3484     </function>
3485     <function name="double_to_int" c:identifier="cogl_double_to_int">
3486       <return-value transfer-ownership="none">
3487         <type name="int" c:type="int"/>
3488       </return-value>
3489       <parameters>
3490         <parameter name="value" transfer-ownership="none">
3491           <type name="double" c:type="double"/>
3492         </parameter>
3493       </parameters>
3494     </function>
3495     <function name="double_to_uint" c:identifier="cogl_double_to_uint">
3496       <return-value transfer-ownership="none">
3497         <type name="uint" c:type="unsigned int"/>
3498       </return-value>
3499       <parameters>
3500         <parameter name="value" transfer-ownership="none">
3501           <type name="double" c:type="double"/>
3502         </parameter>
3503       </parameters>
3504     </function>
3505     <function name="end_gl" c:identifier="cogl_end_gl" version="1.0">
3506       <doc xml:whitespace="preserve">This is the counterpart to cogl_begin_gl() used to delimit blocks of drawing
3507 code using raw OpenGL. Please refer to cogl_begin_gl() for full details.</doc>
3508       <return-value transfer-ownership="none">
3509         <type name="none" c:type="void"/>
3510       </return-value>
3511     </function>
3512     <function name="features_available" c:identifier="cogl_features_available">
3513       <doc xml:whitespace="preserve">Checks whether the given COGL features are available. Multiple
3514 features can be checked for by or-ing them together with the '|'
3515 operator. %TRUE is only returned if all of the requested features
3516 are available.</doc>
3517       <return-value transfer-ownership="none">
3518         <doc xml:whitespace="preserve">%TRUE if the features are available, %FALSE otherwise.</doc>
3519         <type name="boolean" c:type="gboolean"/>
3520       </return-value>
3521       <parameters>
3522         <parameter name="features" transfer-ownership="none">
3523           <doc xml:whitespace="preserve">A bitmask of features to check for</doc>
3524           <type name="FeatureFlags" c:type="CoglFeatureFlags"/>
3525         </parameter>
3526       </parameters>
3527     </function>
3528     <function name="fixed_atan" c:identifier="cogl_fixed_atan" version="1.0">
3529       <doc xml:whitespace="preserve">Computes the arc tangent of @a.</doc>
3530       <return-value transfer-ownership="full">
3531         <doc xml:whitespace="preserve">the arc tangent of the passed value, in fixed point notation</doc>
3532         <type name="Fixed" c:type="CoglFixed"/>
3533       </return-value>
3534       <parameters>
3535         <parameter name="a" transfer-ownership="none">
3536           <doc xml:whitespace="preserve">a #CoglFixed number</doc>
3537           <type name="Fixed" c:type="CoglFixed"/>
3538         </parameter>
3539       </parameters>
3540     </function>
3541     <function name="fixed_atan2" c:identifier="cogl_fixed_atan2" version="1.0">
3542       <doc xml:whitespace="preserve">Computes the arc tangent of @a / @b but uses the sign of both
3543 arguments to return the angle in right quadrant.
3544 notation</doc>
3545       <return-value transfer-ownership="full">
3546         <doc xml:whitespace="preserve">the arc tangent of the passed fraction, in fixed point</doc>
3547         <type name="Fixed" c:type="CoglFixed"/>
3548       </return-value>
3549       <parameters>
3550         <parameter name="a" transfer-ownership="none">
3551           <doc xml:whitespace="preserve">the numerator as a #CoglFixed number</doc>
3552           <type name="Fixed" c:type="CoglFixed"/>
3553         </parameter>
3554         <parameter name="b" transfer-ownership="none">
3555           <doc xml:whitespace="preserve">the denominator as a #CoglFixed number</doc>
3556           <type name="Fixed" c:type="CoglFixed"/>
3557         </parameter>
3558       </parameters>
3559     </function>
3560     <function name="fixed_cos" c:identifier="cogl_fixed_cos" version="1.0">
3561       <doc xml:whitespace="preserve">Computes the cosine of @angle.</doc>
3562       <return-value transfer-ownership="full">
3563         <doc xml:whitespace="preserve">the cosine of the passed angle, in fixed point notation</doc>
3564         <type name="Fixed" c:type="CoglFixed"/>
3565       </return-value>
3566       <parameters>
3567         <parameter name="angle" transfer-ownership="none">
3568           <doc xml:whitespace="preserve">a #CoglFixed number</doc>
3569           <type name="Fixed" c:type="CoglFixed"/>
3570         </parameter>
3571       </parameters>
3572     </function>
3573     <function name="fixed_div" c:identifier="cogl_fixed_div">
3574       <return-value transfer-ownership="full">
3575         <type name="Fixed" c:type="CoglFixed"/>
3576       </return-value>
3577       <parameters>
3578         <parameter name="a" transfer-ownership="none">
3579           <type name="Fixed" c:type="CoglFixed"/>
3580         </parameter>
3581         <parameter name="b" transfer-ownership="none">
3582           <type name="Fixed" c:type="CoglFixed"/>
3583         </parameter>
3584       </parameters>
3585     </function>
3586     <function name="fixed_log2" c:identifier="cogl_fixed_log2" version="1.0">
3587       <doc xml:whitespace="preserve">Calculates base 2 logarithm.
3588 This function is some 2.5 times faster on x86, and over 12 times faster on
3589 fpu-less arm, than using libc log().</doc>
3590       <return-value transfer-ownership="full">
3591         <doc xml:whitespace="preserve">base 2 logarithm.</doc>
3592         <type name="Fixed" c:type="CoglFixed"/>
3593       </return-value>
3594       <parameters>
3595         <parameter name="x" transfer-ownership="none">
3596           <doc xml:whitespace="preserve">value to calculate base 2 logarithm from</doc>
3597           <type name="uint" c:type="unsigned int"/>
3598         </parameter>
3599       </parameters>
3600     </function>
3601     <function name="fixed_mul" c:identifier="cogl_fixed_mul">
3602       <return-value transfer-ownership="full">
3603         <type name="Fixed" c:type="CoglFixed"/>
3604       </return-value>
3605       <parameters>
3606         <parameter name="a" transfer-ownership="none">
3607           <type name="Fixed" c:type="CoglFixed"/>
3608         </parameter>
3609         <parameter name="b" transfer-ownership="none">
3610           <type name="Fixed" c:type="CoglFixed"/>
3611         </parameter>
3612       </parameters>
3613     </function>
3614     <function name="fixed_mul_div" c:identifier="cogl_fixed_mul_div">
3615       <return-value transfer-ownership="full">
3616         <type name="Fixed" c:type="CoglFixed"/>
3617       </return-value>
3618       <parameters>
3619         <parameter name="a" transfer-ownership="none">
3620           <type name="Fixed" c:type="CoglFixed"/>
3621         </parameter>
3622         <parameter name="b" transfer-ownership="none">
3623           <type name="Fixed" c:type="CoglFixed"/>
3624         </parameter>
3625         <parameter name="c" transfer-ownership="none">
3626           <type name="Fixed" c:type="CoglFixed"/>
3627         </parameter>
3628       </parameters>
3629     </function>
3630     <function name="fixed_pow" c:identifier="cogl_fixed_pow" version="1.0">
3631       <doc xml:whitespace="preserve">Calculates @x to the @y power.</doc>
3632       <return-value transfer-ownership="none">
3633         <doc xml:whitespace="preserve">the power of @x to the @y</doc>
3634         <type name="uint" c:type="unsigned int"/>
3635       </return-value>
3636       <parameters>
3637         <parameter name="x" transfer-ownership="none">
3638           <doc xml:whitespace="preserve">base</doc>
3639           <type name="uint" c:type="unsigned int"/>
3640         </parameter>
3641         <parameter name="y" transfer-ownership="none">
3642           <doc xml:whitespace="preserve">#CoglFixed exponent</doc>
3643           <type name="Fixed" c:type="CoglFixed"/>
3644         </parameter>
3645       </parameters>
3646     </function>
3647     <function name="fixed_pow2" c:identifier="cogl_fixed_pow2" version="1.0">
3648       <doc xml:whitespace="preserve">Calculates 2 to the @x power.
3649 This function is around 11 times faster on x86, and around 22 times faster
3650 on fpu-less arm than libc pow(2, x).</doc>
3651       <return-value transfer-ownership="none">
3652         <doc xml:whitespace="preserve">the power of 2 to the passed value</doc>
3653         <type name="uint" c:type="unsigned int"/>
3654       </return-value>
3655       <parameters>
3656         <parameter name="x" transfer-ownership="none">
3657           <doc xml:whitespace="preserve">a #CoglFixed number</doc>
3658           <type name="Fixed" c:type="CoglFixed"/>
3659         </parameter>
3660       </parameters>
3661     </function>
3662     <function name="fixed_sin" c:identifier="cogl_fixed_sin" version="1.0">
3663       <doc xml:whitespace="preserve">Computes the sine of @angle.</doc>
3664       <return-value transfer-ownership="full">
3665         <doc xml:whitespace="preserve">the sine of the passed angle, in fixed point notation</doc>
3666         <type name="Fixed" c:type="CoglFixed"/>
3667       </return-value>
3668       <parameters>
3669         <parameter name="angle" transfer-ownership="none">
3670           <doc xml:whitespace="preserve">a #CoglFixed number</doc>
3671           <type name="Fixed" c:type="CoglFixed"/>
3672         </parameter>
3673       </parameters>
3674     </function>
3675     <function name="fixed_sqrt" c:identifier="cogl_fixed_sqrt" version="1.0">
3676       <doc xml:whitespace="preserve">Computes the square root of @x.
3677 notation</doc>
3678       <return-value transfer-ownership="full">
3679         <doc xml:whitespace="preserve">the square root of the passed value, in floating point</doc>
3680         <type name="Fixed" c:type="CoglFixed"/>
3681       </return-value>
3682       <parameters>
3683         <parameter name="x" transfer-ownership="none">
3684           <doc xml:whitespace="preserve">a #CoglFixed number</doc>
3685           <type name="Fixed" c:type="CoglFixed"/>
3686         </parameter>
3687       </parameters>
3688     </function>
3689     <function name="fixed_tan" c:identifier="cogl_fixed_tan" version="1.0">
3690       <doc xml:whitespace="preserve">Computes the tangent of @angle.</doc>
3691       <return-value transfer-ownership="full">
3692         <doc xml:whitespace="preserve">the tangent of the passed angle, in fixed point notation</doc>
3693         <type name="Fixed" c:type="CoglFixed"/>
3694       </return-value>
3695       <parameters>
3696         <parameter name="angle" transfer-ownership="none">
3697           <doc xml:whitespace="preserve">a #CoglFixed number</doc>
3698           <type name="Fixed" c:type="CoglFixed"/>
3699         </parameter>
3700       </parameters>
3701     </function>
3702     <function name="flush" c:identifier="cogl_flush" version="1.0">
3703       <doc xml:whitespace="preserve">This function should only need to be called in exceptional circumstances.
3704 As an optimization Cogl drawing functions may batch up primitives
3705 internally, so if you are trying to use raw GL outside of Cogl you stand a
3706 better chance of being successful if you ask Cogl to flush any batched
3707 geometry before making your state changes.
3708 It only ensure that the underlying driver is issued all the commands
3709 necessary to draw the batched primitives. It provides no guarantees about
3710 when the driver will complete the rendering.
3711 This provides no guarantees about the GL state upon returning and to avoid
3712 confusing Cogl you should aim to restore any changes you make before
3713 resuming use of Cogl.
3714 If you are making state changes with the intention of affecting Cogl drawing
3715 primitives you are 100% on your own since you stand a good chance of
3716 conflicting with Cogl internals. For example clutter-gst which currently
3717 uses direct GL calls to bind ARBfp programs will very likely break when Cogl
3718 starts to use ARBfb programs itself for the material API.</doc>
3719       <return-value transfer-ownership="none">
3720         <type name="none" c:type="void"/>
3721       </return-value>
3722     </function>
3723     <function name="frustum" c:identifier="cogl_frustum" version="0.8.2">
3724       <doc xml:whitespace="preserve">Replaces the current projection matrix with a perspective matrix
3725 for the given viewing frustum.</doc>
3726       <return-value transfer-ownership="none">
3727         <type name="none" c:type="void"/>
3728       </return-value>
3729       <parameters>
3730         <parameter name="left" transfer-ownership="none">
3731           <doc xml:whitespace="preserve">Left clipping plane</doc>
3732           <type name="float" c:type="float"/>
3733         </parameter>
3734         <parameter name="right" transfer-ownership="none">
3735           <doc xml:whitespace="preserve">Right clipping plane</doc>
3736           <type name="float" c:type="float"/>
3737         </parameter>
3738         <parameter name="bottom" transfer-ownership="none">
3739           <doc xml:whitespace="preserve">Bottom clipping plane</doc>
3740           <type name="float" c:type="float"/>
3741         </parameter>
3742         <parameter name="top" transfer-ownership="none">
3743           <doc xml:whitespace="preserve">Top clipping plane</doc>
3744           <type name="float" c:type="float"/>
3745         </parameter>
3746         <parameter name="z_near" transfer-ownership="none">
3747           <doc xml:whitespace="preserve">Nearest visible point</doc>
3748           <type name="float" c:type="float"/>
3749         </parameter>
3750         <parameter name="z_far" transfer-ownership="none">
3751           <doc xml:whitespace="preserve">Furthest visible point along the z-axis</doc>
3752           <type name="float" c:type="float"/>
3753         </parameter>
3754       </parameters>
3755     </function>
3756     <function name="get_backface_culling_enabled"
3757               c:identifier="cogl_get_backface_culling_enabled">
3758       <doc xml:whitespace="preserve">Queries if backface culling has been enabled via
3759 cogl_set_backface_culling_enabled()</doc>
3760       <return-value transfer-ownership="none">
3761         <doc xml:whitespace="preserve">%TRUE if backface culling is enabled, and %FALSE otherwise</doc>
3762         <type name="boolean" c:type="gboolean"/>
3763       </return-value>
3764     </function>
3765     <function name="get_bitmasks" c:identifier="cogl_get_bitmasks">
3766       <doc xml:whitespace="preserve">Gets the number of bitplanes used for each of the color components
3767 in the color buffer. Pass %NULL for any of the arguments if the
3768 value is not required.</doc>
3769       <return-value transfer-ownership="none">
3770         <type name="none" c:type="void"/>
3771       </return-value>
3772       <parameters>
3773         <parameter name="red"
3774                    direction="out"
3775                    caller-allocates="0"
3776                    transfer-ownership="full">
3777           <doc xml:whitespace="preserve">Return location for the number of red bits or %NULL</doc>
3778           <type name="int" c:type="int*"/>
3779         </parameter>
3780         <parameter name="green"
3781                    direction="out"
3782                    caller-allocates="0"
3783                    transfer-ownership="full">
3784           <doc xml:whitespace="preserve">Return location for the number of green bits or %NULL</doc>
3785           <type name="int" c:type="int*"/>
3786         </parameter>
3787         <parameter name="blue"
3788                    direction="out"
3789                    caller-allocates="0"
3790                    transfer-ownership="full">
3791           <doc xml:whitespace="preserve">Return location for the number of blue bits or %NULL</doc>
3792           <type name="int" c:type="int*"/>
3793         </parameter>
3794         <parameter name="alpha"
3795                    direction="out"
3796                    caller-allocates="0"
3797                    transfer-ownership="full">
3798           <doc xml:whitespace="preserve">Return location for the number of alpha bits or %NULL</doc>
3799           <type name="int" c:type="int*"/>
3800         </parameter>
3801       </parameters>
3802     </function>
3803     <function name="get_depth_test_enabled"
3804               c:identifier="cogl_get_depth_test_enabled"
3805               deprecated="Use cogl_material_get_depth_test_enabled()"
3806               deprecated-version="1.4">
3807       <doc xml:whitespace="preserve">Queries if depth testing has been enabled via cogl_set_depth_test_enable()
3808 instead.</doc>
3809       <return-value transfer-ownership="none">
3810         <doc xml:whitespace="preserve">%TRUE if depth testing is enabled, and %FALSE otherwise</doc>
3811         <type name="boolean" c:type="gboolean"/>
3812       </return-value>
3813     </function>
3814     <function name="get_features"
3815               c:identifier="cogl_get_features"
3816               version="0.8">
3817       <doc xml:whitespace="preserve">Returns all of the features supported by COGL.</doc>
3818       <return-value transfer-ownership="full">
3819         <doc xml:whitespace="preserve">A logical OR of all the supported COGL features.</doc>
3820         <type name="FeatureFlags" c:type="CoglFeatureFlags"/>
3821       </return-value>
3822     </function>
3823     <function name="get_modelview_matrix"
3824               c:identifier="cogl_get_modelview_matrix">
3825       <doc xml:whitespace="preserve">Stores the current model-view matrix in @matrix.</doc>
3826       <return-value transfer-ownership="none">
3827         <type name="none" c:type="void"/>
3828       </return-value>
3829       <parameters>
3830         <parameter name="matrix"
3831                    direction="out"
3832                    caller-allocates="1"
3833                    transfer-ownership="none">
3834           <doc xml:whitespace="preserve">return location for the model-view matrix</doc>
3835           <type name="Matrix" c:type="CoglMatrix*"/>
3836         </parameter>
3837       </parameters>
3838     </function>
3839     <function name="get_option_group"
3840               c:identifier="cogl_get_option_group"
3841               version="1.0">
3842       <doc xml:whitespace="preserve">Retrieves the #GOptionGroup used by COGL to parse the command
3843 line options. Clutter uses this to handle the COGL command line
3844 options during its initialization process.</doc>
3845       <return-value transfer-ownership="full">
3846         <doc xml:whitespace="preserve">a #GOptionGroup</doc>
3847         <type name="GLib.OptionGroup" c:type="GOptionGroup*"/>
3848       </return-value>
3849     </function>
3850     <function name="get_path" c:identifier="cogl_get_path" version="1.4">
3851       <doc xml:whitespace="preserve">Gets a pointer to the current path. The path can later be used
3852 again by calling cogl_path_set(). Note that the path isn't copied
3853 so if you later call any functions to add to the path it will
3854 affect the returned object too. No reference is taken on the path
3855 so if you want to retain it you should take your own reference with
3856 cogl_object_ref().</doc>
3857       <return-value transfer-ownership="full">
3858         <doc xml:whitespace="preserve">a pointer to the current path.</doc>
3859         <type name="Path" c:type="CoglPath*"/>
3860       </return-value>
3861     </function>
3862     <function name="get_proc_address" c:identifier="cogl_get_proc_address">
3863       <doc xml:whitespace="preserve">Gets a pointer to a given GL or GL ES extension function. This acts
3864 as a wrapper around glXGetProcAddress() or whatever is the
3865 appropriate function for the current backend.
3866 function is not available.</doc>
3867       <return-value transfer-ownership="full">
3868         <doc xml:whitespace="preserve">a pointer to the requested function or %NULL if the</doc>
3869         <type name="FuncPtr" c:type="CoglFuncPtr"/>
3870       </return-value>
3871       <parameters>
3872         <parameter name="name" transfer-ownership="none">
3873           <doc xml:whitespace="preserve">the name of the function.</doc>
3874           <type name="utf8" c:type="char*"/>
3875         </parameter>
3876       </parameters>
3877     </function>
3878     <function name="get_projection_matrix"
3879               c:identifier="cogl_get_projection_matrix">
3880       <doc xml:whitespace="preserve">Stores the current projection matrix in @matrix.</doc>
3881       <return-value transfer-ownership="none">
3882         <type name="none" c:type="void"/>
3883       </return-value>
3884       <parameters>
3885         <parameter name="matrix"
3886                    direction="out"
3887                    caller-allocates="1"
3888                    transfer-ownership="none">
3889           <doc xml:whitespace="preserve">return location for the projection matrix</doc>
3890           <type name="Matrix" c:type="CoglMatrix*"/>
3891         </parameter>
3892       </parameters>
3893     </function>
3894     <function name="get_viewport" c:identifier="cogl_get_viewport">
3895       <doc xml:whitespace="preserve">Stores the current viewport in @v. @v[0] and @v[1] get the x and y
3896 position of the viewport and @v[2] and @v[3] get the width and
3897 height.</doc>
3898       <return-value transfer-ownership="none">
3899         <type name="none" c:type="void"/>
3900       </return-value>
3901       <parameters>
3902         <parameter name="v"
3903                    direction="out"
3904                    caller-allocates="0"
3905                    transfer-ownership="full">
3906           <doc xml:whitespace="preserve">pointer to a 4 element array of #float&lt;!-- --&gt;s to receive the viewport dimensions.</doc>
3907           <array c:type="float" fixed-size="4">
3908             <type name="float"/>
3909           </array>
3910         </parameter>
3911       </parameters>
3912     </function>
3913     <function name="is_bitmap" c:identifier="cogl_is_bitmap" version="1.0">
3914       <doc xml:whitespace="preserve">Checks whether @handle is a #CoglHandle for a bitmap
3915 and %FALSE otherwise</doc>
3916       <return-value transfer-ownership="none">
3917         <doc xml:whitespace="preserve">%TRUE if the passed handle represents a bitmap,</doc>
3918         <type name="boolean" c:type="gboolean"/>
3919       </return-value>
3920       <parameters>
3921         <parameter name="handle" transfer-ownership="none">
3922           <doc xml:whitespace="preserve">a #CoglHandle for a bitmap</doc>
3923           <type name="Handle" c:type="CoglHandle"/>
3924         </parameter>
3925       </parameters>
3926     </function>
3927     <function name="is_buffer_EXP" c:identifier="cogl_is_buffer_EXP">
3928       <return-value transfer-ownership="none">
3929         <type name="boolean" c:type="gboolean"/>
3930       </return-value>
3931       <parameters>
3932         <parameter name="object" transfer-ownership="none">
3933           <type name="any" c:type="void*"/>
3934         </parameter>
3935       </parameters>
3936     </function>
3937     <function name="is_material" c:identifier="cogl_is_material">
3938       <doc xml:whitespace="preserve">Gets whether the given handle references an existing material object.
3939 %FALSE otherwise</doc>
3940       <return-value transfer-ownership="none">
3941         <doc xml:whitespace="preserve">%TRUE if the handle references a #CoglMaterial,</doc>
3942         <type name="boolean" c:type="gboolean"/>
3943       </return-value>
3944       <parameters>
3945         <parameter name="handle" transfer-ownership="none">
3946           <doc xml:whitespace="preserve">A CoglHandle</doc>
3947           <type name="Handle" c:type="CoglHandle"/>
3948         </parameter>
3949       </parameters>
3950     </function>
3951     <function name="is_offscreen" c:identifier="cogl_is_offscreen">
3952       <doc xml:whitespace="preserve">Determines whether the given #CoglHandle references an offscreen buffer
3953 object.
3954 %FALSE otherwise</doc>
3955       <return-value transfer-ownership="none">
3956         <doc xml:whitespace="preserve">%TRUE if the handle references an offscreen buffer,</doc>
3957         <type name="boolean" c:type="gboolean"/>
3958       </return-value>
3959       <parameters>
3960         <parameter name="handle" transfer-ownership="none">
3961           <doc xml:whitespace="preserve">A CoglHandle for an offscreen buffer</doc>
3962           <type name="Handle" c:type="CoglHandle"/>
3963         </parameter>
3964       </parameters>
3965     </function>
3966     <function name="is_path" c:identifier="cogl_is_path">
3967       <doc xml:whitespace="preserve">Gets whether the given handle references an existing path object.
3968 %FALSE otherwise</doc>
3969       <return-value transfer-ownership="none">
3970         <doc xml:whitespace="preserve">%TRUE if the handle references a #CoglPath,</doc>
3971         <type name="boolean" c:type="gboolean"/>
3972       </return-value>
3973       <parameters>
3974         <parameter name="handle" transfer-ownership="none">
3975           <doc xml:whitespace="preserve">A CoglHandle</doc>
3976           <type name="Handle" c:type="CoglHandle"/>
3977         </parameter>
3978       </parameters>
3979     </function>
3980     <function name="is_pixel_array_EXP" c:identifier="cogl_is_pixel_array_EXP">
3981       <return-value transfer-ownership="none">
3982         <type name="boolean" c:type="gboolean"/>
3983       </return-value>
3984       <parameters>
3985         <parameter name="object" transfer-ownership="none">
3986           <type name="any" c:type="void*"/>
3987         </parameter>
3988       </parameters>
3989     </function>
3990     <function name="is_program" c:identifier="cogl_is_program">
3991       <doc xml:whitespace="preserve">Gets whether the given handle references an existing program object.
3992 %FALSE otherwise</doc>
3993       <return-value transfer-ownership="none">
3994         <doc xml:whitespace="preserve">%TRUE if the handle references a program,</doc>
3995         <type name="boolean" c:type="gboolean"/>
3996       </return-value>
3997       <parameters>
3998         <parameter name="handle" transfer-ownership="none">
3999           <doc xml:whitespace="preserve">A CoglHandle</doc>
4000           <type name="Handle" c:type="CoglHandle"/>
4001         </parameter>
4002       </parameters>
4003     </function>
4004     <function name="is_shader" c:identifier="cogl_is_shader">
4005       <doc xml:whitespace="preserve">Gets whether the given handle references an existing shader object.
4006 %FALSE otherwise</doc>
4007       <return-value transfer-ownership="none">
4008         <doc xml:whitespace="preserve">%TRUE if the handle references a shader,</doc>
4009         <type name="boolean" c:type="gboolean"/>
4010       </return-value>
4011       <parameters>
4012         <parameter name="handle" transfer-ownership="none">
4013           <doc xml:whitespace="preserve">A CoglHandle</doc>
4014           <type name="Handle" c:type="CoglHandle"/>
4015         </parameter>
4016       </parameters>
4017     </function>
4018     <function name="is_texture" c:identifier="cogl_is_texture">
4019       <doc xml:whitespace="preserve">Gets whether the given handle references an existing texture object.
4020 %FALSE otherwise</doc>
4021       <return-value transfer-ownership="none">
4022         <doc xml:whitespace="preserve">%TRUE if the handle references a texture, and</doc>
4023         <type name="boolean" c:type="gboolean"/>
4024       </return-value>
4025       <parameters>
4026         <parameter name="handle" transfer-ownership="none">
4027           <doc xml:whitespace="preserve">A CoglHandle</doc>
4028           <type name="Handle" c:type="CoglHandle"/>
4029         </parameter>
4030       </parameters>
4031     </function>
4032     <function name="is_texture_3d_EXP" c:identifier="cogl_is_texture_3d_EXP">
4033       <return-value transfer-ownership="none">
4034         <type name="boolean" c:type="gboolean"/>
4035       </return-value>
4036       <parameters>
4037         <parameter name="handle" transfer-ownership="none">
4038           <type name="Handle" c:type="CoglHandle"/>
4039         </parameter>
4040       </parameters>
4041     </function>
4042     <function name="is_texture_pixmap_x11_EXP"
4043               c:identifier="cogl_is_texture_pixmap_x11_EXP">
4044       <return-value transfer-ownership="none">
4045         <type name="boolean" c:type="gboolean"/>
4046       </return-value>
4047       <parameters>
4048         <parameter name="handle" transfer-ownership="none">
4049           <type name="Handle" c:type="CoglHandle"/>
4050         </parameter>
4051       </parameters>
4052     </function>
4053     <function name="is_vertex_buffer"
4054               c:identifier="cogl_is_vertex_buffer"
4055               version="1.0">
4056       <doc xml:whitespace="preserve">Checks whether @handle is a Vertex Buffer Object
4057 otherwise</doc>
4058       <return-value transfer-ownership="none">
4059         <doc xml:whitespace="preserve">%TRUE if the handle is a VBO, and %FALSE</doc>
4060         <type name="boolean" c:type="gboolean"/>
4061       </return-value>
4062       <parameters>
4063         <parameter name="handle" transfer-ownership="none">
4064           <doc xml:whitespace="preserve">a #CoglHandle for a vertex buffer object</doc>
4065           <type name="Handle" c:type="CoglHandle"/>
4066         </parameter>
4067       </parameters>
4068     </function>
4069     <function name="is_vertex_buffer_indices"
4070               c:identifier="cogl_is_vertex_buffer_indices"
4071               version="1.4">
4072       <doc xml:whitespace="preserve">Checks whether @handle is a handle to the indices for a vertex
4073 buffer object
4074 otherwise</doc>
4075       <return-value transfer-ownership="none">
4076         <doc xml:whitespace="preserve">%TRUE if the handle is indices, and %FALSE</doc>
4077         <type name="boolean" c:type="gboolean"/>
4078       </return-value>
4079       <parameters>
4080         <parameter name="handle" transfer-ownership="none">
4081           <doc xml:whitespace="preserve">a #CoglHandle</doc>
4082           <type name="Handle" c:type="CoglHandle"/>
4083         </parameter>
4084       </parameters>
4085     </function>
4086     <function name="material_get_point_size"
4087               c:identifier="cogl_material_get_point_size"
4088               version="1.4">
4089       <doc xml:whitespace="preserve">Get the size of points drawn when %COGL_VERTICES_MODE_POINTS is
4090 used with the vertex buffer API.</doc>
4091       <return-value transfer-ownership="none">
4092         <doc xml:whitespace="preserve">the point size of the material.</doc>
4093         <type name="float" c:type="float"/>
4094       </return-value>
4095       <parameters>
4096         <parameter name="material" transfer-ownership="none">
4097           <doc xml:whitespace="preserve">a #CoglHandle to a material.</doc>
4098           <type name="Handle" c:type="CoglHandle"/>
4099         </parameter>
4100       </parameters>
4101     </function>
4102     <function name="material_layer_get_type"
4103               c:identifier="cogl_material_layer_get_type">
4104       <doc xml:whitespace="preserve">Retrieves the type of the layer
4105 Currently there is only one type of layer defined:
4106 %COGL_MATERIAL_LAYER_TYPE_TEXTURE, but considering we may add purely GLSL
4107 based layers in the future, you should write code that checks the type
4108 first.</doc>
4109       <return-value transfer-ownership="full">
4110         <doc xml:whitespace="preserve">the type of the layer</doc>
4111         <type name="MaterialLayerType" c:type="CoglMaterialLayerType"/>
4112       </return-value>
4113       <parameters>
4114         <parameter name="layer" transfer-ownership="none">
4115           <doc xml:whitespace="preserve">A #CoglMaterialLayer object</doc>
4116           <type name="MaterialLayer" c:type="CoglMaterialLayer*"/>
4117         </parameter>
4118       </parameters>
4119     </function>
4120     <function name="material_ref"
4121               c:identifier="cogl_material_ref"
4122               version="1.0"
4123               deprecated="Use cogl_object_ref() instead"
4124               deprecated-version="1.2">
4125       <doc xml:whitespace="preserve">Increment the reference count for a #CoglMaterial.</doc>
4126       <return-value transfer-ownership="full">
4127         <doc xml:whitespace="preserve">the @material.</doc>
4128         <type name="Handle" c:type="CoglHandle"/>
4129       </return-value>
4130       <parameters>
4131         <parameter name="handle" transfer-ownership="none">
4132           <type name="Handle" c:type="CoglHandle"/>
4133         </parameter>
4134       </parameters>
4135     </function>
4136     <function name="material_set_point_size"
4137               c:identifier="cogl_material_set_point_size"
4138               version="1.4">
4139       <doc xml:whitespace="preserve">Changes the size of points drawn when %COGL_VERTICES_MODE_POINTS is
4140 used with the vertex buffer API. Note that typically the GPU will
4141 only support a limited minimum and maximum range of point sizes. If
4142 the chosen point size is outside that range then the nearest value
4143 within that range will be used instead. The size of a point is in
4144 screen space so it will be the same regardless of any
4145 transformations. The default point size is 1.0.</doc>
4146       <return-value transfer-ownership="none">
4147         <type name="none" c:type="void"/>
4148       </return-value>
4149       <parameters>
4150         <parameter name="material" transfer-ownership="none">
4151           <doc xml:whitespace="preserve">a #CoglHandle to a material.</doc>
4152           <type name="Handle" c:type="CoglHandle"/>
4153         </parameter>
4154         <parameter name="point_size" transfer-ownership="none">
4155           <type name="float" c:type="float"/>
4156         </parameter>
4157       </parameters>
4158     </function>
4159     <function name="material_unref"
4160               c:identifier="cogl_material_unref"
4161               version="1.0"
4162               deprecated="Use cogl_object_unref() instead"
4163               deprecated-version="1.2">
4164       <doc xml:whitespace="preserve">Decrement the reference count for a #CoglMaterial.</doc>
4165       <return-value transfer-ownership="none">
4166         <type name="none" c:type="void"/>
4167       </return-value>
4168       <parameters>
4169         <parameter name="handle" transfer-ownership="none">
4170           <type name="Handle" c:type="CoglHandle"/>
4171         </parameter>
4172       </parameters>
4173     </function>
4174     <function name="matrix_equal"
4175               c:identifier="cogl_matrix_equal"
4176               version="1.4">
4177       <doc xml:whitespace="preserve">Compares two matrices to see if they represent the same
4178 transformation. Although internally the matrices may have different
4179 annotations associated with them and may potentially have a cached
4180 inverse matrix these are not considered in the comparison.</doc>
4181       <return-value transfer-ownership="none">
4182         <type name="boolean" c:type="gboolean"/>
4183       </return-value>
4184       <parameters>
4185         <parameter name="v1" transfer-ownership="none">
4186           <doc xml:whitespace="preserve">A 4x4 transformation matrix</doc>
4187           <type name="any" c:type="gconstpointer"/>
4188         </parameter>
4189         <parameter name="v2" transfer-ownership="none">
4190           <doc xml:whitespace="preserve">A 4x4 transformation matrix</doc>
4191           <type name="any" c:type="gconstpointer"/>
4192         </parameter>
4193       </parameters>
4194     </function>
4195     <function name="object_ref" c:identifier="cogl_object_ref">
4196       <doc xml:whitespace="preserve">Increases the reference count of @handle by 1</doc>
4197       <return-value transfer-ownership="none">
4198         <doc xml:whitespace="preserve">the @object, with its reference count increased</doc>
4199         <type name="any" c:type="void*"/>
4200       </return-value>
4201       <parameters>
4202         <parameter name="object" transfer-ownership="none">
4203           <doc xml:whitespace="preserve">a #CoglObject</doc>
4204           <type name="any" c:type="void*"/>
4205         </parameter>
4206       </parameters>
4207     </function>
4208     <function name="object_unref" c:identifier="cogl_object_unref">
4209       <doc xml:whitespace="preserve">Drecreases the reference count of @object by 1; if the reference
4210 count reaches 0, the resources allocated by @object will be freed</doc>
4211       <return-value transfer-ownership="none">
4212         <type name="none" c:type="void"/>
4213       </return-value>
4214       <parameters>
4215         <parameter name="object" transfer-ownership="none">
4216           <doc xml:whitespace="preserve">a #CoglObject</doc>
4217           <type name="any" c:type="void*"/>
4218         </parameter>
4219       </parameters>
4220     </function>
4221     <function name="offscreen_new_to_texture"
4222               c:identifier="cogl_offscreen_new_to_texture">
4223       <doc xml:whitespace="preserve">This creates an offscreen buffer object using the given texture as the
4224 primary color buffer. It doesn't just initialize the contents of the
4225 offscreen buffer with the texture; they are tightly bound so that
4226 drawing to the offscreen buffer effectivly updates the contents of the
4227 given texture. You don't need to destroy the offscreen buffer before
4228 you can use the texture again.
4229 if it wasn't possible to create the buffer.</doc>
4230       <return-value transfer-ownership="full">
4231         <doc xml:whitespace="preserve">a #CoglHandle for the new offscreen buffer or %COGL_INVALID_HANDLE</doc>
4232         <type name="Handle" c:type="CoglHandle"/>
4233       </return-value>
4234       <parameters>
4235         <parameter name="handle" transfer-ownership="none">
4236           <doc xml:whitespace="preserve">A CoglHandle for a Cogl texture</doc>
4237           <type name="Handle" c:type="CoglHandle"/>
4238         </parameter>
4239       </parameters>
4240     </function>
4241     <function name="offscreen_ref"
4242               c:identifier="cogl_offscreen_ref"
4243               deprecated="cogl_handle_ref should be used in new code."
4244               deprecated-version="1.2">
4245       <doc xml:whitespace="preserve">Increments the reference count on the offscreen buffer.</doc>
4246       <return-value transfer-ownership="full">
4247         <doc xml:whitespace="preserve">For convenience it returns the given CoglHandle</doc>
4248         <type name="Handle" c:type="CoglHandle"/>
4249       </return-value>
4250       <parameters>
4251         <parameter name="handle" transfer-ownership="none">
4252           <doc xml:whitespace="preserve">A CoglHandle for an offscreen buffer</doc>
4253           <type name="Handle" c:type="CoglHandle"/>
4254         </parameter>
4255       </parameters>
4256     </function>
4257     <function name="offscreen_unref"
4258               c:identifier="cogl_offscreen_unref"
4259               deprecated="cogl_handle_unref should be used in new code."
4260               deprecated-version="1.2">
4261       <doc xml:whitespace="preserve">Decreases the reference count for the offscreen buffer and frees it when
4262 the count reaches 0.</doc>
4263       <return-value transfer-ownership="none">
4264         <type name="none" c:type="void"/>
4265       </return-value>
4266       <parameters>
4267         <parameter name="handle" transfer-ownership="none">
4268           <doc xml:whitespace="preserve">A CoglHandle for an offscreen buffer</doc>
4269           <type name="Handle" c:type="CoglHandle"/>
4270         </parameter>
4271       </parameters>
4272     </function>
4273     <function name="ortho" c:identifier="cogl_ortho" version="1.0">
4274       <doc xml:whitespace="preserve">Replaces the current projection matrix with an orthographic projection
4275 matrix. See &lt;xref linkend="cogl-ortho-matrix"/&gt; to see how the matrix is
4276 calculated.
4277 &lt;figure id="cogl-ortho-matrix"&gt;
4278 &lt;title&gt;&lt;/title&gt;
4279 &lt;graphic fileref="cogl_ortho.png" format="PNG"/&gt;
4280 &lt;/figure&gt;
4281 &lt;note&gt;This function copies the arguments from OpenGL's glOrtho() even
4282 though they are unnecessarily confusing due to the z near and z far
4283 arguments actually being a "distance" from the origin, where
4284 negative values are behind the viewer, instead of coordinates for
4285 the z clipping planes which would have been consistent with the
4286 left, right bottom and top arguments.&lt;/note&gt;</doc>
4287       <return-value transfer-ownership="none">
4288         <type name="none" c:type="void"/>
4289       </return-value>
4290       <parameters>
4291         <parameter name="left" transfer-ownership="none">
4292           <doc xml:whitespace="preserve">The coordinate for the left clipping plane</doc>
4293           <type name="float" c:type="float"/>
4294         </parameter>
4295         <parameter name="right" transfer-ownership="none">
4296           <doc xml:whitespace="preserve">The coordinate for the right clipping plane</doc>
4297           <type name="float" c:type="float"/>
4298         </parameter>
4299         <parameter name="bottom" transfer-ownership="none">
4300           <doc xml:whitespace="preserve">The coordinate for the bottom clipping plane</doc>
4301           <type name="float" c:type="float"/>
4302         </parameter>
4303         <parameter name="top" transfer-ownership="none">
4304           <doc xml:whitespace="preserve">The coordinate for the top clipping plane</doc>
4305           <type name="float" c:type="float"/>
4306         </parameter>
4307         <parameter name="near" transfer-ownership="none">
4308           <doc xml:whitespace="preserve">The &lt;emphasis&gt;distance&lt;/emphasis&gt; to the near clipping plane (negative if the plane is behind the viewer)</doc>
4309           <type name="float" c:type="float"/>
4310         </parameter>
4311         <parameter name="far" transfer-ownership="none">
4312           <doc xml:whitespace="preserve">The &lt;emphasis&gt;distance&lt;/emphasis&gt; for the far clipping plane (negative if the plane is behind the viewer)</doc>
4313           <type name="float" c:type="float"/>
4314         </parameter>
4315       </parameters>
4316     </function>
4317     <function name="path_arc" c:identifier="cogl_path_arc">
4318       <doc xml:whitespace="preserve">Adds an elliptical arc segment to the current path. A straight line
4319 segment will link the current pen location with the first vertex
4320 of the arc. If you perform a move_to to the arcs start just before
4321 drawing it you create a free standing arc.
4322 The angles are measured in degrees where 0° is in the direction of
4323 the positive X axis and 90° is in the direction of the positive Y
4324 axis. The angle of the arc begins at @angle_1 and heads towards
4325 otherwise it will increase).</doc>
4326       <return-value transfer-ownership="none">
4327         <type name="none" c:type="void"/>
4328       </return-value>
4329       <parameters>
4330         <parameter name="center_x" transfer-ownership="none">
4331           <doc xml:whitespace="preserve">X coordinate of the elliptical arc center</doc>
4332           <type name="float" c:type="float"/>
4333         </parameter>
4334         <parameter name="center_y" transfer-ownership="none">
4335           <doc xml:whitespace="preserve">Y coordinate of the elliptical arc center</doc>
4336           <type name="float" c:type="float"/>
4337         </parameter>
4338         <parameter name="radius_x" transfer-ownership="none">
4339           <doc xml:whitespace="preserve">X radius of the elliptical arc</doc>
4340           <type name="float" c:type="float"/>
4341         </parameter>
4342         <parameter name="radius_y" transfer-ownership="none">
4343           <doc xml:whitespace="preserve">Y radius of the elliptical arc</doc>
4344           <type name="float" c:type="float"/>
4345         </parameter>
4346         <parameter name="angle_1" transfer-ownership="none">
4347           <doc xml:whitespace="preserve">Angle in degrees at which the arc begin</doc>
4348           <type name="float" c:type="float"/>
4349         </parameter>
4350         <parameter name="angle_2" transfer-ownership="none">
4351           <doc xml:whitespace="preserve">Angle in degrees at which the arc ends</doc>
4352           <type name="float" c:type="float"/>
4353         </parameter>
4354       </parameters>
4355     </function>
4356     <function name="path_close" c:identifier="cogl_path_close">
4357       <doc xml:whitespace="preserve">Closes the path being constructed by adding a straight line segment
4358 to it that ends at the first vertex of the path.</doc>
4359       <return-value transfer-ownership="none">
4360         <type name="none" c:type="void"/>
4361       </return-value>
4362     </function>
4363     <function name="path_curve_to" c:identifier="cogl_path_curve_to">
4364       <doc xml:whitespace="preserve">Adds a cubic bezier curve segment to the current path with the given
4365 second, third and fourth control points and using current pen location
4366 as the first control point.</doc>
4367       <return-value transfer-ownership="none">
4368         <type name="none" c:type="void"/>
4369       </return-value>
4370       <parameters>
4371         <parameter name="x_1" transfer-ownership="none">
4372           <doc xml:whitespace="preserve">X coordinate of the second bezier control point</doc>
4373           <type name="float" c:type="float"/>
4374         </parameter>
4375         <parameter name="y_1" transfer-ownership="none">
4376           <doc xml:whitespace="preserve">Y coordinate of the second bezier control point</doc>
4377           <type name="float" c:type="float"/>
4378         </parameter>
4379         <parameter name="x_2" transfer-ownership="none">
4380           <doc xml:whitespace="preserve">X coordinate of the third bezier control point</doc>
4381           <type name="float" c:type="float"/>
4382         </parameter>
4383         <parameter name="y_2" transfer-ownership="none">
4384           <doc xml:whitespace="preserve">Y coordinate of the third bezier control point</doc>
4385           <type name="float" c:type="float"/>
4386         </parameter>
4387         <parameter name="x_3" transfer-ownership="none">
4388           <doc xml:whitespace="preserve">X coordinate of the fourth bezier control point</doc>
4389           <type name="float" c:type="float"/>
4390         </parameter>
4391         <parameter name="y_3" transfer-ownership="none">
4392           <doc xml:whitespace="preserve">Y coordinate of the fourth bezier control point</doc>
4393           <type name="float" c:type="float"/>
4394         </parameter>
4395       </parameters>
4396     </function>
4397     <function name="path_ellipse" c:identifier="cogl_path_ellipse">
4398       <doc xml:whitespace="preserve">Constructs an ellipse shape. If there is an existing path this will
4399 start a new disjoint sub-path.</doc>
4400       <return-value transfer-ownership="none">
4401         <type name="none" c:type="void"/>
4402       </return-value>
4403       <parameters>
4404         <parameter name="center_x" transfer-ownership="none">
4405           <doc xml:whitespace="preserve">X coordinate of the ellipse center</doc>
4406           <type name="float" c:type="float"/>
4407         </parameter>
4408         <parameter name="center_y" transfer-ownership="none">
4409           <doc xml:whitespace="preserve">Y coordinate of the ellipse center</doc>
4410           <type name="float" c:type="float"/>
4411         </parameter>
4412         <parameter name="radius_x" transfer-ownership="none">
4413           <doc xml:whitespace="preserve">X radius of the ellipse</doc>
4414           <type name="float" c:type="float"/>
4415         </parameter>
4416         <parameter name="radius_y" transfer-ownership="none">
4417           <doc xml:whitespace="preserve">Y radius of the ellipse</doc>
4418           <type name="float" c:type="float"/>
4419         </parameter>
4420       </parameters>
4421     </function>
4422     <function name="path_fill" c:identifier="cogl_path_fill">
4423       <doc xml:whitespace="preserve">Fills the interior of the constructed shape using the current
4424 drawing color. The current path is then cleared. To use the path
4425 again, call cogl_path_fill_preserve() instead.
4426 The interior of the shape is determined using the fill rule of the
4427 path. See %CoglPathFillRule for details.</doc>
4428       <return-value transfer-ownership="none">
4429         <type name="none" c:type="void"/>
4430       </return-value>
4431     </function>
4432     <function name="path_fill_preserve"
4433               c:identifier="cogl_path_fill_preserve"
4434               version="1.0">
4435       <doc xml:whitespace="preserve">Fills the interior of the constructed shape using the current
4436 drawing color and preserves the path to be used again. See
4437 cogl_path_fill() for a description what is considered the interior
4438 of the shape.</doc>
4439       <return-value transfer-ownership="none">
4440         <type name="none" c:type="void"/>
4441       </return-value>
4442     </function>
4443     <function name="path_get_fill_rule"
4444               c:identifier="cogl_path_get_fill_rule"
4445               version="1.4">
4446       <return-value transfer-ownership="full">
4447         <doc xml:whitespace="preserve">the fill rule that is used for the current path.</doc>
4448         <type name="PathFillRule" c:type="CoglPathFillRule"/>
4449       </return-value>
4450     </function>
4451     <function name="path_line" c:identifier="cogl_path_line">
4452       <doc xml:whitespace="preserve">Constructs a straight line shape starting and ending at the given
4453 coordinates. If there is an existing path this will start a new
4454 disjoint sub-path.</doc>
4455       <return-value transfer-ownership="none">
4456         <type name="none" c:type="void"/>
4457       </return-value>
4458       <parameters>
4459         <parameter name="x_1" transfer-ownership="none">
4460           <doc xml:whitespace="preserve">X coordinate of the start line vertex</doc>
4461           <type name="float" c:type="float"/>
4462         </parameter>
4463         <parameter name="y_1" transfer-ownership="none">
4464           <doc xml:whitespace="preserve">Y coordinate of the start line vertex</doc>
4465           <type name="float" c:type="float"/>
4466         </parameter>
4467         <parameter name="x_2" transfer-ownership="none">
4468           <doc xml:whitespace="preserve">X coordinate of the end line vertex</doc>
4469           <type name="float" c:type="float"/>
4470         </parameter>
4471         <parameter name="y_2" transfer-ownership="none">
4472           <doc xml:whitespace="preserve">Y coordinate of the end line vertex</doc>
4473           <type name="float" c:type="float"/>
4474         </parameter>
4475       </parameters>
4476     </function>
4477     <function name="path_line_to" c:identifier="cogl_path_line_to">
4478       <doc xml:whitespace="preserve">Adds a straight line segment to the current path that ends at the
4479 given coordinates.</doc>
4480       <return-value transfer-ownership="none">
4481         <type name="none" c:type="void"/>
4482       </return-value>
4483       <parameters>
4484         <parameter name="x" transfer-ownership="none">
4485           <doc xml:whitespace="preserve">X coordinate of the end line vertex</doc>
4486           <type name="float" c:type="float"/>
4487         </parameter>
4488         <parameter name="y" transfer-ownership="none">
4489           <doc xml:whitespace="preserve">Y coordinate of the end line vertex</doc>
4490           <type name="float" c:type="float"/>
4491         </parameter>
4492       </parameters>
4493     </function>
4494     <function name="path_move_to" c:identifier="cogl_path_move_to">
4495       <doc xml:whitespace="preserve">Moves the pen to the given location. If there is an existing path
4496 this will start a new disjoint subpath.</doc>
4497       <return-value transfer-ownership="none">
4498         <type name="none" c:type="void"/>
4499       </return-value>
4500       <parameters>
4501         <parameter name="x" transfer-ownership="none">
4502           <doc xml:whitespace="preserve">X coordinate of the pen location to move to.</doc>
4503           <type name="float" c:type="float"/>
4504         </parameter>
4505         <parameter name="y" transfer-ownership="none">
4506           <doc xml:whitespace="preserve">Y coordinate of the pen location to move to.</doc>
4507           <type name="float" c:type="float"/>
4508         </parameter>
4509       </parameters>
4510     </function>
4511     <function name="path_new" c:identifier="cogl_path_new" version="1.0">
4512       <doc xml:whitespace="preserve">Clears the current path and starts a new one. Creating a new path
4513 also resets the fill rule to the default which is
4514 %COGL_PATH_FILL_RULE_EVEN_ODD.</doc>
4515       <return-value transfer-ownership="none">
4516         <type name="none" c:type="void"/>
4517       </return-value>
4518     </function>
4519     <function name="path_polygon" c:identifier="cogl_path_polygon">
4520       <doc xml:whitespace="preserve">Constructs a polygonal shape of the given number of vertices. If
4521 there is an existing path this will start a new disjoint sub-path.
4522 The coords array must contain 2 * num_points values. The first value
4523 represents the X coordinate of the first vertex, the second value
4524 represents the Y coordinate of the first vertex, continuing in the same
4525 fashion for the rest of the vertices.</doc>
4526       <return-value transfer-ownership="none">
4527         <type name="none" c:type="void"/>
4528       </return-value>
4529       <parameters>
4530         <parameter name="coords" transfer-ownership="none">
4531           <doc xml:whitespace="preserve">A pointer to the first element of an array of fixed-point values that specify the vertex coordinates.</doc>
4532           <array c:type="float*">
4533             <type name="float"/>
4534           </array>
4535         </parameter>
4536         <parameter name="num_points" transfer-ownership="none">
4537           <doc xml:whitespace="preserve">The total number of vertices.</doc>
4538           <type name="int" c:type="int"/>
4539         </parameter>
4540       </parameters>
4541     </function>
4542     <function name="path_polyline" c:identifier="cogl_path_polyline">
4543       <doc xml:whitespace="preserve">Constructs a series of straight line segments, starting from the
4544 first given vertex coordinate. If there is an existing path this
4545 will start a new disjoint sub-path. Each subsequent segment starts
4546 where the previous one ended and ends at the next given vertex
4547 coordinate.
4548 The coords array must contain 2 * num_points values. The first value
4549 represents the X coordinate of the first vertex, the second value
4550 represents the Y coordinate of the first vertex, continuing in the same
4551 fashion for the rest of the vertices. (num_points - 1) segments will
4552 be constructed.</doc>
4553       <return-value transfer-ownership="none">
4554         <type name="none" c:type="void"/>
4555       </return-value>
4556       <parameters>
4557         <parameter name="coords" transfer-ownership="none">
4558           <doc xml:whitespace="preserve">A pointer to the first element of an array of fixed-point values that specify the vertex coordinates.</doc>
4559           <array c:type="float*">
4560             <type name="float"/>
4561           </array>
4562         </parameter>
4563         <parameter name="num_points" transfer-ownership="none">
4564           <doc xml:whitespace="preserve">The total number of vertices.</doc>
4565           <type name="int" c:type="int"/>
4566         </parameter>
4567       </parameters>
4568     </function>
4569     <function name="path_rectangle" c:identifier="cogl_path_rectangle">
4570       <doc xml:whitespace="preserve">Constructs a rectangular shape at the given coordinates. If there
4571 is an existing path this will start a new disjoint sub-path.</doc>
4572       <return-value transfer-ownership="none">
4573         <type name="none" c:type="void"/>
4574       </return-value>
4575       <parameters>
4576         <parameter name="x_1" transfer-ownership="none">
4577           <doc xml:whitespace="preserve">X coordinate of the top-left corner.</doc>
4578           <type name="float" c:type="float"/>
4579         </parameter>
4580         <parameter name="y_1" transfer-ownership="none">
4581           <doc xml:whitespace="preserve">Y coordinate of the top-left corner.</doc>
4582           <type name="float" c:type="float"/>
4583         </parameter>
4584         <parameter name="x_2" transfer-ownership="none">
4585           <doc xml:whitespace="preserve">X coordinate of the bottom-right corner.</doc>
4586           <type name="float" c:type="float"/>
4587         </parameter>
4588         <parameter name="y_2" transfer-ownership="none">
4589           <doc xml:whitespace="preserve">Y coordinate of the bottom-right corner.</doc>
4590           <type name="float" c:type="float"/>
4591         </parameter>
4592       </parameters>
4593     </function>
4594     <function name="path_rel_curve_to" c:identifier="cogl_path_rel_curve_to">
4595       <doc xml:whitespace="preserve">Adds a cubic bezier curve segment to the current path with the given
4596 second, third and fourth control points and using current pen location
4597 as the first control point. The given coordinates are relative to the
4598 current pen location.</doc>
4599       <return-value transfer-ownership="none">
4600         <type name="none" c:type="void"/>
4601       </return-value>
4602       <parameters>
4603         <parameter name="x_1" transfer-ownership="none">
4604           <doc xml:whitespace="preserve">X coordinate of the second bezier control point</doc>
4605           <type name="float" c:type="float"/>
4606         </parameter>
4607         <parameter name="y_1" transfer-ownership="none">
4608           <doc xml:whitespace="preserve">Y coordinate of the second bezier control point</doc>
4609           <type name="float" c:type="float"/>
4610         </parameter>
4611         <parameter name="x_2" transfer-ownership="none">
4612           <doc xml:whitespace="preserve">X coordinate of the third bezier control point</doc>
4613           <type name="float" c:type="float"/>
4614         </parameter>
4615         <parameter name="y_2" transfer-ownership="none">
4616           <doc xml:whitespace="preserve">Y coordinate of the third bezier control point</doc>
4617           <type name="float" c:type="float"/>
4618         </parameter>
4619         <parameter name="x_3" transfer-ownership="none">
4620           <doc xml:whitespace="preserve">X coordinate of the fourth bezier control point</doc>
4621           <type name="float" c:type="float"/>
4622         </parameter>
4623         <parameter name="y_3" transfer-ownership="none">
4624           <doc xml:whitespace="preserve">Y coordinate of the fourth bezier control point</doc>
4625           <type name="float" c:type="float"/>
4626         </parameter>
4627       </parameters>
4628     </function>
4629     <function name="path_rel_line_to" c:identifier="cogl_path_rel_line_to">
4630       <doc xml:whitespace="preserve">Adds a straight line segment to the current path that ends at the
4631 given coordinates relative to the current pen location.</doc>
4632       <return-value transfer-ownership="none">
4633         <type name="none" c:type="void"/>
4634       </return-value>
4635       <parameters>
4636         <parameter name="x" transfer-ownership="none">
4637           <doc xml:whitespace="preserve">X offset from the current pen location of the end line vertex</doc>
4638           <type name="float" c:type="float"/>
4639         </parameter>
4640         <parameter name="y" transfer-ownership="none">
4641           <doc xml:whitespace="preserve">Y offset from the current pen location of the end line vertex</doc>
4642           <type name="float" c:type="float"/>
4643         </parameter>
4644       </parameters>
4645     </function>
4646     <function name="path_rel_move_to" c:identifier="cogl_path_rel_move_to">
4647       <doc xml:whitespace="preserve">Moves the pen to the given offset relative to the current pen
4648 location. If there is an existing path this will start a new
4649 disjoint subpath.</doc>
4650       <return-value transfer-ownership="none">
4651         <type name="none" c:type="void"/>
4652       </return-value>
4653       <parameters>
4654         <parameter name="x" transfer-ownership="none">
4655           <doc xml:whitespace="preserve">X offset from the current pen location to move the pen to.</doc>
4656           <type name="float" c:type="float"/>
4657         </parameter>
4658         <parameter name="y" transfer-ownership="none">
4659           <doc xml:whitespace="preserve">Y offset from the current pen location to move the pen to.</doc>
4660           <type name="float" c:type="float"/>
4661         </parameter>
4662       </parameters>
4663     </function>
4664     <function name="path_round_rectangle"
4665               c:identifier="cogl_path_round_rectangle">
4666       <doc xml:whitespace="preserve">Constructs a rectangular shape with rounded corners. If there is an
4667 existing path this will start a new disjoint sub-path.</doc>
4668       <return-value transfer-ownership="none">
4669         <type name="none" c:type="void"/>
4670       </return-value>
4671       <parameters>
4672         <parameter name="x_1" transfer-ownership="none">
4673           <doc xml:whitespace="preserve">X coordinate of the top-left corner.</doc>
4674           <type name="float" c:type="float"/>
4675         </parameter>
4676         <parameter name="y_1" transfer-ownership="none">
4677           <doc xml:whitespace="preserve">Y coordinate of the top-left corner.</doc>
4678           <type name="float" c:type="float"/>
4679         </parameter>
4680         <parameter name="x_2" transfer-ownership="none">
4681           <doc xml:whitespace="preserve">X coordinate of the bottom-right corner.</doc>
4682           <type name="float" c:type="float"/>
4683         </parameter>
4684         <parameter name="y_2" transfer-ownership="none">
4685           <doc xml:whitespace="preserve">Y coordinate of the bottom-right corner.</doc>
4686           <type name="float" c:type="float"/>
4687         </parameter>
4688         <parameter name="radius" transfer-ownership="none">
4689           <doc xml:whitespace="preserve">Radius of the corner arcs.</doc>
4690           <type name="float" c:type="float"/>
4691         </parameter>
4692         <parameter name="arc_step" transfer-ownership="none">
4693           <doc xml:whitespace="preserve">Angle increment resolution for subdivision of the corner arcs.</doc>
4694           <type name="float" c:type="float"/>
4695         </parameter>
4696       </parameters>
4697     </function>
4698     <function name="path_set_fill_rule"
4699               c:identifier="cogl_path_set_fill_rule"
4700               version="1.4">
4701       <doc xml:whitespace="preserve">Sets the fill rule of the current path to @fill_rule. This will
4702 affect how the path is filled when cogl_path_fill() is later
4703 called. Note that the fill rule state is attached to the path so
4704 calling cogl_get_path() will preserve the fill rule and calling
4705 cogl_path_new() will reset the fill rule back to the default.</doc>
4706       <return-value transfer-ownership="none">
4707         <type name="none" c:type="void"/>
4708       </return-value>
4709       <parameters>
4710         <parameter name="fill_rule" transfer-ownership="none">
4711           <doc xml:whitespace="preserve">The new fill rule.</doc>
4712           <type name="PathFillRule" c:type="CoglPathFillRule"/>
4713         </parameter>
4714       </parameters>
4715     </function>
4716     <function name="path_stroke" c:identifier="cogl_path_stroke">
4717       <doc xml:whitespace="preserve">Strokes the constructed shape using the current drawing color and a
4718 width of 1 pixel (regardless of the current transformation
4719 matrix). To current path is then cleared. To use the path again,
4720 call cogl_path_stroke_preserve() instead.</doc>
4721       <return-value transfer-ownership="none">
4722         <type name="none" c:type="void"/>
4723       </return-value>
4724     </function>
4725     <function name="path_stroke_preserve"
4726               c:identifier="cogl_path_stroke_preserve"
4727               version="1.0">
4728       <doc xml:whitespace="preserve">Strokes the constructed shape using the current drawing color and
4729 preserves the path to be used again.</doc>
4730       <return-value transfer-ownership="none">
4731         <type name="none" c:type="void"/>
4732       </return-value>
4733     </function>
4734     <function name="perspective" c:identifier="cogl_perspective">
4735       <doc xml:whitespace="preserve">Replaces the current projection matrix with a perspective matrix
4736 based on the provided values.</doc>
4737       <return-value transfer-ownership="none">
4738         <type name="none" c:type="void"/>
4739       </return-value>
4740       <parameters>
4741         <parameter name="fovy" transfer-ownership="none">
4742           <doc xml:whitespace="preserve">Vertical of view angle in degrees.</doc>
4743           <type name="float" c:type="float"/>
4744         </parameter>
4745         <parameter name="aspect" transfer-ownership="none">
4746           <doc xml:whitespace="preserve">Aspect ratio of diesplay</doc>
4747           <type name="float" c:type="float"/>
4748         </parameter>
4749         <parameter name="z_near" transfer-ownership="none">
4750           <doc xml:whitespace="preserve">Nearest visible point</doc>
4751           <type name="float" c:type="float"/>
4752         </parameter>
4753         <parameter name="z_far" transfer-ownership="none">
4754           <doc xml:whitespace="preserve">Furthest visible point along the z-axis</doc>
4755           <type name="float" c:type="float"/>
4756         </parameter>
4757       </parameters>
4758     </function>
4759     <function name="polygon" c:identifier="cogl_polygon" version="1.0">
4760       <doc xml:whitespace="preserve">Draws a convex polygon using the current source material to fill / texture
4761 with according to the texture coordinates passed.
4762 If @use_color is %TRUE then the color will be changed for each vertex using
4763 the value specified in the color member of #CoglTextureVertex. This can be
4764 used for example to make the texture fade out by setting the alpha value of
4765 the color.
4766 All of the texture coordinates must be in the range [0,1] and repeating the
4767 texture is not supported.
4768 Because of the way this function is implemented it will currently
4769 only work if either the texture is not sliced or the backend is not
4770 OpenGL ES and the minifying and magnifying functions are both set
4771 to COGL_MATERIAL_FILTER_NEAREST.</doc>
4772       <return-value transfer-ownership="none">
4773         <type name="none" c:type="void"/>
4774       </return-value>
4775       <parameters>
4776         <parameter name="vertices" transfer-ownership="none">
4777           <doc xml:whitespace="preserve">An array of #CoglTextureVertex structs</doc>
4778           <type name="TextureVertex" c:type="CoglTextureVertex*"/>
4779         </parameter>
4780         <parameter name="n_vertices" transfer-ownership="none">
4781           <doc xml:whitespace="preserve">The length of the vertices array</doc>
4782           <type name="uint" c:type="unsigned int"/>
4783         </parameter>
4784         <parameter name="use_color" transfer-ownership="none">
4785           <doc xml:whitespace="preserve">%TRUE if the color member of #CoglTextureVertex should be used</doc>
4786           <type name="boolean" c:type="gboolean"/>
4787         </parameter>
4788       </parameters>
4789     </function>
4790     <function name="pop_draw_buffer"
4791               c:identifier="cogl_pop_draw_buffer"
4792               deprecated="The draw buffer API was replaced with a framebuffer API"
4793               deprecated-version="1.2">
4794       <doc xml:whitespace="preserve">Restore cogl_set_draw_buffer() state.</doc>
4795       <return-value transfer-ownership="none">
4796         <type name="none" c:type="void"/>
4797       </return-value>
4798     </function>
4799     <function name="pop_framebuffer"
4800               c:identifier="cogl_pop_framebuffer"
4801               version="1.2">
4802       <doc xml:whitespace="preserve">Restores the framebuffer that was previously at the top of the stack.
4803 All subsequent drawing will be redirected to this framebuffer.</doc>
4804       <return-value transfer-ownership="none">
4805         <type name="none" c:type="void"/>
4806       </return-value>
4807     </function>
4808     <function name="pop_matrix" c:identifier="cogl_pop_matrix">
4809       <doc xml:whitespace="preserve">Restores the current model-view matrix from the matrix stack.</doc>
4810       <return-value transfer-ownership="none">
4811         <type name="none" c:type="void"/>
4812       </return-value>
4813     </function>
4814     <function name="program_attach_shader"
4815               c:identifier="cogl_program_attach_shader">
4816       <doc xml:whitespace="preserve">Attaches a shader to a program object, a program can have one vertex shader
4817 and one fragment shader attached.</doc>
4818       <return-value transfer-ownership="none">
4819         <type name="none" c:type="void"/>
4820       </return-value>
4821       <parameters>
4822         <parameter name="program_handle" transfer-ownership="none">
4823           <doc xml:whitespace="preserve">a #CoglHandle for a shdaer program.</doc>
4824           <type name="Handle" c:type="CoglHandle"/>
4825         </parameter>
4826         <parameter name="shader_handle" transfer-ownership="none">
4827           <doc xml:whitespace="preserve">a #CoglHandle for a vertex of fragment shader.</doc>
4828           <type name="Handle" c:type="CoglHandle"/>
4829         </parameter>
4830       </parameters>
4831     </function>
4832     <function name="program_get_uniform_location"
4833               c:identifier="cogl_program_get_uniform_location">
4834       <doc xml:whitespace="preserve">Retrieve the location (offset) of a uniform variable in a shader program,
4835 a uniform is a variable that is constant for all vertices/fragments for a
4836 shader object and is possible to modify as an external parameter.
4837 This uniform can be set using cogl_program_uniform_1f() when the
4838 program is in use.</doc>
4839       <return-value transfer-ownership="none">
4840         <doc xml:whitespace="preserve">the offset of a uniform in a specified program.</doc>
4841         <type name="int" c:type="int"/>
4842       </return-value>
4843       <parameters>
4844         <parameter name="handle" transfer-ownership="none">
4845           <doc xml:whitespace="preserve">a #CoglHandle for a shader program.</doc>
4846           <type name="Handle" c:type="CoglHandle"/>
4847         </parameter>
4848         <parameter name="uniform_name" transfer-ownership="none">
4849           <doc xml:whitespace="preserve">the name of a uniform.</doc>
4850           <type name="utf8" c:type="char*"/>
4851         </parameter>
4852       </parameters>
4853     </function>
4854     <function name="program_link" c:identifier="cogl_program_link">
4855       <doc xml:whitespace="preserve">Links a program making it ready for use.</doc>
4856       <return-value transfer-ownership="none">
4857         <type name="none" c:type="void"/>
4858       </return-value>
4859       <parameters>
4860         <parameter name="handle" transfer-ownership="none">
4861           <doc xml:whitespace="preserve">a #CoglHandle for a shader program.</doc>
4862           <type name="Handle" c:type="CoglHandle"/>
4863         </parameter>
4864       </parameters>
4865     </function>
4866     <function name="program_ref" c:identifier="cogl_program_ref">
4867       <doc xml:whitespace="preserve">Add an extra reference to a program.</doc>
4868       <return-value transfer-ownership="full">
4869         <doc xml:whitespace="preserve">@handle</doc>
4870         <type name="Handle" c:type="CoglHandle"/>
4871       </return-value>
4872       <parameters>
4873         <parameter name="handle" transfer-ownership="none">
4874           <doc xml:whitespace="preserve">A #CoglHandle to a program.</doc>
4875           <type name="Handle" c:type="CoglHandle"/>
4876         </parameter>
4877       </parameters>
4878     </function>
4879     <function name="program_set_uniform_1f"
4880               c:identifier="cogl_program_set_uniform_1f"
4881               version="1.4">
4882       <doc xml:whitespace="preserve">Changes the value of a floating point uniform for the given linked</doc>
4883       <return-value transfer-ownership="none">
4884         <type name="none" c:type="void"/>
4885       </return-value>
4886       <parameters>
4887         <parameter name="program" transfer-ownership="none">
4888           <doc xml:whitespace="preserve">A #CoglHandle for a linked program</doc>
4889           <type name="Handle" c:type="CoglHandle"/>
4890         </parameter>
4891         <parameter name="uniform_location" transfer-ownership="none">
4892           <doc xml:whitespace="preserve">the uniform location retrieved from cogl_program_get_uniform_location().</doc>
4893           <type name="int" c:type="int"/>
4894         </parameter>
4895         <parameter name="value" transfer-ownership="none">
4896           <doc xml:whitespace="preserve">the new value of the uniform.</doc>
4897           <type name="float" c:type="float"/>
4898         </parameter>
4899       </parameters>
4900     </function>
4901     <function name="program_set_uniform_1i"
4902               c:identifier="cogl_program_set_uniform_1i"
4903               version="1.4">
4904       <doc xml:whitespace="preserve">Changes the value of an integer uniform for the given linked</doc>
4905       <return-value transfer-ownership="none">
4906         <type name="none" c:type="void"/>
4907       </return-value>
4908       <parameters>
4909         <parameter name="program" transfer-ownership="none">
4910           <doc xml:whitespace="preserve">A #CoglHandle for a linked program</doc>
4911           <type name="Handle" c:type="CoglHandle"/>
4912         </parameter>
4913         <parameter name="uniform_location" transfer-ownership="none">
4914           <doc xml:whitespace="preserve">the uniform location retrieved from cogl_program_get_uniform_location().</doc>
4915           <type name="int" c:type="int"/>
4916         </parameter>
4917         <parameter name="value" transfer-ownership="none">
4918           <doc xml:whitespace="preserve">the new value of the uniform.</doc>
4919           <type name="int" c:type="int"/>
4920         </parameter>
4921       </parameters>
4922     </function>
4923     <function name="program_set_uniform_float"
4924               c:identifier="cogl_program_set_uniform_float"
4925               version="1.4">
4926       <doc xml:whitespace="preserve">Changes the value of a float vector uniform, or uniform array for
4927 the given linked @program.</doc>
4928       <return-value transfer-ownership="none">
4929         <type name="none" c:type="void"/>
4930       </return-value>
4931       <parameters>
4932         <parameter name="program" transfer-ownership="none">
4933           <doc xml:whitespace="preserve">A #CoglHandle for a linked program</doc>
4934           <type name="Handle" c:type="CoglHandle"/>
4935         </parameter>
4936         <parameter name="uniform_location" transfer-ownership="none">
4937           <doc xml:whitespace="preserve">the uniform location retrieved from cogl_program_get_uniform_location().</doc>
4938           <type name="int" c:type="int"/>
4939         </parameter>
4940         <parameter name="n_components" transfer-ownership="none">
4941           <doc xml:whitespace="preserve">The number of components for the uniform. For example with glsl you'd use 3 for a vec3 or 4 for a vec4.</doc>
4942           <type name="int" c:type="int"/>
4943         </parameter>
4944         <parameter name="count" transfer-ownership="none">
4945           <doc xml:whitespace="preserve">For uniform arrays this is the array length otherwise just pass 1</doc>
4946           <type name="int" c:type="int"/>
4947         </parameter>
4948         <parameter name="value" transfer-ownership="none">
4949           <doc xml:whitespace="preserve">the new value of the uniform[s].</doc>
4950           <array length="3" c:type="float*">
4951             <type name="float"/>
4952           </array>
4953         </parameter>
4954       </parameters>
4955     </function>
4956     <function name="program_set_uniform_int"
4957               c:identifier="cogl_program_set_uniform_int"
4958               version="1.4">
4959       <doc xml:whitespace="preserve">Changes the value of a int vector uniform, or uniform array for
4960 the given linked @program.</doc>
4961       <return-value transfer-ownership="none">
4962         <type name="none" c:type="void"/>
4963       </return-value>
4964       <parameters>
4965         <parameter name="program" transfer-ownership="none">
4966           <doc xml:whitespace="preserve">A #CoglHandle for a linked program</doc>
4967           <type name="Handle" c:type="CoglHandle"/>
4968         </parameter>
4969         <parameter name="uniform_location" transfer-ownership="none">
4970           <doc xml:whitespace="preserve">the uniform location retrieved from cogl_program_get_uniform_location().</doc>
4971           <type name="int" c:type="int"/>
4972         </parameter>
4973         <parameter name="n_components" transfer-ownership="none">
4974           <doc xml:whitespace="preserve">The number of components for the uniform. For example with glsl you'd use 3 for a vec3 or 4 for a vec4.</doc>
4975           <type name="int" c:type="int"/>
4976         </parameter>
4977         <parameter name="count" transfer-ownership="none">
4978           <doc xml:whitespace="preserve">For uniform arrays this is the array length otherwise just pass 1</doc>
4979           <type name="int" c:type="int"/>
4980         </parameter>
4981         <parameter name="value" transfer-ownership="none">
4982           <doc xml:whitespace="preserve">the new value of the uniform[s].</doc>
4983           <array length="3" c:type="int*">
4984             <type name="int"/>
4985           </array>
4986         </parameter>
4987       </parameters>
4988     </function>
4989     <function name="program_set_uniform_matrix"
4990               c:identifier="cogl_program_set_uniform_matrix"
4991               version="1.4">
4992       <doc xml:whitespace="preserve">Changes the value of a matrix uniform, or uniform array in the
4993 given linked @program.</doc>
4994       <return-value transfer-ownership="none">
4995         <type name="none" c:type="void"/>
4996       </return-value>
4997       <parameters>
4998         <parameter name="program" transfer-ownership="none">
4999           <doc xml:whitespace="preserve">A #CoglHandle for a linked program</doc>
5000           <type name="Handle" c:type="CoglHandle"/>
5001         </parameter>
5002         <parameter name="uniform_location" transfer-ownership="none">
5003           <doc xml:whitespace="preserve">the uniform location retrieved from cogl_program_get_uniform_location().</doc>
5004           <type name="int" c:type="int"/>
5005         </parameter>
5006         <parameter name="dimensions" transfer-ownership="none">
5007           <doc xml:whitespace="preserve">The dimensions of the matrix. So for for example pass 2 for a 2x2 matrix or 3 for 3x3.</doc>
5008           <type name="int" c:type="int"/>
5009         </parameter>
5010         <parameter name="count" transfer-ownership="none">
5011           <doc xml:whitespace="preserve">For uniform arrays this is the array length otherwise just pass 1</doc>
5012           <type name="int" c:type="int"/>
5013         </parameter>
5014         <parameter name="transpose" transfer-ownership="none">
5015           <doc xml:whitespace="preserve">Whether to transpose the matrix when setting the uniform.</doc>
5016           <type name="boolean" c:type="gboolean"/>
5017         </parameter>
5018         <parameter name="value" transfer-ownership="none">
5019           <doc xml:whitespace="preserve">the new value of the uniform.</doc>
5020           <array length="3" c:type="float*">
5021             <type name="float"/>
5022           </array>
5023         </parameter>
5024       </parameters>
5025     </function>
5026     <function name="program_uniform_1f"
5027               c:identifier="cogl_program_uniform_1f"
5028               deprecated="Use cogl_program_set_uniform_1f() instead."
5029               deprecated-version="1.4">
5030       <doc xml:whitespace="preserve">Changes the value of a floating point uniform in the currently
5031 used (see cogl_program_use()) shader program.</doc>
5032       <return-value transfer-ownership="none">
5033         <type name="none" c:type="void"/>
5034       </return-value>
5035       <parameters>
5036         <parameter name="uniform_no" transfer-ownership="none">
5037           <doc xml:whitespace="preserve">the uniform to set.</doc>
5038           <type name="int" c:type="int"/>
5039         </parameter>
5040         <parameter name="value" transfer-ownership="none">
5041           <doc xml:whitespace="preserve">the new value of the uniform.</doc>
5042           <type name="float" c:type="float"/>
5043         </parameter>
5044       </parameters>
5045     </function>
5046     <function name="program_uniform_1i"
5047               c:identifier="cogl_program_uniform_1i"
5048               deprecated="Use cogl_program_set_uniform_1i() instead."
5049               deprecated-version="1.4">
5050       <doc xml:whitespace="preserve">Changes the value of an integer uniform in the currently
5051 used (see cogl_program_use()) shader program.</doc>
5052       <return-value transfer-ownership="none">
5053         <type name="none" c:type="void"/>
5054       </return-value>
5055       <parameters>
5056         <parameter name="uniform_no" transfer-ownership="none">
5057           <doc xml:whitespace="preserve">the uniform to set.</doc>
5058           <type name="int" c:type="int"/>
5059         </parameter>
5060         <parameter name="value" transfer-ownership="none">
5061           <doc xml:whitespace="preserve">the new value of the uniform.</doc>
5062           <type name="int" c:type="int"/>
5063         </parameter>
5064       </parameters>
5065     </function>
5066     <function name="program_uniform_float"
5067               c:identifier="cogl_program_uniform_float"
5068               deprecated="Use cogl_program_set_uniform_float() instead."
5069               deprecated-version="1.4">
5070       <doc xml:whitespace="preserve">Changes the value of a float vector uniform, or uniform array in the
5071 currently used (see cogl_program_use()) shader program.</doc>
5072       <return-value transfer-ownership="none">
5073         <type name="none" c:type="void"/>
5074       </return-value>
5075       <parameters>
5076         <parameter name="uniform_no" transfer-ownership="none">
5077           <doc xml:whitespace="preserve">the uniform to set.</doc>
5078           <type name="int" c:type="int"/>
5079         </parameter>
5080         <parameter name="size" transfer-ownership="none">
5081           <doc xml:whitespace="preserve">Size of float vector.</doc>
5082           <type name="int" c:type="int"/>
5083         </parameter>
5084         <parameter name="count" transfer-ownership="none">
5085           <doc xml:whitespace="preserve">Size of array of uniforms.</doc>
5086           <type name="int" c:type="int"/>
5087         </parameter>
5088         <parameter name="value" transfer-ownership="none">
5089           <doc xml:whitespace="preserve">the new value of the uniform.</doc>
5090           <array length="2" c:type="float*">
5091             <type name="float"/>
5092           </array>
5093         </parameter>
5094       </parameters>
5095     </function>
5096     <function name="program_uniform_int"
5097               c:identifier="cogl_program_uniform_int">
5098       <doc xml:whitespace="preserve">Changes the value of a int vector uniform, or uniform array in the
5099 currently used (see cogl_program_use()) shader program.</doc>
5100       <return-value transfer-ownership="none">
5101         <type name="none" c:type="void"/>
5102       </return-value>
5103       <parameters>
5104         <parameter name="uniform_no" transfer-ownership="none">
5105           <doc xml:whitespace="preserve">the uniform to set.</doc>
5106           <type name="int" c:type="int"/>
5107         </parameter>
5108         <parameter name="size" transfer-ownership="none">
5109           <doc xml:whitespace="preserve">Size of int vector.</doc>
5110           <type name="int" c:type="int"/>
5111         </parameter>
5112         <parameter name="count" transfer-ownership="none">
5113           <doc xml:whitespace="preserve">Size of array of uniforms.</doc>
5114           <type name="int" c:type="int"/>
5115         </parameter>
5116         <parameter name="value" transfer-ownership="none">
5117           <doc xml:whitespace="preserve">the new value of the uniform.</doc>
5118           <array length="2" c:type="int*">
5119             <type name="int"/>
5120           </array>
5121         </parameter>
5122       </parameters>
5123     </function>
5124     <function name="program_uniform_matrix"
5125               c:identifier="cogl_program_uniform_matrix">
5126       <doc xml:whitespace="preserve">Changes the value of a matrix uniform, or uniform array in the
5127 currently used (see cogl_program_use()) shader program. The @size
5128 parameter is used to determine the square size of the matrix.</doc>
5129       <return-value transfer-ownership="none">
5130         <type name="none" c:type="void"/>
5131       </return-value>
5132       <parameters>
5133         <parameter name="uniform_no" transfer-ownership="none">
5134           <doc xml:whitespace="preserve">the uniform to set.</doc>
5135           <type name="int" c:type="int"/>
5136         </parameter>
5137         <parameter name="size" transfer-ownership="none">
5138           <doc xml:whitespace="preserve">Size of matrix.</doc>
5139           <type name="int" c:type="int"/>
5140         </parameter>
5141         <parameter name="count" transfer-ownership="none">
5142           <doc xml:whitespace="preserve">Size of array of uniforms.</doc>
5143           <type name="int" c:type="int"/>
5144         </parameter>
5145         <parameter name="transpose" transfer-ownership="none">
5146           <doc xml:whitespace="preserve">Whether to transpose the matrix when setting the uniform.</doc>
5147           <type name="boolean" c:type="gboolean"/>
5148         </parameter>
5149         <parameter name="value" transfer-ownership="none">
5150           <doc xml:whitespace="preserve">the new value of the uniform.</doc>
5151           <array length="2" c:type="float*">
5152             <type name="float"/>
5153           </array>
5154         </parameter>
5155       </parameters>
5156     </function>
5157     <function name="program_unref" c:identifier="cogl_program_unref">
5158       <doc xml:whitespace="preserve">Removes a reference to a program. If it was the last reference the
5159 program object will be destroyed.</doc>
5160       <return-value transfer-ownership="none">
5161         <type name="none" c:type="void"/>
5162       </return-value>
5163       <parameters>
5164         <parameter name="handle" transfer-ownership="none">
5165           <doc xml:whitespace="preserve">A #CoglHandle to a program.</doc>
5166           <type name="Handle" c:type="CoglHandle"/>
5167         </parameter>
5168       </parameters>
5169     </function>
5170     <function name="program_use" c:identifier="cogl_program_use">
5171       <doc xml:whitespace="preserve">Activate a specific shader program replacing that part of the GL
5172 rendering pipeline, if passed in %COGL_INVALID_HANDLE the default
5173 behavior of GL is reinstated.</doc>
5174       <return-value transfer-ownership="none">
5175         <type name="none" c:type="void"/>
5176       </return-value>
5177       <parameters>
5178         <parameter name="handle" transfer-ownership="none">
5179           <doc xml:whitespace="preserve">a #CoglHandle for a shader program or %COGL_INVALID_HANDLE.</doc>
5180           <type name="Handle" c:type="CoglHandle"/>
5181         </parameter>
5182       </parameters>
5183     </function>
5184     <function name="push_draw_buffer"
5185               c:identifier="cogl_push_draw_buffer"
5186               deprecated="The draw buffer API was replaced with a framebuffer API"
5187               deprecated-version="1.2">
5188       <doc xml:whitespace="preserve">Save cogl_set_draw_buffer() state.</doc>
5189       <return-value transfer-ownership="none">
5190         <type name="none" c:type="void"/>
5191       </return-value>
5192     </function>
5193     <function name="push_framebuffer"
5194               c:identifier="cogl_push_framebuffer"
5195               version="1.2">
5196       <doc xml:whitespace="preserve">Redirects all subsequent drawing to the specified framebuffer. This can
5197 either be an offscreen buffer created with cogl_offscreen_new_to_texture ()
5198 or in the future it may be an onscreen framebuffer too.
5199 You should understand that a framebuffer owns the following state:
5200 &lt;itemizedlist&gt;
5201 &lt;listitem&gt;&lt;simpara&gt;The projection matrix&lt;/simpara&gt;&lt;/listitem&gt;
5202 &lt;listitem&gt;&lt;simpara&gt;The modelview matrix stack&lt;/simpara&gt;&lt;/listitem&gt;
5203 &lt;listitem&gt;&lt;simpara&gt;The viewport&lt;/simpara&gt;&lt;/listitem&gt;
5204 &lt;listitem&gt;&lt;simpara&gt;The clip stack&lt;/simpara&gt;&lt;/listitem&gt;
5205 &lt;/itemizedlist&gt;
5206 So these items will automatically be saved and restored when you
5207 push and pop between different framebuffers.
5208 Also remember a newly allocated framebuffer will have an identity matrix for
5209 the projection and modelview matrices which gives you a coordinate space
5210 like OpenGL with (-1, -1) corresponding to the top left of the viewport,
5211 (1, 1) corresponding to the bottom right and +z coming out towards the
5212 viewer.
5213 If you want to set up a coordinate space like Clutter does with (0, 0)
5214 corresponding to the top left and (framebuffer_width, framebuffer_height)
5215 corresponding to the bottom right you can do so like this:
5216 |[
5217 static void
5218 setup_viewport (unsigned int width,
5219 unsigned int height,
5220 float fovy,
5221 float aspect,
5222 float z_near,
5223 float z_far)
5224 {
5225 float z_camera;
5226 CoglMatrix projection_matrix;
5227 CoglMatrix mv_matrix;
5228 cogl_set_viewport (0, 0, width, height);
5229 cogl_perspective (fovy, aspect, z_near, z_far);
5230 cogl_get_projection_matrix (&amp;amp;projection_matrix);
5231 z_camera = 0.5 * projection_matrix.xx;
5232 cogl_matrix_init_identity (&amp;amp;mv_matrix);
5233 cogl_matrix_translate (&amp;amp;mv_matrix, -0.5f, -0.5f, -z_camera);
5234 cogl_matrix_scale (&amp;amp;mv_matrix, 1.0f / width, -1.0f / height, 1.0f / width);
5235 cogl_matrix_translate (&amp;amp;mv_matrix, 0.0f, -1.0 * height, 0.0f);
5236 cogl_set_modelview_matrix (&amp;amp;mv_matrix);
5237 }
5238 static void
5239 my_init_framebuffer (ClutterStage *stage,
5240 CoglFramebuffer *framebuffer,
5241 unsigned int framebuffer_width,
5242 unsigned int framebuffer_height)
5243 {
5244 ClutterPerspective perspective;
5245 clutter_stage_get_perspective (stage, &amp;perspective);
5246 cogl_push_framebuffer (framebuffer);
5247 setup_viewport (framebuffer_width,
5248 framebuffer_height,
5249 perspective.fovy,
5250 perspective.aspect,
5251 perspective.z_near,
5252 perspective.z_far);
5253 }
5254 ]|
5255 The previous framebuffer can be restored by calling cogl_pop_framebuffer()</doc>
5256       <return-value transfer-ownership="none">
5257         <type name="none" c:type="void"/>
5258       </return-value>
5259       <parameters>
5260         <parameter name="buffer" transfer-ownership="none">
5261           <doc xml:whitespace="preserve">A #CoglFramebuffer object, either onscreen or offscreen.</doc>
5262           <type name="Framebuffer" c:type="CoglFramebuffer*"/>
5263         </parameter>
5264       </parameters>
5265     </function>
5266     <function name="push_matrix" c:identifier="cogl_push_matrix">
5267       <doc xml:whitespace="preserve">Stores the current model-view matrix on the matrix stack. The matrix
5268 can later be restored with cogl_pop_matrix().</doc>
5269       <return-value transfer-ownership="none">
5270         <type name="none" c:type="void"/>
5271       </return-value>
5272     </function>
5273     <function name="read_pixels" c:identifier="cogl_read_pixels">
5274       <doc xml:whitespace="preserve">This reads a rectangle of pixels from the current framebuffer where
5275 position (0, 0) is the top left. The pixel at (x, y) is the first
5276 read, and the data is returned with a rowstride of (width * 4).
5277 Currently Cogl assumes that the framebuffer is in a premultiplied
5278 format so if @format is non-premultiplied it will convert it. To
5279 read the pixel values without any conversion you should either
5280 specify a format that doesn't use an alpha channel or use one of
5281 the formats ending in PRE.</doc>
5282       <return-value transfer-ownership="none">
5283         <type name="none" c:type="void"/>
5284       </return-value>
5285       <parameters>
5286         <parameter name="x" transfer-ownership="none">
5287           <doc xml:whitespace="preserve">The window x position to start reading from</doc>
5288           <type name="int" c:type="int"/>
5289         </parameter>
5290         <parameter name="y" transfer-ownership="none">
5291           <doc xml:whitespace="preserve">The window y position to start reading from</doc>
5292           <type name="int" c:type="int"/>
5293         </parameter>
5294         <parameter name="width" transfer-ownership="none">
5295           <doc xml:whitespace="preserve">The width of the rectangle you want to read</doc>
5296           <type name="int" c:type="int"/>
5297         </parameter>
5298         <parameter name="height" transfer-ownership="none">
5299           <doc xml:whitespace="preserve">The height of the rectangle you want to read</doc>
5300           <type name="int" c:type="int"/>
5301         </parameter>
5302         <parameter name="source" transfer-ownership="none">
5303           <doc xml:whitespace="preserve">Identifies which auxillary buffer you want to read (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)</doc>
5304           <type name="ReadPixelsFlags" c:type="CoglReadPixelsFlags"/>
5305         </parameter>
5306         <parameter name="format" transfer-ownership="none">
5307           <doc xml:whitespace="preserve">The pixel format you want the result in (only COGL_PIXEL_FORMAT_RGBA_8888 supported currently)</doc>
5308           <type name="PixelFormat" c:type="CoglPixelFormat"/>
5309         </parameter>
5310         <parameter name="pixels" transfer-ownership="none">
5311           <doc xml:whitespace="preserve">The location to write the pixel data.</doc>
5312           <array c:type="guint8*">
5313             <type name="uint8"/>
5314           </array>
5315         </parameter>
5316       </parameters>
5317     </function>
5318     <function name="rectangle" c:identifier="cogl_rectangle">
5319       <doc xml:whitespace="preserve">Fills a rectangle at the given coordinates with the current source material</doc>
5320       <return-value transfer-ownership="none">
5321         <type name="none" c:type="void"/>
5322       </return-value>
5323       <parameters>
5324         <parameter name="x_1" transfer-ownership="none">
5325           <doc xml:whitespace="preserve">X coordinate of the top-left corner</doc>
5326           <type name="float" c:type="float"/>
5327         </parameter>
5328         <parameter name="y_1" transfer-ownership="none">
5329           <doc xml:whitespace="preserve">Y coordinate of the top-left corner</doc>
5330           <type name="float" c:type="float"/>
5331         </parameter>
5332         <parameter name="x_2" transfer-ownership="none">
5333           <doc xml:whitespace="preserve">X coordinate of the bottom-right corner</doc>
5334           <type name="float" c:type="float"/>
5335         </parameter>
5336         <parameter name="y_2" transfer-ownership="none">
5337           <doc xml:whitespace="preserve">Y coordinate of the bottom-right corner</doc>
5338           <type name="float" c:type="float"/>
5339         </parameter>
5340       </parameters>
5341     </function>
5342     <function name="rectangle_with_multitexture_coords"
5343               c:identifier="cogl_rectangle_with_multitexture_coords"
5344               version="1.0">
5345       <doc xml:whitespace="preserve">This function draws a rectangle using the current source material to
5346 texture or fill with. As a material may contain multiple texture layers
5347 this interface lets you supply texture coordinates for each layer of the
5348 material.
5349 The first pair of coordinates are for the first layer (with the smallest
5350 layer index) and if you supply less texture coordinates than there are
5351 layers in the current source material then default texture coordinates
5352 (0.0, 0.0, 1.0, 1.0) are generated.</doc>
5353       <return-value transfer-ownership="none">
5354         <type name="none" c:type="void"/>
5355       </return-value>
5356       <parameters>
5357         <parameter name="x1" transfer-ownership="none">
5358           <doc xml:whitespace="preserve">x coordinate upper left on screen.</doc>
5359           <type name="float" c:type="float"/>
5360         </parameter>
5361         <parameter name="y1" transfer-ownership="none">
5362           <doc xml:whitespace="preserve">y coordinate upper left on screen.</doc>
5363           <type name="float" c:type="float"/>
5364         </parameter>
5365         <parameter name="x2" transfer-ownership="none">
5366           <doc xml:whitespace="preserve">x coordinate lower right on screen.</doc>
5367           <type name="float" c:type="float"/>
5368         </parameter>
5369         <parameter name="y2" transfer-ownership="none">
5370           <doc xml:whitespace="preserve">y coordinate lower right on screen.</doc>
5371           <type name="float" c:type="float"/>
5372         </parameter>
5373         <parameter name="tex_coords" transfer-ownership="none">
5374           <doc xml:whitespace="preserve">An array containing groups of 4 float values: [tx1, ty1, tx2, ty2] that are interpreted as two texture coordinates; one for the upper left texel, and one for the lower right texel. Each value should be between 0.0 and 1.0, where the coordinate (0.0, 0.0) represents the top left of the texture, and (1.0, 1.0) the bottom right.</doc>
5375           <array c:type="float*">
5376             <type name="float"/>
5377           </array>
5378         </parameter>
5379         <parameter name="tex_coords_len" transfer-ownership="none">
5380           <doc xml:whitespace="preserve">The length of the tex_coords array. (e.g. for one layer and one group of texture coordinates, this would be 4)</doc>
5381           <type name="int" c:type="int"/>
5382         </parameter>
5383       </parameters>
5384     </function>
5385     <function name="rectangle_with_texture_coords"
5386               c:identifier="cogl_rectangle_with_texture_coords"
5387               version="1.0">
5388       <doc xml:whitespace="preserve">Draw a rectangle using the current material and supply texture coordinates
5389 to be used for the first texture layer of the material. To draw the entire
5390 texture pass in @tx1=0.0 @ty1=0.0 @tx2=1.0 @ty2=1.0.</doc>
5391       <return-value transfer-ownership="none">
5392         <type name="none" c:type="void"/>
5393       </return-value>
5394       <parameters>
5395         <parameter name="x1" transfer-ownership="none">
5396           <doc xml:whitespace="preserve">x coordinate upper left on screen.</doc>
5397           <type name="float" c:type="float"/>
5398         </parameter>
5399         <parameter name="y1" transfer-ownership="none">
5400           <doc xml:whitespace="preserve">y coordinate upper left on screen.</doc>
5401           <type name="float" c:type="float"/>
5402         </parameter>
5403         <parameter name="x2" transfer-ownership="none">
5404           <doc xml:whitespace="preserve">x coordinate lower right on screen.</doc>
5405           <type name="float" c:type="float"/>
5406         </parameter>
5407         <parameter name="y2" transfer-ownership="none">
5408           <doc xml:whitespace="preserve">y coordinate lower right on screen.</doc>
5409           <type name="float" c:type="float"/>
5410         </parameter>
5411         <parameter name="tx1" transfer-ownership="none">
5412           <doc xml:whitespace="preserve">x part of texture coordinate to use for upper left pixel</doc>
5413           <type name="float" c:type="float"/>
5414         </parameter>
5415         <parameter name="ty1" transfer-ownership="none">
5416           <doc xml:whitespace="preserve">y part of texture coordinate to use for upper left pixel</doc>
5417           <type name="float" c:type="float"/>
5418         </parameter>
5419         <parameter name="tx2" transfer-ownership="none">
5420           <doc xml:whitespace="preserve">x part of texture coordinate to use for lower right pixel</doc>
5421           <type name="float" c:type="float"/>
5422         </parameter>
5423         <parameter name="ty2" transfer-ownership="none">
5424           <doc xml:whitespace="preserve">y part of texture coordinate to use for left pixel</doc>
5425           <type name="float" c:type="float"/>
5426         </parameter>
5427       </parameters>
5428     </function>
5429     <function name="rectangles" c:identifier="cogl_rectangles" version="1.0">
5430       <doc xml:whitespace="preserve">Draws a series of rectangles in the same way that
5431 cogl_rectangle() does. In some situations it can give a
5432 significant performance boost to use this function rather than
5433 calling cogl_rectangle() separately for each rectangle.
5434 parameters x1, y1, x2, and y2, and have the same
5435 meaning as in cogl_rectangle().</doc>
5436       <return-value transfer-ownership="none">
5437         <type name="none" c:type="void"/>
5438       </return-value>
5439       <parameters>
5440         <parameter name="verts" transfer-ownership="none">
5441           <doc xml:whitespace="preserve">an array of vertices</doc>
5442           <array c:type="float*">
5443             <type name="float"/>
5444           </array>
5445         </parameter>
5446         <parameter name="n_rects" transfer-ownership="none">
5447           <doc xml:whitespace="preserve">number of rectangles to draw</doc>
5448           <type name="uint" c:type="unsigned int"/>
5449         </parameter>
5450       </parameters>
5451     </function>
5452     <function name="rectangles_with_texture_coords"
5453               c:identifier="cogl_rectangles_with_texture_coords"
5454               version="0.8.6">
5455       <doc xml:whitespace="preserve">Draws a series of rectangles in the same way that
5456 cogl_rectangle_with_texture_coords() does. In some situations it can give a
5457 significant performance boost to use this function rather than
5458 calling cogl_rectangle_with_texture_coords() separately for each rectangle.
5459 parameters x1, y1, x2, y2, tx1, ty1, tx2 and ty2 and have the same
5460 meaning as in cogl_rectangle_with_texture_coords().</doc>
5461       <return-value transfer-ownership="none">
5462         <type name="none" c:type="void"/>
5463       </return-value>
5464       <parameters>
5465         <parameter name="verts" transfer-ownership="none">
5466           <doc xml:whitespace="preserve">an array of vertices</doc>
5467           <array c:type="float*">
5468             <type name="float"/>
5469           </array>
5470         </parameter>
5471         <parameter name="n_rects" transfer-ownership="none">
5472           <doc xml:whitespace="preserve">number of rectangles to draw</doc>
5473           <type name="uint" c:type="unsigned int"/>
5474         </parameter>
5475       </parameters>
5476     </function>
5477     <function name="rotate" c:identifier="cogl_rotate">
5478       <doc xml:whitespace="preserve">Multiplies the current model-view matrix by one that rotates the
5479 model around the vertex specified by @x, @y and @z. The rotation
5480 follows the right-hand thumb rule so for example rotating by 10
5481 degrees about the vertex (0, 0, 1) causes a small counter-clockwise
5482 rotation.</doc>
5483       <return-value transfer-ownership="none">
5484         <type name="none" c:type="void"/>
5485       </return-value>
5486       <parameters>
5487         <parameter name="angle" transfer-ownership="none">
5488           <doc xml:whitespace="preserve">Angle in degrees to rotate.</doc>
5489           <type name="float" c:type="float"/>
5490         </parameter>
5491         <parameter name="x" transfer-ownership="none">
5492           <doc xml:whitespace="preserve">X-component of vertex to rotate around.</doc>
5493           <type name="float" c:type="float"/>
5494         </parameter>
5495         <parameter name="y" transfer-ownership="none">
5496           <doc xml:whitespace="preserve">Y-component of vertex to rotate around.</doc>
5497           <type name="float" c:type="float"/>
5498         </parameter>
5499         <parameter name="z" transfer-ownership="none">
5500           <doc xml:whitespace="preserve">Z-component of vertex to rotate around.</doc>
5501           <type name="float" c:type="float"/>
5502         </parameter>
5503       </parameters>
5504     </function>
5505     <function name="scale" c:identifier="cogl_scale">
5506       <doc xml:whitespace="preserve">Multiplies the current model-view matrix by one that scales the x,
5507 y and z axes by the given values.</doc>
5508       <return-value transfer-ownership="none">
5509         <type name="none" c:type="void"/>
5510       </return-value>
5511       <parameters>
5512         <parameter name="x" transfer-ownership="none">
5513           <doc xml:whitespace="preserve">Amount to scale along the x-axis</doc>
5514           <type name="float" c:type="float"/>
5515         </parameter>
5516         <parameter name="y" transfer-ownership="none">
5517           <doc xml:whitespace="preserve">Amount to scale along the y-axis</doc>
5518           <type name="float" c:type="float"/>
5519         </parameter>
5520         <parameter name="z" transfer-ownership="none">
5521           <doc xml:whitespace="preserve">Amount to scale along the z-axis</doc>
5522           <type name="float" c:type="float"/>
5523         </parameter>
5524       </parameters>
5525     </function>
5526     <function name="set_backface_culling_enabled"
5527               c:identifier="cogl_set_backface_culling_enabled">
5528       <doc xml:whitespace="preserve">Sets whether textures positioned so that their backface is showing
5529 should be hidden. This can be used to efficiently draw two-sided
5530 textures or fully closed cubes without enabling depth testing. This
5531 only affects calls to the cogl_rectangle* family of functions and
5532 cogl_vertex_buffer_draw*. Backface culling is disabled by default.</doc>
5533       <return-value transfer-ownership="none">
5534         <type name="none" c:type="void"/>
5535       </return-value>
5536       <parameters>
5537         <parameter name="setting" transfer-ownership="none">
5538           <doc xml:whitespace="preserve">%TRUE to enable backface culling or %FALSE to disable.</doc>
5539           <type name="boolean" c:type="gboolean"/>
5540         </parameter>
5541       </parameters>
5542     </function>
5543     <function name="set_depth_test_enabled"
5544               c:identifier="cogl_set_depth_test_enabled"
5545               deprecated="Use cogl_material_set_depth_test_enabled()"
5546               deprecated-version="1.4">
5547       <doc xml:whitespace="preserve">Sets whether depth testing is enabled. If it is disabled then the
5548 order that actors are layered on the screen depends solely on the
5549 order specified using clutter_actor_raise() and
5550 clutter_actor_lower(), otherwise it will also take into account the
5551 actor's depth. Depth testing is disabled by default.
5552 instead.</doc>
5553       <return-value transfer-ownership="none">
5554         <type name="none" c:type="void"/>
5555       </return-value>
5556       <parameters>
5557         <parameter name="setting" transfer-ownership="none">
5558           <doc xml:whitespace="preserve">%TRUE to enable depth testing or %FALSE to disable.</doc>
5559           <type name="boolean" c:type="gboolean"/>
5560         </parameter>
5561       </parameters>
5562     </function>
5563     <function name="set_draw_buffer"
5564               c:identifier="cogl_set_draw_buffer"
5565               deprecated="The target argument was redundant since we could look at"
5566               deprecated-version="1.2">
5567       <doc xml:whitespace="preserve">Redirects all subsequent drawing to the specified framebuffer. This
5568 can either be an offscreen buffer created with
5569 cogl_offscreen_new_to_texture () or you can revert to your original
5570 on screen window buffer.
5571 the type of CoglHandle given instead.</doc>
5572       <return-value transfer-ownership="none">
5573         <type name="none" c:type="void"/>
5574       </return-value>
5575       <parameters>
5576         <parameter name="target" transfer-ownership="none">
5577           <doc xml:whitespace="preserve">A #CoglBufferTarget that specifies what kind of framebuffer you are setting as the render target.</doc>
5578           <type name="BufferTarget" c:type="CoglBufferTarget"/>
5579         </parameter>
5580         <parameter name="offscreen" transfer-ownership="none">
5581           <doc xml:whitespace="preserve">If you are setting a framebuffer of type COGL_OFFSCREEN_BUFFER then this is a CoglHandle for the offscreen buffer.</doc>
5582           <type name="Handle" c:type="CoglHandle"/>
5583         </parameter>
5584       </parameters>
5585     </function>
5586     <function name="set_fog" c:identifier="cogl_set_fog">
5587       <doc xml:whitespace="preserve">Enables fogging. Fogging causes vertices that are further away from the eye
5588 to be rendered with a different color. The color is determined according to
5589 the chosen fog mode; at it's simplest the color is linearly interpolated so
5590 that vertices at @z_near are drawn fully with their original color and
5591 vertices at @z_far are drawn fully with @fog_color. Fogging will remain
5592 enabled until you call cogl_disable_fog().
5593 &lt;note&gt;The fogging functions only work correctly when primitives use
5594 unmultiplied alpha colors. By default Cogl will premultiply textures
5595 and cogl_set_source_color() will premultiply colors, so unless you
5596 explicitly load your textures requesting an unmultiplied internal format
5597 and use cogl_material_set_color() you can only use fogging with fully
5598 opaque primitives. This might improve in the future when we can depend
5599 on fragment shaders.&lt;/note&gt;</doc>
5600       <return-value transfer-ownership="none">
5601         <type name="none" c:type="void"/>
5602       </return-value>
5603       <parameters>
5604         <parameter name="fog_color" transfer-ownership="none">
5605           <doc xml:whitespace="preserve">The color of the fog</doc>
5606           <type name="Color" c:type="CoglColor*"/>
5607         </parameter>
5608         <parameter name="mode" transfer-ownership="none">
5609           <doc xml:whitespace="preserve">A #CoglFogMode that determines the equation used to calculate the fogging blend factor.</doc>
5610           <type name="FogMode" c:type="CoglFogMode"/>
5611         </parameter>
5612         <parameter name="density" transfer-ownership="none">
5613           <doc xml:whitespace="preserve">Used by %COGL_FOG_MODE_EXPONENTIAL and by %COGL_FOG_MODE_EXPONENTIAL_SQUARED equations.</doc>
5614           <type name="float" c:type="float"/>
5615         </parameter>
5616         <parameter name="z_near" transfer-ownership="none">
5617           <doc xml:whitespace="preserve">Position along Z axis where no fogging should be applied</doc>
5618           <type name="float" c:type="float"/>
5619         </parameter>
5620         <parameter name="z_far" transfer-ownership="none">
5621           <doc xml:whitespace="preserve">Position along Z axis where full fogging should be applied</doc>
5622           <type name="float" c:type="float"/>
5623         </parameter>
5624       </parameters>
5625     </function>
5626     <function name="set_framebuffer"
5627               c:identifier="cogl_set_framebuffer"
5628               version="1.2">
5629       <doc xml:whitespace="preserve">This redirects all subsequent drawing to the specified framebuffer. This can
5630 either be an offscreen buffer created with cogl_offscreen_new_to_texture ()
5631 or in the future it may be an onscreen framebuffers too.</doc>
5632       <return-value transfer-ownership="none">
5633         <type name="none" c:type="void"/>
5634       </return-value>
5635       <parameters>
5636         <parameter name="buffer" transfer-ownership="none">
5637           <doc xml:whitespace="preserve">A #CoglFramebuffer object, either onscreen or offscreen.</doc>
5638           <type name="Framebuffer" c:type="CoglFramebuffer*"/>
5639         </parameter>
5640       </parameters>
5641     </function>
5642     <function name="set_modelview_matrix"
5643               c:identifier="cogl_set_modelview_matrix">
5644       <doc xml:whitespace="preserve">Loads @matrix as the new model-view matrix.</doc>
5645       <return-value transfer-ownership="none">
5646         <type name="none" c:type="void"/>
5647       </return-value>
5648       <parameters>
5649         <parameter name="matrix" transfer-ownership="none">
5650           <doc xml:whitespace="preserve">the new model-view matrix</doc>
5651           <type name="Matrix" c:type="CoglMatrix*"/>
5652         </parameter>
5653       </parameters>
5654     </function>
5655     <function name="set_path" c:identifier="cogl_set_path" version="1.4">
5656       <doc xml:whitespace="preserve">Replaces the current path with @path. A reference is taken on the
5657 object so if you no longer need the path you should unref with
5658 cogl_object_unref().</doc>
5659       <return-value transfer-ownership="none">
5660         <type name="none" c:type="void"/>
5661       </return-value>
5662       <parameters>
5663         <parameter name="path" transfer-ownership="none">
5664           <doc xml:whitespace="preserve">A #CoglPath object</doc>
5665           <type name="Path" c:type="CoglPath*"/>
5666         </parameter>
5667       </parameters>
5668     </function>
5669     <function name="set_projection_matrix"
5670               c:identifier="cogl_set_projection_matrix">
5671       <doc xml:whitespace="preserve">Loads matrix as the new projection matrix.</doc>
5672       <return-value transfer-ownership="none">
5673         <type name="none" c:type="void"/>
5674       </return-value>
5675       <parameters>
5676         <parameter name="matrix" transfer-ownership="none">
5677           <doc xml:whitespace="preserve">the new projection matrix</doc>
5678           <type name="Matrix" c:type="CoglMatrix*"/>
5679         </parameter>
5680       </parameters>
5681     </function>
5682     <function name="set_source" c:identifier="cogl_set_source" version="1.0">
5683       <doc xml:whitespace="preserve">This function sets the source material that will be used to fill subsequent
5684 geometry emitted via the cogl API.
5685 &lt;note&gt;In the future we may add the ability to set a front facing material,
5686 and a back facing material, in which case this function will set both to the
5687 same.&lt;/note&gt;</doc>
5688       <return-value transfer-ownership="none">
5689         <type name="none" c:type="void"/>
5690       </return-value>
5691       <parameters>
5692         <parameter name="material" transfer-ownership="none">
5693           <doc xml:whitespace="preserve">A #CoglHandle for a material</doc>
5694           <type name="Handle" c:type="CoglHandle"/>
5695         </parameter>
5696       </parameters>
5697     </function>
5698     <function name="set_source_color"
5699               c:identifier="cogl_set_source_color"
5700               version="1.0">
5701       <doc xml:whitespace="preserve">This is a convenience function for creating a solid fill source material
5702 from the given color. This color will be used for any subsequent drawing
5703 operation.
5704 The color will be premultiplied by Cogl, so the color should be
5705 semi-transparent red.
5706 See also cogl_set_source_color4ub() and cogl_set_source_color4f()
5707 if you already have the color components.</doc>
5708       <return-value transfer-ownership="none">
5709         <type name="none" c:type="void"/>
5710       </return-value>
5711       <parameters>
5712         <parameter name="color" transfer-ownership="none">
5713           <doc xml:whitespace="preserve">a #CoglColor</doc>
5714           <type name="Color" c:type="CoglColor*"/>
5715         </parameter>
5716       </parameters>
5717     </function>
5718     <function name="set_source_color4f"
5719               c:identifier="cogl_set_source_color4f"
5720               version="1.0">
5721       <doc xml:whitespace="preserve">This is a convenience function for creating a solid fill source material
5722 from the given color using normalized values for each component. This color
5723 will be used for any subsequent drawing operation.
5724 The value for each component is a fixed point number in the range
5725 between 0 and %1.0. If the values passed in are outside that
5726 range, they will be clamped.</doc>
5727       <return-value transfer-ownership="none">
5728         <type name="none" c:type="void"/>
5729       </return-value>
5730       <parameters>
5731         <parameter name="red" transfer-ownership="none">
5732           <doc xml:whitespace="preserve">value of the red channel, between 0 and %1.0</doc>
5733           <type name="float" c:type="float"/>
5734         </parameter>
5735         <parameter name="green" transfer-ownership="none">
5736           <doc xml:whitespace="preserve">value of the green channel, between 0 and %1.0</doc>
5737           <type name="float" c:type="float"/>
5738         </parameter>
5739         <parameter name="blue" transfer-ownership="none">
5740           <doc xml:whitespace="preserve">value of the blue channel, between 0 and %1.0</doc>
5741           <type name="float" c:type="float"/>
5742         </parameter>
5743         <parameter name="alpha" transfer-ownership="none">
5744           <doc xml:whitespace="preserve">value of the alpha channel, between 0 and %1.0</doc>
5745           <type name="float" c:type="float"/>
5746         </parameter>
5747       </parameters>
5748     </function>
5749     <function name="set_source_color4ub"
5750               c:identifier="cogl_set_source_color4ub"
5751               version="1.0">
5752       <doc xml:whitespace="preserve">This is a convenience function for creating a solid fill source material
5753 from the given color using unsigned bytes for each component. This
5754 color will be used for any subsequent drawing operation.
5755 The value for each component is an unsigned byte in the range
5756 between 0 and 255.</doc>
5757       <return-value transfer-ownership="none">
5758         <type name="none" c:type="void"/>
5759       </return-value>
5760       <parameters>
5761         <parameter name="red" transfer-ownership="none">
5762           <doc xml:whitespace="preserve">value of the red channel, between 0 and 255</doc>
5763           <type name="uint8" c:type="guint8"/>
5764         </parameter>
5765         <parameter name="green" transfer-ownership="none">
5766           <doc xml:whitespace="preserve">value of the green channel, between 0 and 255</doc>
5767           <type name="uint8" c:type="guint8"/>
5768         </parameter>
5769         <parameter name="blue" transfer-ownership="none">
5770           <doc xml:whitespace="preserve">value of the blue channel, between 0 and 255</doc>
5771           <type name="uint8" c:type="guint8"/>
5772         </parameter>
5773         <parameter name="alpha" transfer-ownership="none">
5774           <doc xml:whitespace="preserve">value of the alpha channel, between 0 and 255</doc>
5775           <type name="uint8" c:type="guint8"/>
5776         </parameter>
5777       </parameters>
5778     </function>
5779     <function name="set_source_texture"
5780               c:identifier="cogl_set_source_texture"
5781               version="1.0">
5782       <doc xml:whitespace="preserve">This is a convenience function for creating a material with the first
5783 layer set to #texture_handle and setting that material as the source with
5784 cogl_set_source.
5785 and cogl_set_source_texture. If you need to blend a texture with a color then
5786 you can create a simple material like this:
5787 &lt;programlisting&gt;
5788 material = cogl_material_new ();
5789 cogl_material_set_color4ub (material, 0xff, 0x00, 0x00, 0x80);
5790 cogl_material_set_layer (material, 0, tex_handle);
5791 cogl_set_source (material);
5792 &lt;/programlisting&gt;</doc>
5793       <return-value transfer-ownership="none">
5794         <type name="none" c:type="void"/>
5795       </return-value>
5796       <parameters>
5797         <parameter name="texture_handle" transfer-ownership="none">
5798           <doc xml:whitespace="preserve">The Cogl texture you want as your source</doc>
5799           <type name="Handle" c:type="CoglHandle"/>
5800         </parameter>
5801       </parameters>
5802     </function>
5803     <function name="set_viewport"
5804               c:identifier="cogl_set_viewport"
5805               version="1.2">
5806       <doc xml:whitespace="preserve">Replaces the current viewport with the given values.</doc>
5807       <return-value transfer-ownership="none">
5808         <type name="none" c:type="void"/>
5809       </return-value>
5810       <parameters>
5811         <parameter name="x" transfer-ownership="none">
5812           <doc xml:whitespace="preserve">X offset of the viewport</doc>
5813           <type name="int" c:type="int"/>
5814         </parameter>
5815         <parameter name="y" transfer-ownership="none">
5816           <doc xml:whitespace="preserve">Y offset of the viewport</doc>
5817           <type name="int" c:type="int"/>
5818         </parameter>
5819         <parameter name="width" transfer-ownership="none">
5820           <doc xml:whitespace="preserve">Width of the viewport</doc>
5821           <type name="int" c:type="int"/>
5822         </parameter>
5823         <parameter name="height" transfer-ownership="none">
5824           <doc xml:whitespace="preserve">Height of the viewport</doc>
5825           <type name="int" c:type="int"/>
5826         </parameter>
5827       </parameters>
5828     </function>
5829     <function name="shader_compile" c:identifier="cogl_shader_compile">
5830       <doc xml:whitespace="preserve">Compiles the shader, no return value, but the shader is now ready for
5831 linking into a program.</doc>
5832       <return-value transfer-ownership="none">
5833         <type name="none" c:type="void"/>
5834       </return-value>
5835       <parameters>
5836         <parameter name="handle" transfer-ownership="none">
5837           <doc xml:whitespace="preserve">#CoglHandle for a shader.</doc>
5838           <type name="Handle" c:type="CoglHandle"/>
5839         </parameter>
5840       </parameters>
5841     </function>
5842     <function name="shader_get_info_log"
5843               c:identifier="cogl_shader_get_info_log">
5844       <doc xml:whitespace="preserve">Retrieves the information log for a coglobject, can be used in conjunction
5845 with cogl_shader_get_parameteriv() to retrieve the compiler warnings/error
5846 messages that caused a shader to not compile correctly, mainly useful for
5847 debugging purposes.
5848 g_free() to free it</doc>
5849       <return-value transfer-ownership="full">
5850         <doc xml:whitespace="preserve">a newly allocated string containing the info log. Use</doc>
5851         <type name="utf8" c:type="char*"/>
5852       </return-value>
5853       <parameters>
5854         <parameter name="handle" transfer-ownership="none">
5855           <doc xml:whitespace="preserve">#CoglHandle for a shader.</doc>
5856           <type name="Handle" c:type="CoglHandle"/>
5857         </parameter>
5858       </parameters>
5859     </function>
5860     <function name="shader_get_type" c:identifier="cogl_shader_get_type">
5861       <doc xml:whitespace="preserve">Retrieves the type of a shader #CoglHandle
5862 or %COGL_SHADER_TYPE_FRAGMENT if the shader is a frament processor</doc>
5863       <return-value transfer-ownership="full">
5864         <doc xml:whitespace="preserve">%COGL_SHADER_TYPE_VERTEX if the shader is a vertex processor</doc>
5865         <type name="ShaderType" c:type="CoglShaderType"/>
5866       </return-value>
5867       <parameters>
5868         <parameter name="handle" transfer-ownership="none">
5869           <doc xml:whitespace="preserve">#CoglHandle for a shader.</doc>
5870           <type name="Handle" c:type="CoglHandle"/>
5871         </parameter>
5872       </parameters>
5873     </function>
5874     <function name="shader_is_compiled" c:identifier="cogl_shader_is_compiled">
5875       <doc xml:whitespace="preserve">Retrieves whether a shader #CoglHandle has been compiled</doc>
5876       <return-value transfer-ownership="none">
5877         <doc xml:whitespace="preserve">%TRUE if the shader object has sucessfully be compiled</doc>
5878         <type name="boolean" c:type="gboolean"/>
5879       </return-value>
5880       <parameters>
5881         <parameter name="handle" transfer-ownership="none">
5882           <doc xml:whitespace="preserve">#CoglHandle for a shader.</doc>
5883           <type name="Handle" c:type="CoglHandle"/>
5884         </parameter>
5885       </parameters>
5886     </function>
5887     <function name="shader_ref" c:identifier="cogl_shader_ref">
5888       <doc xml:whitespace="preserve">Add an extra reference to a shader.</doc>
5889       <return-value transfer-ownership="full">
5890         <doc xml:whitespace="preserve">@handle</doc>
5891         <type name="Handle" c:type="CoglHandle"/>
5892       </return-value>
5893       <parameters>
5894         <parameter name="handle" transfer-ownership="none">
5895           <doc xml:whitespace="preserve">A #CoglHandle to a shader.</doc>
5896           <type name="Handle" c:type="CoglHandle"/>
5897         </parameter>
5898       </parameters>
5899     </function>
5900     <function name="shader_source" c:identifier="cogl_shader_source">
5901       <doc xml:whitespace="preserve">Replaces the current GLSL source associated with a shader with a new
5902 one.</doc>
5903       <return-value transfer-ownership="none">
5904         <type name="none" c:type="void"/>
5905       </return-value>
5906       <parameters>
5907         <parameter name="shader" transfer-ownership="none">
5908           <doc xml:whitespace="preserve">#CoglHandle for a shader.</doc>
5909           <type name="Handle" c:type="CoglHandle"/>
5910         </parameter>
5911         <parameter name="source" transfer-ownership="none">
5912           <doc xml:whitespace="preserve">GLSL shader source.</doc>
5913           <type name="utf8" c:type="char*"/>
5914         </parameter>
5915       </parameters>
5916     </function>
5917     <function name="shader_unref" c:identifier="cogl_shader_unref">
5918       <doc xml:whitespace="preserve">Removes a reference to a shader. If it was the last reference the
5919 shader object will be destroyed.</doc>
5920       <return-value transfer-ownership="none">
5921         <type name="none" c:type="void"/>
5922       </return-value>
5923       <parameters>
5924         <parameter name="handle" transfer-ownership="none">
5925           <doc xml:whitespace="preserve">A #CoglHandle to a shader.</doc>
5926           <type name="Handle" c:type="CoglHandle"/>
5927         </parameter>
5928       </parameters>
5929     </function>
5930     <function name="sqrti" c:identifier="cogl_sqrti" version="1.0">
5931       <doc xml:whitespace="preserve">Very fast fixed point implementation of square root for integers.
5932 This function is at least 6x faster than clib sqrt() on x86, and (this is
5933 not a typo!) about 500x faster on ARM without FPU. It's error is less than
5934 5% for arguments smaller than %COGL_SQRTI_ARG_5_PERCENT and less than 10%
5935 for narguments smaller than %COGL_SQRTI_ARG_10_PERCENT. The maximum
5936 argument that can be passed to this function is %COGL_SQRTI_ARG_MAX.</doc>
5937       <return-value transfer-ownership="none">
5938         <doc xml:whitespace="preserve">integer square root.</doc>
5939         <type name="int" c:type="int"/>
5940       </return-value>
5941       <parameters>
5942         <parameter name="x" transfer-ownership="none">
5943           <doc xml:whitespace="preserve">integer value</doc>
5944           <type name="int" c:type="int"/>
5945         </parameter>
5946       </parameters>
5947     </function>
5948     <function name="texture_3d_new_from_data_EXP"
5949               c:identifier="cogl_texture_3d_new_from_data_EXP"
5950               throws="1">
5951       <return-value transfer-ownership="full">
5952         <type name="Handle" c:type="CoglHandle"/>
5953       </return-value>
5954       <parameters>
5955         <parameter name="width" transfer-ownership="none">
5956           <type name="uint" c:type="unsigned int"/>
5957         </parameter>
5958         <parameter name="height" transfer-ownership="none">
5959           <type name="uint" c:type="unsigned int"/>
5960         </parameter>
5961         <parameter name="depth" transfer-ownership="none">
5962           <type name="uint" c:type="unsigned int"/>
5963         </parameter>
5964         <parameter name="flags" transfer-ownership="none">
5965           <type name="TextureFlags" c:type="CoglTextureFlags"/>
5966         </parameter>
5967         <parameter name="format" transfer-ownership="none">
5968           <type name="PixelFormat" c:type="CoglPixelFormat"/>
5969         </parameter>
5970         <parameter name="internal_format" transfer-ownership="none">
5971           <type name="PixelFormat" c:type="CoglPixelFormat"/>
5972         </parameter>
5973         <parameter name="rowstride" transfer-ownership="none">
5974           <type name="uint" c:type="unsigned int"/>
5975         </parameter>
5976         <parameter name="image_stride" transfer-ownership="none">
5977           <type name="uint" c:type="unsigned int"/>
5978         </parameter>
5979         <parameter name="data" transfer-ownership="none">
5980           <array c:type="guint8*">
5981             <type name="uint8"/>
5982           </array>
5983         </parameter>
5984       </parameters>
5985     </function>
5986     <function name="texture_3d_new_with_size_EXP"
5987               c:identifier="cogl_texture_3d_new_with_size_EXP"
5988               throws="1">
5989       <return-value transfer-ownership="full">
5990         <type name="Handle" c:type="CoglHandle"/>
5991       </return-value>
5992       <parameters>
5993         <parameter name="width" transfer-ownership="none">
5994           <type name="uint" c:type="unsigned int"/>
5995         </parameter>
5996         <parameter name="height" transfer-ownership="none">
5997           <type name="uint" c:type="unsigned int"/>
5998         </parameter>
5999         <parameter name="depth" transfer-ownership="none">
6000           <type name="uint" c:type="unsigned int"/>
6001         </parameter>
6002         <parameter name="flags" transfer-ownership="none">
6003           <type name="TextureFlags" c:type="CoglTextureFlags"/>
6004         </parameter>
6005         <parameter name="internal_format" transfer-ownership="none">
6006           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6007         </parameter>
6008       </parameters>
6009     </function>
6010     <function name="texture_get_data" c:identifier="cogl_texture_get_data">
6011       <doc xml:whitespace="preserve">Copies the pixel data from a cogl texture to system memory.
6012 is not valid</doc>
6013       <return-value transfer-ownership="none">
6014         <doc xml:whitespace="preserve">the size of the texture data in bytes, or 0 if the texture</doc>
6015         <type name="int" c:type="int"/>
6016       </return-value>
6017       <parameters>
6018         <parameter name="handle" transfer-ownership="none">
6019           <doc xml:whitespace="preserve">a #CoglHandle for a texture.</doc>
6020           <type name="Handle" c:type="CoglHandle"/>
6021         </parameter>
6022         <parameter name="format" transfer-ownership="none">
6023           <doc xml:whitespace="preserve">the #CoglPixelFormat to store the texture as.</doc>
6024           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6025         </parameter>
6026         <parameter name="rowstride" transfer-ownership="none">
6027           <doc xml:whitespace="preserve">the rowstride of @data or retrieved from texture if none is specified.</doc>
6028           <type name="uint" c:type="unsigned int"/>
6029         </parameter>
6030         <parameter name="data" transfer-ownership="none">
6031           <doc xml:whitespace="preserve">memory location to write contents of buffer, or %NULL if we're only querying the data size through the return value.</doc>
6032           <array c:type="guint8*">
6033             <type name="uint8"/>
6034           </array>
6035         </parameter>
6036       </parameters>
6037     </function>
6038     <function name="texture_get_format" c:identifier="cogl_texture_get_format">
6039       <doc xml:whitespace="preserve">Queries the #CoglPixelFormat of a cogl texture.</doc>
6040       <return-value transfer-ownership="full">
6041         <doc xml:whitespace="preserve">the #CoglPixelFormat of the GPU side texture</doc>
6042         <type name="PixelFormat" c:type="CoglPixelFormat"/>
6043       </return-value>
6044       <parameters>
6045         <parameter name="handle" transfer-ownership="none">
6046           <doc xml:whitespace="preserve">a #CoglHandle for a texture.</doc>
6047           <type name="Handle" c:type="CoglHandle"/>
6048         </parameter>
6049       </parameters>
6050     </function>
6051     <function name="texture_get_gl_texture"
6052               c:identifier="cogl_texture_get_gl_texture">
6053       <doc xml:whitespace="preserve">Queries the GL handles for a GPU side texture through its #CoglHandle.
6054 If the texture is spliced the data for the first sub texture will be
6055 queried.
6056 if the handle was invalid</doc>
6057       <return-value transfer-ownership="none">
6058         <doc xml:whitespace="preserve">%TRUE if the handle was successfully retrieved, %FALSE</doc>
6059         <type name="boolean" c:type="gboolean"/>
6060       </return-value>
6061       <parameters>
6062         <parameter name="handle" transfer-ownership="none">
6063           <doc xml:whitespace="preserve">a #CoglHandle for a texture.</doc>
6064           <type name="Handle" c:type="CoglHandle"/>
6065         </parameter>
6066         <parameter name="out_gl_handle"
6067                    direction="out"
6068                    caller-allocates="1"
6069                    transfer-ownership="none"
6070                    allow-none="1">
6071           <doc xml:whitespace="preserve">pointer to return location for the textures GL handle, or %NULL.</doc>
6072           <type name="GL.uint" c:type="GLuint*"/>
6073         </parameter>
6074         <parameter name="out_gl_target"
6075                    direction="out"
6076                    caller-allocates="1"
6077                    transfer-ownership="none"
6078                    allow-none="1">
6079           <doc xml:whitespace="preserve">pointer to return location for the GL target type, or %NULL.</doc>
6080           <type name="GL.enum" c:type="GLenum*"/>
6081         </parameter>
6082       </parameters>
6083     </function>
6084     <function name="texture_get_height" c:identifier="cogl_texture_get_height">
6085       <doc xml:whitespace="preserve">Queries the height of a cogl texture.</doc>
6086       <return-value transfer-ownership="none">
6087         <doc xml:whitespace="preserve">the height of the GPU side texture in pixels</doc>
6088         <type name="uint" c:type="unsigned int"/>
6089       </return-value>
6090       <parameters>
6091         <parameter name="handle" transfer-ownership="none">
6092           <doc xml:whitespace="preserve">a #CoglHandle for a texture.</doc>
6093           <type name="Handle" c:type="CoglHandle"/>
6094         </parameter>
6095       </parameters>
6096     </function>
6097     <function name="texture_get_max_waste"
6098               c:identifier="cogl_texture_get_max_waste">
6099       <doc xml:whitespace="preserve">Queries the maximum wasted (unused) pixels in one dimension of a GPU side
6100 texture.</doc>
6101       <return-value transfer-ownership="none">
6102         <doc xml:whitespace="preserve">the maximum waste</doc>
6103         <type name="int" c:type="int"/>
6104       </return-value>
6105       <parameters>
6106         <parameter name="handle" transfer-ownership="none">
6107           <doc xml:whitespace="preserve">a #CoglHandle for a texture.</doc>
6108           <type name="Handle" c:type="CoglHandle"/>
6109         </parameter>
6110       </parameters>
6111     </function>
6112     <function name="texture_get_rowstride"
6113               c:identifier="cogl_texture_get_rowstride">
6114       <doc xml:whitespace="preserve">Queries the rowstride of a cogl texture.</doc>
6115       <return-value transfer-ownership="none">
6116         <doc xml:whitespace="preserve">the offset in bytes between each consequetive row of pixels</doc>
6117         <type name="uint" c:type="unsigned int"/>
6118       </return-value>
6119       <parameters>
6120         <parameter name="handle" transfer-ownership="none">
6121           <doc xml:whitespace="preserve">a #CoglHandle for a texture.</doc>
6122           <type name="Handle" c:type="CoglHandle"/>
6123         </parameter>
6124       </parameters>
6125     </function>
6126     <function name="texture_get_width" c:identifier="cogl_texture_get_width">
6127       <doc xml:whitespace="preserve">Queries the width of a cogl texture.</doc>
6128       <return-value transfer-ownership="none">
6129         <doc xml:whitespace="preserve">the width of the GPU side texture in pixels</doc>
6130         <type name="uint" c:type="unsigned int"/>
6131       </return-value>
6132       <parameters>
6133         <parameter name="handle" transfer-ownership="none">
6134           <doc xml:whitespace="preserve">a #CoglHandle for a texture.</doc>
6135           <type name="Handle" c:type="CoglHandle"/>
6136         </parameter>
6137       </parameters>
6138     </function>
6139     <function name="texture_is_sliced" c:identifier="cogl_texture_is_sliced">
6140       <doc xml:whitespace="preserve">Queries if a texture is sliced (stored as multiple GPU side tecture
6141 objects).
6142 is stored as a single GPU texture</doc>
6143       <return-value transfer-ownership="none">
6144         <doc xml:whitespace="preserve">%TRUE if the texture is sliced, %FALSE if the texture</doc>
6145         <type name="boolean" c:type="gboolean"/>
6146       </return-value>
6147       <parameters>
6148         <parameter name="handle" transfer-ownership="none">
6149           <doc xml:whitespace="preserve">a #CoglHandle for a texture.</doc>
6150           <type name="Handle" c:type="CoglHandle"/>
6151         </parameter>
6152       </parameters>
6153     </function>
6154     <function name="texture_new_from_bitmap"
6155               c:identifier="cogl_texture_new_from_bitmap"
6156               version="1.0">
6157       <doc xml:whitespace="preserve">Creates a COGL texture from a CoglBitmap.
6158 %COGL_INVALID_HANDLE on failure</doc>
6159       <return-value transfer-ownership="full">
6160         <doc xml:whitespace="preserve">a #CoglHandle to the newly created texture or</doc>
6161         <type name="Handle" c:type="CoglHandle"/>
6162       </return-value>
6163       <parameters>
6164         <parameter name="bmp_handle" transfer-ownership="none">
6165           <doc xml:whitespace="preserve">A CoglBitmap handle</doc>
6166           <type name="Handle" c:type="CoglHandle"/>
6167         </parameter>
6168         <parameter name="flags" transfer-ownership="none">
6169           <doc xml:whitespace="preserve">Optional flags for the texture, or %COGL_TEXTURE_NONE</doc>
6170           <type name="TextureFlags" c:type="CoglTextureFlags"/>
6171         </parameter>
6172         <parameter name="internal_format" transfer-ownership="none">
6173           <doc xml:whitespace="preserve">the #CoglPixelFormat to use for the GPU storage of the texture</doc>
6174           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6175         </parameter>
6176       </parameters>
6177     </function>
6178     <function name="texture_new_from_buffer"
6179               c:identifier="cogl_texture_new_from_buffer"
6180               version="1.2">
6181       <doc xml:whitespace="preserve">Creates a new texture using the buffer specified by @handle. If the buffer
6182 has been created using cogl_pixel_buffer_new_for_size() it's possible to omit
6183 the height and width values already specified at creation time.
6184 failure</doc>
6185       <return-value transfer-ownership="full">
6186         <doc xml:whitespace="preserve">a #CoglHandle to the new texture or %COGL_INVALID_HANDLE on</doc>
6187         <type name="Handle" c:type="CoglHandle"/>
6188       </return-value>
6189       <parameters>
6190         <parameter name="buffer" transfer-ownership="none">
6191           <doc xml:whitespace="preserve">the #CoglHandle of a pixel buffer</doc>
6192           <type name="Handle" c:type="CoglHandle"/>
6193         </parameter>
6194         <parameter name="width" transfer-ownership="none">
6195           <doc xml:whitespace="preserve">width of texture in pixels or 0</doc>
6196           <type name="uint" c:type="unsigned int"/>
6197         </parameter>
6198         <parameter name="height" transfer-ownership="none">
6199           <doc xml:whitespace="preserve">height of texture in pixels or 0</doc>
6200           <type name="uint" c:type="unsigned int"/>
6201         </parameter>
6202         <parameter name="flags" transfer-ownership="none">
6203           <doc xml:whitespace="preserve">optional flags for the texture, or %COGL_TEXTURE_NONE</doc>
6204           <type name="TextureFlags" c:type="CoglTextureFlags"/>
6205         </parameter>
6206         <parameter name="format" transfer-ownership="none">
6207           <doc xml:whitespace="preserve">the #CoglPixelFormat the buffer is stored in in RAM</doc>
6208           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6209         </parameter>
6210         <parameter name="internal_format" transfer-ownership="none">
6211           <doc xml:whitespace="preserve">the #CoglPixelFormat that will be used for storing the buffer on the GPU. If %COGL_PIXEL_FORMAT_ANY is given then a premultiplied format similar to the format of the source data will be used. The default blending equations of Cogl expect premultiplied color data; the main use of passing a non-premultiplied format here is if you have non-premultiplied source data and are going to adjust the blend mode (see cogl_material_set_blend()) or use the data for something other than straight blending</doc>
6212           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6213         </parameter>
6214         <parameter name="rowstride" transfer-ownership="none">
6215           <doc xml:whitespace="preserve">the memory offset in bytes between the starts of scanlines in @data. If 0 is given the row stride will be deduced from</doc>
6216           <type name="uint" c:type="unsigned int"/>
6217         </parameter>
6218         <parameter name="offset" transfer-ownership="none">
6219           <doc xml:whitespace="preserve">offset in bytes in @buffer from where the texture data starts</doc>
6220           <type name="uint" c:type="unsigned int"/>
6221         </parameter>
6222       </parameters>
6223     </function>
6224     <function name="texture_new_from_buffer_EXP"
6225               c:identifier="cogl_texture_new_from_buffer_EXP">
6226       <return-value transfer-ownership="full">
6227         <type name="Handle" c:type="CoglHandle"/>
6228       </return-value>
6229       <parameters>
6230         <parameter name="buffer" transfer-ownership="none">
6231           <type name="Handle" c:type="CoglHandle"/>
6232         </parameter>
6233         <parameter name="width" transfer-ownership="none">
6234           <type name="uint" c:type="unsigned int"/>
6235         </parameter>
6236         <parameter name="height" transfer-ownership="none">
6237           <type name="uint" c:type="unsigned int"/>
6238         </parameter>
6239         <parameter name="flags" transfer-ownership="none">
6240           <type name="TextureFlags" c:type="CoglTextureFlags"/>
6241         </parameter>
6242         <parameter name="format" transfer-ownership="none">
6243           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6244         </parameter>
6245         <parameter name="internal_format" transfer-ownership="none">
6246           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6247         </parameter>
6248         <parameter name="rowstride" transfer-ownership="none">
6249           <type name="uint" c:type="unsigned int"/>
6250         </parameter>
6251         <parameter name="offset" transfer-ownership="none">
6252           <type name="uint" c:type="unsigned int"/>
6253         </parameter>
6254       </parameters>
6255     </function>
6256     <function name="texture_new_from_data"
6257               c:identifier="cogl_texture_new_from_data"
6258               version="0.8">
6259       <doc xml:whitespace="preserve">Creates a new COGL texture based on data residing in memory.
6260 %COGL_INVALID_HANDLE on failure</doc>
6261       <return-value transfer-ownership="full">
6262         <doc xml:whitespace="preserve">a #CoglHandle to the newly created texture or</doc>
6263         <type name="Handle" c:type="CoglHandle"/>
6264       </return-value>
6265       <parameters>
6266         <parameter name="width" transfer-ownership="none">
6267           <doc xml:whitespace="preserve">width of texture in pixels</doc>
6268           <type name="uint" c:type="unsigned int"/>
6269         </parameter>
6270         <parameter name="height" transfer-ownership="none">
6271           <doc xml:whitespace="preserve">height of texture in pixels</doc>
6272           <type name="uint" c:type="unsigned int"/>
6273         </parameter>
6274         <parameter name="flags" transfer-ownership="none">
6275           <doc xml:whitespace="preserve">Optional flags for the texture, or %COGL_TEXTURE_NONE</doc>
6276           <type name="TextureFlags" c:type="CoglTextureFlags"/>
6277         </parameter>
6278         <parameter name="format" transfer-ownership="none">
6279           <doc xml:whitespace="preserve">the #CoglPixelFormat the buffer is stored in in RAM</doc>
6280           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6281         </parameter>
6282         <parameter name="internal_format" transfer-ownership="none">
6283           <doc xml:whitespace="preserve">the #CoglPixelFormat that will be used for storing the buffer on the GPU. If COGL_PIXEL_FORMAT_ANY is given then a premultiplied format similar to the format of the source data will be used. The default blending equations of Cogl expect premultiplied color data; the main use of passing a non-premultiplied format here is if you have non-premultiplied source data and are going to adjust the blend mode (see cogl_material_set_blend()) or use the data for something other than straight blending.</doc>
6284           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6285         </parameter>
6286         <parameter name="rowstride" transfer-ownership="none">
6287           <doc xml:whitespace="preserve">the memory offset in bytes between the starts of scanlines in @data</doc>
6288           <type name="uint" c:type="unsigned int"/>
6289         </parameter>
6290         <parameter name="data" transfer-ownership="none">
6291           <doc xml:whitespace="preserve">pointer the memory region where the source buffer resides</doc>
6292           <array c:type="guint8*">
6293             <type name="uint8"/>
6294           </array>
6295         </parameter>
6296       </parameters>
6297     </function>
6298     <function name="texture_new_from_file"
6299               c:identifier="cogl_texture_new_from_file"
6300               version="0.8"
6301               throws="1">
6302       <doc xml:whitespace="preserve">Creates a COGL texture from an image file.
6303 %COGL_INVALID_HANDLE on failure</doc>
6304       <return-value transfer-ownership="full">
6305         <doc xml:whitespace="preserve">a #CoglHandle to the newly created texture or</doc>
6306         <type name="Handle" c:type="CoglHandle"/>
6307       </return-value>
6308       <parameters>
6309         <parameter name="filename" transfer-ownership="none">
6310           <doc xml:whitespace="preserve">the file to load</doc>
6311           <type name="utf8" c:type="char*"/>
6312         </parameter>
6313         <parameter name="flags" transfer-ownership="none">
6314           <doc xml:whitespace="preserve">Optional flags for the texture, or %COGL_TEXTURE_NONE</doc>
6315           <type name="TextureFlags" c:type="CoglTextureFlags"/>
6316         </parameter>
6317         <parameter name="internal_format" transfer-ownership="none">
6318           <doc xml:whitespace="preserve">the #CoglPixelFormat to use for the GPU storage of the texture. If %COGL_PIXEL_FORMAT_ANY is given then a premultiplied format similar to the format of the source data will be used. The default blending equations of Cogl expect premultiplied color data; the main use of passing a non-premultiplied format here is if you have non-premultiplied source data and are going to adjust the blend mode (see cogl_material_set_blend()) or use the data for something other than straight blending.</doc>
6319           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6320         </parameter>
6321       </parameters>
6322     </function>
6323     <function name="texture_new_from_foreign"
6324               c:identifier="cogl_texture_new_from_foreign"
6325               version="0.8">
6326       <doc xml:whitespace="preserve">Creates a COGL texture based on an existing OpenGL texture; the
6327 width, height and format are passed along since it is not always
6328 possible to query these from OpenGL.
6329 The waste arguments allow you to create a Cogl texture that maps to
6330 a region smaller than the real OpenGL texture. For instance if your
6331 hardware only supports power-of-two textures you may load a
6332 non-power-of-two image into a larger power-of-two texture and use
6333 the waste arguments to tell Cogl which region should be mapped to
6334 the texture coordinate range [0:1].
6335 %COGL_INVALID_HANDLE on failure</doc>
6336       <return-value transfer-ownership="full">
6337         <doc xml:whitespace="preserve">a #CoglHandle to the newly created texture or</doc>
6338         <type name="Handle" c:type="CoglHandle"/>
6339       </return-value>
6340       <parameters>
6341         <parameter name="gl_handle" transfer-ownership="none">
6342           <doc xml:whitespace="preserve">opengl handle of foreign texture.</doc>
6343           <type name="GL.uint" c:type="GLuint"/>
6344         </parameter>
6345         <parameter name="gl_target" transfer-ownership="none">
6346           <doc xml:whitespace="preserve">opengl target type of foreign texture</doc>
6347           <type name="GL.enum" c:type="GLenum"/>
6348         </parameter>
6349         <parameter name="width" transfer-ownership="none">
6350           <doc xml:whitespace="preserve">width of foreign texture</doc>
6351           <type name="GL.uint" c:type="GLuint"/>
6352         </parameter>
6353         <parameter name="height" transfer-ownership="none">
6354           <doc xml:whitespace="preserve">height of foreign texture.</doc>
6355           <type name="GL.uint" c:type="GLuint"/>
6356         </parameter>
6357         <parameter name="x_pot_waste" transfer-ownership="none">
6358           <doc xml:whitespace="preserve">horizontal waste on the right hand edge of the texture.</doc>
6359           <type name="GL.uint" c:type="GLuint"/>
6360         </parameter>
6361         <parameter name="y_pot_waste" transfer-ownership="none">
6362           <doc xml:whitespace="preserve">vertical waste on the bottom edge of the texture.</doc>
6363           <type name="GL.uint" c:type="GLuint"/>
6364         </parameter>
6365         <parameter name="format" transfer-ownership="none">
6366           <doc xml:whitespace="preserve">format of the foreign texture.</doc>
6367           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6368         </parameter>
6369       </parameters>
6370     </function>
6371     <function name="texture_new_from_sub_texture"
6372               c:identifier="cogl_texture_new_from_sub_texture"
6373               version="1.2">
6374       <doc xml:whitespace="preserve">Creates a new texture which represents a subregion of another
6375 texture. The GL resources will be shared so that no new texture
6376 data is actually allocated.
6377 Sub textures have undefined behaviour texture coordinates outside
6378 of the range [0,1] are used. They also do not work with
6379 CoglVertexBuffers.
6380 The sub texture will keep a reference to the full texture so you do
6381 not need to keep one separately if you only want to use the sub
6382 texture.</doc>
6383       <return-value transfer-ownership="full">
6384         <doc xml:whitespace="preserve">a #CoglHandle to the new texture.</doc>
6385         <type name="Handle" c:type="CoglHandle"/>
6386       </return-value>
6387       <parameters>
6388         <parameter name="full_texture" transfer-ownership="none">
6389           <doc xml:whitespace="preserve">a #CoglHandle to an existing texture</doc>
6390           <type name="Handle" c:type="CoglHandle"/>
6391         </parameter>
6392         <parameter name="sub_x" transfer-ownership="none">
6393           <doc xml:whitespace="preserve">X coordinate of the top-left of the subregion</doc>
6394           <type name="int" c:type="int"/>
6395         </parameter>
6396         <parameter name="sub_y" transfer-ownership="none">
6397           <doc xml:whitespace="preserve">Y coordinate of the top-left of the subregion</doc>
6398           <type name="int" c:type="int"/>
6399         </parameter>
6400         <parameter name="sub_width" transfer-ownership="none">
6401           <doc xml:whitespace="preserve">Width in pixels of the subregion</doc>
6402           <type name="int" c:type="int"/>
6403         </parameter>
6404         <parameter name="sub_height" transfer-ownership="none">
6405           <doc xml:whitespace="preserve">Height in pixels of the subregion</doc>
6406           <type name="int" c:type="int"/>
6407         </parameter>
6408       </parameters>
6409     </function>
6410     <function name="texture_new_with_size"
6411               c:identifier="cogl_texture_new_with_size"
6412               version="0.8">
6413       <doc xml:whitespace="preserve">Creates a new COGL texture with the specified dimensions and pixel format.
6414 %COGL_INVALID_HANDLE on failure</doc>
6415       <return-value transfer-ownership="full">
6416         <doc xml:whitespace="preserve">a #CoglHandle to the newly created texture or</doc>
6417         <type name="Handle" c:type="CoglHandle"/>
6418       </return-value>
6419       <parameters>
6420         <parameter name="width" transfer-ownership="none">
6421           <doc xml:whitespace="preserve">width of texture in pixels.</doc>
6422           <type name="uint" c:type="unsigned int"/>
6423         </parameter>
6424         <parameter name="height" transfer-ownership="none">
6425           <doc xml:whitespace="preserve">height of texture in pixels.</doc>
6426           <type name="uint" c:type="unsigned int"/>
6427         </parameter>
6428         <parameter name="flags" transfer-ownership="none">
6429           <doc xml:whitespace="preserve">Optional flags for the texture, or %COGL_TEXTURE_NONE</doc>
6430           <type name="TextureFlags" c:type="CoglTextureFlags"/>
6431         </parameter>
6432         <parameter name="internal_format" transfer-ownership="none">
6433           <doc xml:whitespace="preserve">the #CoglPixelFormat to use for the GPU storage of the texture.</doc>
6434           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6435         </parameter>
6436       </parameters>
6437     </function>
6438     <function name="texture_pixmap_x11_is_using_tfp_extension_EXP"
6439               c:identifier="cogl_texture_pixmap_x11_is_using_tfp_extension_EXP">
6440       <return-value transfer-ownership="none">
6441         <type name="boolean" c:type="gboolean"/>
6442       </return-value>
6443       <parameters>
6444         <parameter name="handle" transfer-ownership="none">
6445           <type name="Handle" c:type="CoglHandle"/>
6446         </parameter>
6447       </parameters>
6448     </function>
6449     <function name="texture_pixmap_x11_new_EXP"
6450               c:identifier="cogl_texture_pixmap_x11_new_EXP">
6451       <return-value transfer-ownership="full">
6452         <type name="Handle" c:type="CoglHandle"/>
6453       </return-value>
6454       <parameters>
6455         <parameter name="pixmap" transfer-ownership="none">
6456           <type name="uint32" c:type="guint32"/>
6457         </parameter>
6458         <parameter name="automatic_updates" transfer-ownership="none">
6459           <type name="boolean" c:type="gboolean"/>
6460         </parameter>
6461       </parameters>
6462     </function>
6463     <function name="texture_pixmap_x11_set_damage_object_EXP"
6464               c:identifier="cogl_texture_pixmap_x11_set_damage_object_EXP">
6465       <return-value transfer-ownership="none">
6466         <type name="none" c:type="void"/>
6467       </return-value>
6468       <parameters>
6469         <parameter name="handle" transfer-ownership="none">
6470           <type name="Handle" c:type="CoglHandle"/>
6471         </parameter>
6472         <parameter name="damage" transfer-ownership="none">
6473           <type name="uint32" c:type="guint32"/>
6474         </parameter>
6475         <parameter name="report_level" transfer-ownership="none">
6476           <type name="TexturePixmapX11ReportLevel"
6477                 c:type="CoglTexturePixmapX11ReportLevel"/>
6478         </parameter>
6479       </parameters>
6480     </function>
6481     <function name="texture_pixmap_x11_update_area_EXP"
6482               c:identifier="cogl_texture_pixmap_x11_update_area_EXP">
6483       <return-value transfer-ownership="none">
6484         <type name="none" c:type="void"/>
6485       </return-value>
6486       <parameters>
6487         <parameter name="handle" transfer-ownership="none">
6488           <type name="Handle" c:type="CoglHandle"/>
6489         </parameter>
6490         <parameter name="x" transfer-ownership="none">
6491           <type name="int" c:type="int"/>
6492         </parameter>
6493         <parameter name="y" transfer-ownership="none">
6494           <type name="int" c:type="int"/>
6495         </parameter>
6496         <parameter name="width" transfer-ownership="none">
6497           <type name="int" c:type="int"/>
6498         </parameter>
6499         <parameter name="height" transfer-ownership="none">
6500           <type name="int" c:type="int"/>
6501         </parameter>
6502       </parameters>
6503     </function>
6504     <function name="texture_ref"
6505               c:identifier="cogl_texture_ref"
6506               deprecated="Use cogl_handle_ref() instead"
6507               deprecated-version="1.2">
6508       <doc xml:whitespace="preserve">Increment the reference count for a cogl texture.</doc>
6509       <return-value transfer-ownership="full">
6510         <doc xml:whitespace="preserve">the @handle.</doc>
6511         <type name="Handle" c:type="CoglHandle"/>
6512       </return-value>
6513       <parameters>
6514         <parameter name="handle" transfer-ownership="none">
6515           <doc xml:whitespace="preserve">a @CoglHandle.</doc>
6516           <type name="Handle" c:type="CoglHandle"/>
6517         </parameter>
6518       </parameters>
6519     </function>
6520     <function name="texture_set_region" c:identifier="cogl_texture_set_region">
6521       <doc xml:whitespace="preserve">Sets the pixels in a rectangular subregion of @handle from an in-memory
6522 buffer containing pixel data.
6523 %FALSE otherwise</doc>
6524       <return-value transfer-ownership="none">
6525         <doc xml:whitespace="preserve">%TRUE if the subregion upload was successful, and</doc>
6526         <type name="boolean" c:type="gboolean"/>
6527       </return-value>
6528       <parameters>
6529         <parameter name="handle" transfer-ownership="none">
6530           <doc xml:whitespace="preserve">a #CoglHandle.</doc>
6531           <type name="Handle" c:type="CoglHandle"/>
6532         </parameter>
6533         <parameter name="src_x" transfer-ownership="none">
6534           <doc xml:whitespace="preserve">upper left coordinate to use from source data.</doc>
6535           <type name="int" c:type="int"/>
6536         </parameter>
6537         <parameter name="src_y" transfer-ownership="none">
6538           <doc xml:whitespace="preserve">upper left coordinate to use from source data.</doc>
6539           <type name="int" c:type="int"/>
6540         </parameter>
6541         <parameter name="dst_x" transfer-ownership="none">
6542           <doc xml:whitespace="preserve">upper left destination horizontal coordinate.</doc>
6543           <type name="int" c:type="int"/>
6544         </parameter>
6545         <parameter name="dst_y" transfer-ownership="none">
6546           <doc xml:whitespace="preserve">upper left destination vertical coordinate.</doc>
6547           <type name="int" c:type="int"/>
6548         </parameter>
6549         <parameter name="dst_width" transfer-ownership="none">
6550           <doc xml:whitespace="preserve">width of destination region to write.</doc>
6551           <type name="uint" c:type="unsigned int"/>
6552         </parameter>
6553         <parameter name="dst_height" transfer-ownership="none">
6554           <doc xml:whitespace="preserve">height of destination region to write.</doc>
6555           <type name="uint" c:type="unsigned int"/>
6556         </parameter>
6557         <parameter name="width" transfer-ownership="none">
6558           <doc xml:whitespace="preserve">width of source data buffer.</doc>
6559           <type name="int" c:type="int"/>
6560         </parameter>
6561         <parameter name="height" transfer-ownership="none">
6562           <doc xml:whitespace="preserve">height of source data buffer.</doc>
6563           <type name="int" c:type="int"/>
6564         </parameter>
6565         <parameter name="format" transfer-ownership="none">
6566           <doc xml:whitespace="preserve">the #CoglPixelFormat used in the source buffer.</doc>
6567           <type name="PixelFormat" c:type="CoglPixelFormat"/>
6568         </parameter>
6569         <parameter name="rowstride" transfer-ownership="none">
6570           <doc xml:whitespace="preserve">rowstride of source buffer (computed from width if none specified)</doc>
6571           <type name="uint" c:type="unsigned int"/>
6572         </parameter>
6573         <parameter name="data" transfer-ownership="none">
6574           <doc xml:whitespace="preserve">the actual pixel data.</doc>
6575           <array c:type="guint8*">
6576             <type name="uint8"/>
6577           </array>
6578         </parameter>
6579       </parameters>
6580     </function>
6581     <function name="texture_unref"
6582               c:identifier="cogl_texture_unref"
6583               deprecated="Use cogl_handle_unref() instead"
6584               deprecated-version="1.2">
6585       <doc xml:whitespace="preserve">Decrement the reference count for a cogl texture.</doc>
6586       <return-value transfer-ownership="none">
6587         <type name="none" c:type="void"/>
6588       </return-value>
6589       <parameters>
6590         <parameter name="handle" transfer-ownership="none">
6591           <doc xml:whitespace="preserve">a @CoglHandle.</doc>
6592           <type name="Handle" c:type="CoglHandle"/>
6593         </parameter>
6594       </parameters>
6595     </function>
6596     <function name="transform" c:identifier="cogl_transform" version="1.4">
6597       <doc xml:whitespace="preserve">Multiplies the current model-view matrix by the given matrix.</doc>
6598       <return-value transfer-ownership="none">
6599         <type name="none" c:type="void"/>
6600       </return-value>
6601       <parameters>
6602         <parameter name="matrix" transfer-ownership="none">
6603           <doc xml:whitespace="preserve">the matrix to multiply with the current model-view</doc>
6604           <type name="Matrix" c:type="CoglMatrix*"/>
6605         </parameter>
6606       </parameters>
6607     </function>
6608     <function name="translate" c:identifier="cogl_translate">
6609       <doc xml:whitespace="preserve">Multiplies the current model-view matrix by one that translates the
6610 model along all three axes according to the given values.</doc>
6611       <return-value transfer-ownership="none">
6612         <type name="none" c:type="void"/>
6613       </return-value>
6614       <parameters>
6615         <parameter name="x" transfer-ownership="none">
6616           <doc xml:whitespace="preserve">Distance to translate along the x-axis</doc>
6617           <type name="float" c:type="float"/>
6618         </parameter>
6619         <parameter name="y" transfer-ownership="none">
6620           <doc xml:whitespace="preserve">Distance to translate along the y-axis</doc>
6621           <type name="float" c:type="float"/>
6622         </parameter>
6623         <parameter name="z" transfer-ownership="none">
6624           <doc xml:whitespace="preserve">Distance to translate along the z-axis</doc>
6625           <type name="float" c:type="float"/>
6626         </parameter>
6627       </parameters>
6628     </function>
6629     <function name="vector3_equal_EXP" c:identifier="cogl_vector3_equal_EXP">
6630       <return-value transfer-ownership="none">
6631         <type name="boolean" c:type="gboolean"/>
6632       </return-value>
6633       <parameters>
6634         <parameter name="v1" transfer-ownership="none">
6635           <type name="any" c:type="gconstpointer"/>
6636         </parameter>
6637         <parameter name="v2" transfer-ownership="none">
6638           <type name="any" c:type="gconstpointer"/>
6639         </parameter>
6640       </parameters>
6641     </function>
6642     <function name="vertex_buffer_add" c:identifier="cogl_vertex_buffer_add">
6643       <doc xml:whitespace="preserve">Adds an attribute to a buffer.
6644 You either can use one of the built-in names such as "gl_Vertex", or
6645 "gl_MultiTexCoord0" to add standard attributes, like positions, colors
6646 and normals, or you can add custom attributes for use in shaders.
6647 The number of vertices declared when calling cogl_vertex_buffer_new()
6648 determines how many attribute values will be read from the supplied
6649 The data for your attribute isn't copied anywhere until you call
6650 cogl_vertex_buffer_submit(), or issue a draw call which automatically
6651 submits pending attribute changes. so the supplied pointer must remain
6652 valid until then. If you are updating an existing attribute (done by
6653 re-adding it) then you still need to re-call cogl_vertex_buffer_submit()
6654 to commit the changes to the GPU. Be carefull to minimize the number
6655 of calls to cogl_vertex_buffer_submit(), though.
6656 &lt;note&gt;If you are interleving attributes it is assumed that each interleaved
6657 attribute starts no farther than +- stride bytes from the other attributes
6658 it is interleved with. I.e. this is ok:
6659 &lt;programlisting&gt;
6660 |-0-0-0-0-0-0-0-0-0-0|
6661 &lt;/programlisting&gt;
6662 This is not ok:
6663 &lt;programlisting&gt;
6664 |- - - - -0-0-0-0-0-0 0 0 0 0|
6665 &lt;/programlisting&gt;
6666 (Though you can have multiple groups of interleved attributes)&lt;/note&gt;</doc>
6667       <return-value transfer-ownership="none">
6668         <type name="none" c:type="void"/>
6669       </return-value>
6670       <parameters>
6671         <parameter name="handle" transfer-ownership="none">
6672           <doc xml:whitespace="preserve">A vertex buffer handle</doc>
6673           <type name="Handle" c:type="CoglHandle"/>
6674         </parameter>
6675         <parameter name="attribute_name" transfer-ownership="none">
6676           <doc xml:whitespace="preserve">The name of your attribute. It should be a valid GLSL variable name and standard attribute types must use one of following built-in names: (Note: they correspond to the built-in names of GLSL) &lt;itemizedlist&gt; &lt;listitem&gt;"gl_Color"&lt;/listitem&gt; &lt;listitem&gt;"gl_Normal"&lt;/listitem&gt; &lt;listitem&gt;"gl_MultiTexCoord0, gl_MultiTexCoord1, ..."&lt;/listitem&gt; &lt;listitem&gt;"gl_Vertex"&lt;/listitem&gt; &lt;/itemizedlist&gt; To support adding multiple variations of the same attribute the name can have a detail component, E.g. "gl_Color::active" or "gl_Color::inactive"</doc>
6677           <type name="utf8" c:type="char*"/>
6678         </parameter>
6679         <parameter name="n_components" transfer-ownership="none">
6680           <doc xml:whitespace="preserve">The number of components per attribute and must be 1, 2, 3 or 4</doc>
6681           <type name="uint8" c:type="guint8"/>
6682         </parameter>
6683         <parameter name="type" transfer-ownership="none">
6684           <doc xml:whitespace="preserve">a #CoglAttributeType specifying the data type of each component.</doc>
6685           <type name="AttributeType" c:type="CoglAttributeType"/>
6686         </parameter>
6687         <parameter name="normalized" transfer-ownership="none">
6688           <doc xml:whitespace="preserve">If %TRUE, this specifies that values stored in an integer format should be mapped into the range [-1.0, 1.0] or [0.0, 1.0] for unsigned values. If %FALSE they are converted to floats directly.</doc>
6689           <type name="boolean" c:type="gboolean"/>
6690         </parameter>
6691         <parameter name="stride" transfer-ownership="none">
6692           <doc xml:whitespace="preserve">This specifies the number of bytes from the start of one attribute value to the start of the next value (for the same attribute). So, for example, with a position interleved with color like this: XYRGBAXYRGBAXYRGBA, then if each letter represents a byte, the stride for both attributes is 6. The special value 0 means the values are stored sequentially in memory.</doc>
6693           <type name="uint16" c:type="guint16"/>
6694         </parameter>
6695         <parameter name="pointer" transfer-ownership="none">
6696           <doc xml:whitespace="preserve">This addresses the first attribute in the vertex array. This must remain valid until you either call cogl_vertex_buffer_submit() or issue a draw call.</doc>
6697           <type name="any" c:type="void*"/>
6698         </parameter>
6699       </parameters>
6700     </function>
6701     <function name="vertex_buffer_delete"
6702               c:identifier="cogl_vertex_buffer_delete">
6703       <doc xml:whitespace="preserve">Deletes an attribute from a buffer. You will need to call
6704 cogl_vertex_buffer_submit() or issue a draw call to commit this
6705 change to the GPU.</doc>
6706       <return-value transfer-ownership="none">
6707         <type name="none" c:type="void"/>
6708       </return-value>
6709       <parameters>
6710         <parameter name="handle" transfer-ownership="none">
6711           <doc xml:whitespace="preserve">A vertex buffer handle</doc>
6712           <type name="Handle" c:type="CoglHandle"/>
6713         </parameter>
6714         <parameter name="attribute_name" transfer-ownership="none">
6715           <doc xml:whitespace="preserve">The name of a previously added attribute</doc>
6716           <type name="utf8" c:type="char*"/>
6717         </parameter>
6718       </parameters>
6719     </function>
6720     <function name="vertex_buffer_disable"
6721               c:identifier="cogl_vertex_buffer_disable">
6722       <doc xml:whitespace="preserve">Disables a previosuly added attribute.
6723 Since it can be costly to add and remove new attributes to buffers; to make
6724 individual buffers more reuseable it is possible to enable and disable
6725 attributes before using a buffer for drawing.
6726 You don't need to call cogl_vertex_buffer_submit() after using this
6727 function.</doc>
6728       <return-value transfer-ownership="none">
6729         <type name="none" c:type="void"/>
6730       </return-value>
6731       <parameters>
6732         <parameter name="handle" transfer-ownership="none">
6733           <doc xml:whitespace="preserve">A vertex buffer handle</doc>
6734           <type name="Handle" c:type="CoglHandle"/>
6735         </parameter>
6736         <parameter name="attribute_name" transfer-ownership="none">
6737           <doc xml:whitespace="preserve">The name of the attribute you want to disable</doc>
6738           <type name="utf8" c:type="char*"/>
6739         </parameter>
6740       </parameters>
6741     </function>
6742     <function name="vertex_buffer_draw" c:identifier="cogl_vertex_buffer_draw">
6743       <doc xml:whitespace="preserve">Allows you to draw geometry using all or a subset of the
6744 vertices in a vertex buffer.
6745 Any un-submitted attribute changes are automatically submitted before
6746 drawing.</doc>
6747       <return-value transfer-ownership="none">
6748         <type name="none" c:type="void"/>
6749       </return-value>
6750       <parameters>
6751         <parameter name="handle" transfer-ownership="none">
6752           <doc xml:whitespace="preserve">A vertex buffer handle</doc>
6753           <type name="Handle" c:type="CoglHandle"/>
6754         </parameter>
6755         <parameter name="mode" transfer-ownership="none">
6756           <doc xml:whitespace="preserve">A #CoglVerticesMode specifying how the vertices should be interpreted.</doc>
6757           <type name="VerticesMode" c:type="CoglVerticesMode"/>
6758         </parameter>
6759         <parameter name="first" transfer-ownership="none">
6760           <doc xml:whitespace="preserve">Specifies the index of the first vertex you want to draw with</doc>
6761           <type name="int" c:type="int"/>
6762         </parameter>
6763         <parameter name="count" transfer-ownership="none">
6764           <doc xml:whitespace="preserve">Specifies the number of vertices you want to draw.</doc>
6765           <type name="int" c:type="int"/>
6766         </parameter>
6767       </parameters>
6768     </function>
6769     <function name="vertex_buffer_draw_elements"
6770               c:identifier="cogl_vertex_buffer_draw_elements">
6771       <doc xml:whitespace="preserve">This function lets you use an array of indices to specify the vertices
6772 within your vertex buffer that you want to draw. The indices themselves
6773 are created by calling cogl_vertex_buffer_indices_new ()
6774 Any un-submitted attribute changes are automatically submitted before
6775 drawing.</doc>
6776       <return-value transfer-ownership="none">
6777         <type name="none" c:type="void"/>
6778       </return-value>
6779       <parameters>
6780         <parameter name="handle" transfer-ownership="none">
6781           <doc xml:whitespace="preserve">A vertex buffer handle</doc>
6782           <type name="Handle" c:type="CoglHandle"/>
6783         </parameter>
6784         <parameter name="mode" transfer-ownership="none">
6785           <doc xml:whitespace="preserve">A #CoglVerticesMode specifying how the vertices should be interpreted.</doc>
6786           <type name="VerticesMode" c:type="CoglVerticesMode"/>
6787         </parameter>
6788         <parameter name="indices" transfer-ownership="none">
6789           <doc xml:whitespace="preserve">A CoglHandle for a set of indices allocated via cogl_vertex_buffer_indices_new ()</doc>
6790           <type name="Handle" c:type="CoglHandle"/>
6791         </parameter>
6792         <parameter name="min_index" transfer-ownership="none">
6793           <doc xml:whitespace="preserve">Specifies the minimum vertex index contained in indices</doc>
6794           <type name="int" c:type="int"/>
6795         </parameter>
6796         <parameter name="max_index" transfer-ownership="none">
6797           <doc xml:whitespace="preserve">Specifies the maximum vertex index contained in indices</doc>
6798           <type name="int" c:type="int"/>
6799         </parameter>
6800         <parameter name="indices_offset" transfer-ownership="none">
6801           <doc xml:whitespace="preserve">An offset into named indices. The offset marks the first index to use for drawing.</doc>
6802           <type name="int" c:type="int"/>
6803         </parameter>
6804         <parameter name="count" transfer-ownership="none">
6805           <doc xml:whitespace="preserve">Specifies the number of vertices you want to draw.</doc>
6806           <type name="int" c:type="int"/>
6807         </parameter>
6808       </parameters>
6809     </function>
6810     <function name="vertex_buffer_enable"
6811               c:identifier="cogl_vertex_buffer_enable">
6812       <doc xml:whitespace="preserve">Enables a previosuly disabled attribute.
6813 Since it can be costly to add and remove new attributes to buffers; to make
6814 individual buffers more reuseable it is possible to enable and disable
6815 attributes before using a buffer for drawing.
6816 You don't need to call cogl_vertex_buffer_submit() after using this function</doc>
6817       <return-value transfer-ownership="none">
6818         <type name="none" c:type="void"/>
6819       </return-value>
6820       <parameters>
6821         <parameter name="handle" transfer-ownership="none">
6822           <doc xml:whitespace="preserve">A vertex buffer handle</doc>
6823           <type name="Handle" c:type="CoglHandle"/>
6824         </parameter>
6825         <parameter name="attribute_name" transfer-ownership="none">
6826           <doc xml:whitespace="preserve">The name of the attribute you want to enable</doc>
6827           <type name="utf8" c:type="char*"/>
6828         </parameter>
6829       </parameters>
6830     </function>
6831     <function name="vertex_buffer_get_n_vertices"
6832               c:identifier="cogl_vertex_buffer_get_n_vertices">
6833       <doc xml:whitespace="preserve">Retrieves the number of vertices that @handle represents</doc>
6834       <return-value transfer-ownership="none">
6835         <doc xml:whitespace="preserve">the number of vertices</doc>
6836         <type name="uint" c:type="unsigned int"/>
6837       </return-value>
6838       <parameters>
6839         <parameter name="handle" transfer-ownership="none">
6840           <doc xml:whitespace="preserve">A vertex buffer handle</doc>
6841           <type name="Handle" c:type="CoglHandle"/>
6842         </parameter>
6843       </parameters>
6844     </function>
6845     <function name="vertex_buffer_indices_get_for_quads"
6846               c:identifier="cogl_vertex_buffer_indices_get_for_quads">
6847       <doc xml:whitespace="preserve">Creates a vertex buffer containing the indices needed to draw pairs
6848 of triangles from a list of vertices grouped as quads. There will
6849 be at least @n_indices entries in the buffer (but there may be
6850 more).
6851 The indices will follow this pattern:
6852 0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7 ... etc
6853 For example, if you submit vertices for a quad like like that shown
6854 in &lt;xref linkend="quad-indices-order"/&gt; then you can request 6
6855 indices to render two triangles like those shown in &lt;xref
6856 linkend="quad-indices-triangles"/&gt;.
6857 &lt;figure id="quad-indices-order"&gt;
6858 &lt;title&gt;Example of vertices submitted to form a quad&lt;/title&gt;
6859 &lt;graphic fileref="quad-indices-order.png" format="PNG"/&gt;
6860 &lt;/figure&gt;
6861 &lt;figure id="quad-indices-triangles"&gt;
6862 &lt;title&gt;Illustration of the triangle indices that will be generated&lt;/title&gt;
6863 &lt;graphic fileref="quad-indices-triangles.png" format="PNG"/&gt;
6864 &lt;/figure&gt;
6865 owned by Cogl and should not be modified or unref'd.</doc>
6866       <return-value transfer-ownership="full">
6867         <doc xml:whitespace="preserve">A %CoglHandle containing the indices. The handled is</doc>
6868         <type name="Handle" c:type="CoglHandle"/>
6869       </return-value>
6870       <parameters>
6871         <parameter name="n_indices" transfer-ownership="none">
6872           <doc xml:whitespace="preserve">the number of indices in the vertex buffer.</doc>
6873           <type name="uint" c:type="unsigned int"/>
6874         </parameter>
6875       </parameters>
6876     </function>
6877     <function name="vertex_buffer_indices_get_type"
6878               c:identifier="cogl_vertex_buffer_indices_get_type">
6879       <doc xml:whitespace="preserve">Queries back the data type used for the given indices</doc>
6880       <return-value transfer-ownership="full">
6881         <doc xml:whitespace="preserve">The CoglIndicesType used</doc>
6882         <type name="IndicesType" c:type="CoglIndicesType"/>
6883       </return-value>
6884       <parameters>
6885         <parameter name="indices" transfer-ownership="none">
6886           <type name="Handle" c:type="CoglHandle"/>
6887         </parameter>
6888       </parameters>
6889     </function>
6890     <function name="vertex_buffer_indices_new"
6891               c:identifier="cogl_vertex_buffer_indices_new">
6892       <doc xml:whitespace="preserve">Depending on how much geometry you are submitting it can be worthwhile
6893 optimizing the number of redundant vertices you submit. Using an index
6894 array allows you to reference vertices multiple times, for example
6895 during triangle strips.
6896 cogl_vertex_buffer_draw_elements().</doc>
6897       <return-value transfer-ownership="full">
6898         <doc xml:whitespace="preserve">A CoglHandle for the indices which you can pass to</doc>
6899         <type name="Handle" c:type="CoglHandle"/>
6900       </return-value>
6901       <parameters>
6902         <parameter name="indices_type" transfer-ownership="none">
6903           <doc xml:whitespace="preserve">a #CoglIndicesType specifying the data type used for the indices.</doc>
6904           <type name="IndicesType" c:type="CoglIndicesType"/>
6905         </parameter>
6906         <parameter name="indices_array" transfer-ownership="none">
6907           <doc xml:whitespace="preserve">Specifies the address of your array of indices</doc>
6908           <array length="2" c:type="void*">
6909             <type name="any"/>
6910           </array>
6911         </parameter>
6912         <parameter name="indices_len" transfer-ownership="none">
6913           <doc xml:whitespace="preserve">The number of indices in indices_array</doc>
6914           <type name="int" c:type="int"/>
6915         </parameter>
6916       </parameters>
6917     </function>
6918     <function name="vertex_buffer_new" c:identifier="cogl_vertex_buffer_new">
6919       <doc xml:whitespace="preserve">Creates a new vertex buffer that you can use to add attributes.</doc>
6920       <return-value transfer-ownership="full">
6921         <doc xml:whitespace="preserve">a new #CoglHandle</doc>
6922         <type name="Handle" c:type="CoglHandle"/>
6923       </return-value>
6924       <parameters>
6925         <parameter name="n_vertices" transfer-ownership="none">
6926           <doc xml:whitespace="preserve">The number of vertices that your attributes will correspond to.</doc>
6927           <type name="uint" c:type="unsigned int"/>
6928         </parameter>
6929       </parameters>
6930     </function>
6931     <function name="vertex_buffer_ref"
6932               c:identifier="cogl_vertex_buffer_ref"
6933               deprecated="Use cogl_handle_ref() instead"
6934               deprecated-version="1.2">
6935       <doc xml:whitespace="preserve">Increment the reference count for a vertex buffer</doc>
6936       <return-value transfer-ownership="full">
6937         <doc xml:whitespace="preserve">the @handle.</doc>
6938         <type name="Handle" c:type="CoglHandle"/>
6939       </return-value>
6940       <parameters>
6941         <parameter name="handle" transfer-ownership="none">
6942           <doc xml:whitespace="preserve">a @CoglHandle.</doc>
6943           <type name="Handle" c:type="CoglHandle"/>
6944         </parameter>
6945       </parameters>
6946     </function>
6947     <function name="vertex_buffer_submit"
6948               c:identifier="cogl_vertex_buffer_submit">
6949       <doc xml:whitespace="preserve">Submits all the user added attributes to the GPU; once submitted, the
6950 attributes can be used for drawing.
6951 You should aim to minimize calls to this function since it implies
6952 validating your data; it potentially incurs a transport cost (especially if
6953 you are using GLX indirect rendering) and potentially a format conversion
6954 cost if the GPU doesn't natively support any of the given attribute formats.</doc>
6955       <return-value transfer-ownership="none">
6956         <type name="none" c:type="void"/>
6957       </return-value>
6958       <parameters>
6959         <parameter name="handle" transfer-ownership="none">
6960           <doc xml:whitespace="preserve">A vertex buffer handle</doc>
6961           <type name="Handle" c:type="CoglHandle"/>
6962         </parameter>
6963       </parameters>
6964     </function>
6965     <function name="vertex_buffer_unref"
6966               c:identifier="cogl_vertex_buffer_unref"
6967               deprecated="Use cogl_handle_unref() instead"
6968               deprecated-version="1.2">
6969       <doc xml:whitespace="preserve">Decrement the reference count for a vertex buffer</doc>
6970       <return-value transfer-ownership="none">
6971         <type name="none" c:type="void"/>
6972       </return-value>
6973       <parameters>
6974         <parameter name="handle" transfer-ownership="none">
6975           <doc xml:whitespace="preserve">a @CoglHandle.</doc>
6976           <type name="Handle" c:type="CoglHandle"/>
6977         </parameter>
6978       </parameters>
6979     </function>
6980     <function name="viewport"
6981               c:identifier="cogl_viewport"
6982               version="0.8.2"
6983               deprecated="Use cogl_set_viewport() instead"
6984               deprecated-version="1.2">
6985       <doc xml:whitespace="preserve">Replace the current viewport with the given values.</doc>
6986       <return-value transfer-ownership="none">
6987         <type name="none" c:type="void"/>
6988       </return-value>
6989       <parameters>
6990         <parameter name="width" transfer-ownership="none">
6991           <doc xml:whitespace="preserve">Width of the viewport</doc>
6992           <type name="uint" c:type="unsigned int"/>
6993         </parameter>
6994         <parameter name="height" transfer-ownership="none">
6995           <doc xml:whitespace="preserve">Height of the viewport</doc>
6996           <type name="uint" c:type="unsigned int"/>
6997         </parameter>
6998       </parameters>
6999     </function>
7000   </namespace>
7001 </repository>