"Initial commit to Gerrit"
[profile/ivi/cogl.git] / doc / reference / cogl-2.0-experimental / html / cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>CoglFramebuffer: The Framebuffer Interface</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="Cogl 2.0 Reference Manual">
8 <link rel="up" href="cogl-framebuffer-apis.html" title="Framebuffers">
9 <link rel="prev" href="cogl-framebuffer-apis.html" title="Framebuffers">
10 <link rel="next" href="cogl-2.0-experimental-Offscreen-Framebuffers.html" title="Offscreen Framebuffers">
11 <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="cogl-framebuffer-apis.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="cogl-framebuffer-apis.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">Cogl 2.0 Reference Manual</th>
21 <td><a accesskey="n" href="cogl-2.0-experimental-Offscreen-Framebuffers.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.description" class="shortcut">Description</a>
27 </td></tr>
28 </table>
29 <div class="refentry">
30 <a name="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
32 <td valign="top">
33 <h2><span class="refentrytitle"><a name="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.top_of_page"></a>CoglFramebuffer: The Framebuffer Interface</span></h2>
34 <p>CoglFramebuffer: The Framebuffer Interface — A common interface for manipulating framebuffers</p>
35 </td>
36 <td valign="top" align="right"></td>
37 </tr></table></div>
38 <div class="refsynopsisdiv">
39 <a name="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis">                    <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer">CoglFramebuffer</a>;
41 #define             <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#COGL-FRAMEBUFFER:CAPS" title="COGL_FRAMEBUFFER()">COGL_FRAMEBUFFER</a>                    (X)
42 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-allocate" title="cogl_framebuffer_allocate ()">cogl_framebuffer_allocate</a>           (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
43                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
44 <span class="returnvalue">int</span>                 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-width" title="cogl_framebuffer_get_width ()">cogl_framebuffer_get_width</a>          (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
45 <span class="returnvalue">int</span>                 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-height" title="cogl_framebuffer_get_height ()">cogl_framebuffer_get_height</a>         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
46 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-set-viewport" title="cogl_framebuffer_set_viewport ()">cogl_framebuffer_set_viewport</a>       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
47                                                          <em class="parameter"><code><span class="type">float</span> x</code></em>,
48                                                          <em class="parameter"><code><span class="type">float</span> y</code></em>,
49                                                          <em class="parameter"><code><span class="type">float</span> width</code></em>,
50                                                          <em class="parameter"><code><span class="type">float</span> height</code></em>);
51 <span class="returnvalue">float</span>               <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-viewport-x" title="cogl_framebuffer_get_viewport_x ()">cogl_framebuffer_get_viewport_x</a>     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
52 <span class="returnvalue">float</span>               <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-viewport-y" title="cogl_framebuffer_get_viewport_y ()">cogl_framebuffer_get_viewport_y</a>     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
53 <span class="returnvalue">float</span>               <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-viewport-width" title="cogl_framebuffer_get_viewport_width ()">cogl_framebuffer_get_viewport_width</a> (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
54 <span class="returnvalue">float</span>               <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-viewport-height" title="cogl_framebuffer_get_viewport_height ()">cogl_framebuffer_get_viewport_height</a>
55                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
56 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-viewport4fv" title="cogl_framebuffer_get_viewport4fv ()">cogl_framebuffer_get_viewport4fv</a>    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
57                                                          <em class="parameter"><code><span class="type">float</span> *viewport</code></em>);
58 <a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a>     <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-color-format" title="cogl_framebuffer_get_color_format ()">cogl_framebuffer_get_color_format</a>   (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
59 <span class="returnvalue">int</span>                 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-red-bits" title="cogl_framebuffer_get_red_bits ()">cogl_framebuffer_get_red_bits</a>       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
60 <span class="returnvalue">int</span>                 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-green-bits" title="cogl_framebuffer_get_green_bits ()">cogl_framebuffer_get_green_bits</a>     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
61 <span class="returnvalue">int</span>                 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-blue-bits" title="cogl_framebuffer_get_blue_bits ()">cogl_framebuffer_get_blue_bits</a>      (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
62 <a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglColorMask" title="enum CoglColorMask"><span class="returnvalue">CoglColorMask</span></a>       <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-color-mask" title="cogl_framebuffer_get_color_mask ()">cogl_framebuffer_get_color_mask</a>     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
63 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-set-color-mask" title="cogl_framebuffer_set_color_mask ()">cogl_framebuffer_set_color_mask</a>     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
64                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglColorMask" title="enum CoglColorMask"><span class="type">CoglColorMask</span></a> color_mask</code></em>);
65 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-resolve-samples" title="cogl_framebuffer_resolve_samples ()">cogl_framebuffer_resolve_samples</a>    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
66 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-resolve-samples-region" title="cogl_framebuffer_resolve_samples_region ()">cogl_framebuffer_resolve_samples_region</a>
67                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
68                                                          <em class="parameter"><code><span class="type">int</span> x</code></em>,
69                                                          <em class="parameter"><code><span class="type">int</span> y</code></em>,
70                                                          <em class="parameter"><code><span class="type">int</span> width</code></em>,
71                                                          <em class="parameter"><code><span class="type">int</span> height</code></em>);
72 <span class="returnvalue">CoglContext</span> *       <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-context" title="cogl_framebuffer_get_context ()">cogl_framebuffer_get_context</a>        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
73 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-clear" title="cogl_framebuffer_clear ()">cogl_framebuffer_clear</a>              (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
74                                                          <em class="parameter"><code><span class="type">unsigned long </span> buffers</code></em>,
75                                                          <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-Color-Type.html#CoglColor" title="struct CoglColor"><span class="type">CoglColor</span></a> *color</code></em>);
76 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-clear4f" title="cogl_framebuffer_clear4f ()">cogl_framebuffer_clear4f</a>            (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
77                                                          <em class="parameter"><code><span class="type">unsigned long </span> buffers</code></em>,
78                                                          <em class="parameter"><code><span class="type">float</span> red</code></em>,
79                                                          <em class="parameter"><code><span class="type">float</span> green</code></em>,
80                                                          <em class="parameter"><code><span class="type">float</span> blue</code></em>,
81                                                          <em class="parameter"><code><span class="type">float</span> alpha</code></em>);
82 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-read-pixels-into-bitmap" title="cogl_framebuffer_read_pixels_into_bitmap ()">cogl_framebuffer_read_pixels_into_bitmap</a>
83                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
84                                                          <em class="parameter"><code><span class="type">int</span> x</code></em>,
85                                                          <em class="parameter"><code><span class="type">int</span> y</code></em>,
86                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#CoglReadPixelsFlags" title="enum CoglReadPixelsFlags"><span class="type">CoglReadPixelsFlags</span></a> source</code></em>,
87                                                          <em class="parameter"><code><a href="../cogl/cogl-Bitmaps.html#CoglBitmap"><span class="type">CoglBitmap</span></a> *bitmap</code></em>);
88 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-read-pixels" title="cogl_framebuffer_read_pixels ()">cogl_framebuffer_read_pixels</a>        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
89                                                          <em class="parameter"><code><span class="type">int</span> x</code></em>,
90                                                          <em class="parameter"><code><span class="type">int</span> y</code></em>,
91                                                          <em class="parameter"><code><span class="type">int</span> width</code></em>,
92                                                          <em class="parameter"><code><span class="type">int</span> height</code></em>,
93                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> format</code></em>,
94                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *pixels</code></em>);
95 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-set-dither-enabled" title="cogl_framebuffer_set_dither_enabled ()">cogl_framebuffer_set_dither_enabled</a> (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
96                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> dither_enabled</code></em>);
97 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-dither-enabled" title="cogl_framebuffer_get_dither_enabled ()">cogl_framebuffer_get_dither_enabled</a> (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
98
99 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-primitive" title="cogl_framebuffer_draw_primitive ()">cogl_framebuffer_draw_primitive</a>     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
100                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
101                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Primitives.html#CoglPrimitive" title="CoglPrimitive"><span class="type">CoglPrimitive</span></a> *primitive</code></em>);
102 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-attributes" title="cogl_framebuffer_draw_attributes ()">cogl_framebuffer_draw_attributes</a>    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
103                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
104                                                          <em class="parameter"><code><a href="../cogl/cogl-Vertex-Buffers.html#CoglVerticesMode"><span class="type">CoglVerticesMode</span></a> mode</code></em>,
105                                                          <em class="parameter"><code><span class="type">int</span> first_vertex</code></em>,
106                                                          <em class="parameter"><code><span class="type">int</span> n_vertices</code></em>,
107                                                          <em class="parameter"><code><span class="type">CoglAttribute</span> **attributes</code></em>,
108                                                          <em class="parameter"><code><span class="type">int</span> n_attributes</code></em>);
109 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-vdraw-attributes" title="cogl_framebuffer_vdraw_attributes ()">cogl_framebuffer_vdraw_attributes</a>   (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
110                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
111                                                          <em class="parameter"><code><a href="../cogl/cogl-Vertex-Buffers.html#CoglVerticesMode"><span class="type">CoglVerticesMode</span></a> mode</code></em>,
112                                                          <em class="parameter"><code><span class="type">int</span> first_vertex</code></em>,
113                                                          <em class="parameter"><code><span class="type">int</span> n_vertices</code></em>,
114                                                          <em class="parameter"><code>...</code></em>);
115 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-indexed-attributes" title="cogl_framebuffer_draw_indexed_attributes ()">cogl_framebuffer_draw_indexed_attributes</a>
116                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
117                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
118                                                          <em class="parameter"><code><a href="../cogl/cogl-Vertex-Buffers.html#CoglVerticesMode"><span class="type">CoglVerticesMode</span></a> mode</code></em>,
119                                                          <em class="parameter"><code><span class="type">int</span> first_vertex</code></em>,
120                                                          <em class="parameter"><code><span class="type">int</span> n_vertices</code></em>,
121                                                          <em class="parameter"><code><span class="type">CoglIndices</span> *indices</code></em>,
122                                                          <em class="parameter"><code><span class="type">CoglAttribute</span> **attributes</code></em>,
123                                                          <em class="parameter"><code><span class="type">int</span> n_attributes</code></em>);
124 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-vdraw-indexed-attributes" title="cogl_framebuffer_vdraw_indexed_attributes ()">cogl_framebuffer_vdraw_indexed_attributes</a>
125                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
126                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
127                                                          <em class="parameter"><code><a href="../cogl/cogl-Vertex-Buffers.html#CoglVerticesMode"><span class="type">CoglVerticesMode</span></a> mode</code></em>,
128                                                          <em class="parameter"><code><span class="type">int</span> first_vertex</code></em>,
129                                                          <em class="parameter"><code><span class="type">int</span> n_vertices</code></em>,
130                                                          <em class="parameter"><code><span class="type">CoglIndices</span> *indices</code></em>,
131                                                          <em class="parameter"><code>...</code></em>);
132 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-rectangle" title="cogl_framebuffer_draw_rectangle ()">cogl_framebuffer_draw_rectangle</a>     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
133                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
134                                                          <em class="parameter"><code><span class="type">float</span> x_1</code></em>,
135                                                          <em class="parameter"><code><span class="type">float</span> y_1</code></em>,
136                                                          <em class="parameter"><code><span class="type">float</span> x_2</code></em>,
137                                                          <em class="parameter"><code><span class="type">float</span> y_2</code></em>);
138 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-textured-rectangle" title="cogl_framebuffer_draw_textured_rectangle ()">cogl_framebuffer_draw_textured_rectangle</a>
139                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
140                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
141                                                          <em class="parameter"><code><span class="type">float</span> x_1</code></em>,
142                                                          <em class="parameter"><code><span class="type">float</span> y_1</code></em>,
143                                                          <em class="parameter"><code><span class="type">float</span> x_2</code></em>,
144                                                          <em class="parameter"><code><span class="type">float</span> y_2</code></em>,
145                                                          <em class="parameter"><code><span class="type">float</span> s_1</code></em>,
146                                                          <em class="parameter"><code><span class="type">float</span> t_1</code></em>,
147                                                          <em class="parameter"><code><span class="type">float</span> s_2</code></em>,
148                                                          <em class="parameter"><code><span class="type">float</span> t_2</code></em>);
149 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-multitextured-rectangle" title="cogl_framebuffer_draw_multitextured_rectangle ()">cogl_framebuffer_draw_multitextured_rectangle</a>
150                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
151                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
152                                                          <em class="parameter"><code><span class="type">float</span> x_1</code></em>,
153                                                          <em class="parameter"><code><span class="type">float</span> y_1</code></em>,
154                                                          <em class="parameter"><code><span class="type">float</span> x_2</code></em>,
155                                                          <em class="parameter"><code><span class="type">float</span> y_2</code></em>,
156                                                          <em class="parameter"><code>const <span class="type">float</span> *tex_coords</code></em>,
157                                                          <em class="parameter"><code><span class="type">int</span> tex_coords_len</code></em>);
158 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-rectangles" title="cogl_framebuffer_draw_rectangles ()">cogl_framebuffer_draw_rectangles</a>    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
159                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
160                                                          <em class="parameter"><code>const <span class="type">float</span> *verts</code></em>,
161                                                          <em class="parameter"><code>unsigned <span class="type">int</span> n_rects</code></em>);
162 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-textured-rectangles" title="cogl_framebuffer_draw_textured_rectangles ()">cogl_framebuffer_draw_textured_rectangles</a>
163                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
164                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
165                                                          <em class="parameter"><code>const <span class="type">float</span> *coordinates</code></em>,
166                                                          <em class="parameter"><code>unsigned <span class="type">int</span> n_rectangles</code></em>);
167
168 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-finish" title="cogl_framebuffer_finish ()">cogl_framebuffer_finish</a>             (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
169
170 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-push-matrix" title="cogl_framebuffer_push_matrix ()">cogl_framebuffer_push_matrix</a>        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
171 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-pop-matrix" title="cogl_framebuffer_pop_matrix ()">cogl_framebuffer_pop_matrix</a>         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
172 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-identity-matrix" title="cogl_framebuffer_identity_matrix ()">cogl_framebuffer_identity_matrix</a>    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
173 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-scale" title="cogl_framebuffer_scale ()">cogl_framebuffer_scale</a>              (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
174                                                          <em class="parameter"><code><span class="type">float</span> x</code></em>,
175                                                          <em class="parameter"><code><span class="type">float</span> y</code></em>,
176                                                          <em class="parameter"><code><span class="type">float</span> z</code></em>);
177 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-translate" title="cogl_framebuffer_translate ()">cogl_framebuffer_translate</a>          (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
178                                                          <em class="parameter"><code><span class="type">float</span> x</code></em>,
179                                                          <em class="parameter"><code><span class="type">float</span> y</code></em>,
180                                                          <em class="parameter"><code><span class="type">float</span> z</code></em>);
181 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-rotate" title="cogl_framebuffer_rotate ()">cogl_framebuffer_rotate</a>             (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
182                                                          <em class="parameter"><code><span class="type">float</span> angle</code></em>,
183                                                          <em class="parameter"><code><span class="type">float</span> x</code></em>,
184                                                          <em class="parameter"><code><span class="type">float</span> y</code></em>,
185                                                          <em class="parameter"><code><span class="type">float</span> z</code></em>);
186 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-transform" title="cogl_framebuffer_transform ()">cogl_framebuffer_transform</a>          (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
187                                                          <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
188 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-modelview-matrix" title="cogl_framebuffer_get_modelview_matrix ()">cogl_framebuffer_get_modelview_matrix</a>
189                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
190                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
191 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-set-modelview-matrix" title="cogl_framebuffer_set_modelview_matrix ()">cogl_framebuffer_set_modelview_matrix</a>
192                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
193                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
194
195 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-perspective" title="cogl_framebuffer_perspective ()">cogl_framebuffer_perspective</a>        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
196                                                          <em class="parameter"><code><span class="type">float</span> fov_y</code></em>,
197                                                          <em class="parameter"><code><span class="type">float</span> aspect</code></em>,
198                                                          <em class="parameter"><code><span class="type">float</span> z_near</code></em>,
199                                                          <em class="parameter"><code><span class="type">float</span> z_far</code></em>);
200 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-frustum" title="cogl_framebuffer_frustum ()">cogl_framebuffer_frustum</a>            (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
201                                                          <em class="parameter"><code><span class="type">float</span> left</code></em>,
202                                                          <em class="parameter"><code><span class="type">float</span> right</code></em>,
203                                                          <em class="parameter"><code><span class="type">float</span> bottom</code></em>,
204                                                          <em class="parameter"><code><span class="type">float</span> top</code></em>,
205                                                          <em class="parameter"><code><span class="type">float</span> z_near</code></em>,
206                                                          <em class="parameter"><code><span class="type">float</span> z_far</code></em>);
207 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-orthographic" title="cogl_framebuffer_orthographic ()">cogl_framebuffer_orthographic</a>       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
208                                                          <em class="parameter"><code><span class="type">float</span> x_1</code></em>,
209                                                          <em class="parameter"><code><span class="type">float</span> y_1</code></em>,
210                                                          <em class="parameter"><code><span class="type">float</span> x_2</code></em>,
211                                                          <em class="parameter"><code><span class="type">float</span> y_2</code></em>,
212                                                          <em class="parameter"><code><span class="type">float</span> near</code></em>,
213                                                          <em class="parameter"><code><span class="type">float</span> far</code></em>);
214 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-get-projection-matrix" title="cogl_framebuffer_get_projection_matrix ()">cogl_framebuffer_get_projection_matrix</a>
215                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
216                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
217 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-set-projection-matrix" title="cogl_framebuffer_set_projection_matrix ()">cogl_framebuffer_set_projection_matrix</a>
218                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
219                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);
220
221 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-push-scissor-clip" title="cogl_framebuffer_push_scissor_clip ()">cogl_framebuffer_push_scissor_clip</a>  (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
222                                                          <em class="parameter"><code><span class="type">int</span> x</code></em>,
223                                                          <em class="parameter"><code><span class="type">int</span> y</code></em>,
224                                                          <em class="parameter"><code><span class="type">int</span> width</code></em>,
225                                                          <em class="parameter"><code><span class="type">int</span> height</code></em>);
226 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-push-rectangle-clip" title="cogl_framebuffer_push_rectangle_clip ()">cogl_framebuffer_push_rectangle_clip</a>
227                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
228                                                          <em class="parameter"><code><span class="type">float</span> x_1</code></em>,
229                                                          <em class="parameter"><code><span class="type">float</span> y_1</code></em>,
230                                                          <em class="parameter"><code><span class="type">float</span> x_2</code></em>,
231                                                          <em class="parameter"><code><span class="type">float</span> y_2</code></em>);
232 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-push-primitive-clip" title="cogl_framebuffer_push_primitive_clip ()">cogl_framebuffer_push_primitive_clip</a>
233                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
234                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Primitives.html#CoglPrimitive" title="CoglPrimitive"><span class="type">CoglPrimitive</span></a> *primitive</code></em>,
235                                                          <em class="parameter"><code><span class="type">float</span> bounds_x1</code></em>,
236                                                          <em class="parameter"><code><span class="type">float</span> bounds_y1</code></em>,
237                                                          <em class="parameter"><code><span class="type">float</span> bounds_x2</code></em>,
238                                                          <em class="parameter"><code><span class="type">float</span> bounds_y2</code></em>);
239 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-pop-clip" title="cogl_framebuffer_pop_clip ()">cogl_framebuffer_pop_clip</a>           (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);
240
241 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="returnvalue">CoglFramebuffer</span></a> *   <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-get-draw-framebuffer" title="cogl_get_draw_framebuffer ()">cogl_get_draw_framebuffer</a>           (<em class="parameter"><code><span class="type">void</span></code></em>);
242 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-set-framebuffer" title="cogl_set_framebuffer ()">cogl_set_framebuffer</a>                (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *buffer</code></em>);
243 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-push-framebuffer" title="cogl_push_framebuffer ()">cogl_push_framebuffer</a>               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *buffer</code></em>);
244 <span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-pop-framebuffer" title="cogl_pop_framebuffer ()">cogl_pop_framebuffer</a>                (<em class="parameter"><code><span class="type">void</span></code></em>);
245 </pre>
246 </div>
247 <div class="refsect1">
248 <a name="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.description"></a><h2>Description</h2>
249 <p>
250 Framebuffers are a collection of buffers that can be rendered too.
251 A framebuffer may be comprised of one or more color buffers, an
252 optional depth buffer and an optional stencil buffer. Other
253 configuration parameters are associated with framebuffers too such
254 as whether the framebuffer supports multi-sampling (an anti-aliasing
255 technique) or dithering.
256 </p>
257 <p>
258 There are two kinds of framebuffer in Cogl, <span class="type">CoglOnscreen</span>
259 framebuffers and <span class="type">CoglOffscreen</span> framebuffers. As the names imply
260 offscreen framebuffers are for rendering something offscreen
261 (perhaps to a texture which is bound as one of the color buffers).
262 The exact semantics of onscreen framebuffers depends on the window
263 system backend that you are using, but typically you can expect
264 rendering to a <span class="type">CoglOnscreen</span> framebuffer will be immediately
265 visible to the user.
266 </p>
267 <p>
268 If you want to create a new framebuffer then you should start by
269 looking at the <span class="type">CoglOnscreen</span> and <span class="type">CoglOffscreen</span> constructor
270 functions, such as <a class="link" href="cogl-2.0-experimental-Offscreen-Framebuffers.html#cogl-offscreen-new-to-texture" title="cogl_offscreen_new_to_texture ()"><code class="function">cogl_offscreen_new_to_texture()</code></a> or
271 <code class="function">cogl_onscreen_new()</code>. The <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> interface deals with
272 all aspects that are common between those two types of framebuffer.
273 </p>
274 <p>
275 Setup of a new CoglFramebuffer happens in two stages. There is a
276 configuration stage where you specify all the options and ancillary
277 buffers you want associated with your framebuffer and then when you
278 are happy with the configuration you can "allocate" the framebuffer
279 using <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-allocate" title="cogl_framebuffer_allocate ()"><code class="function">cogl_framebuffer_allocate()</code></a>. Technically explicitly calling
280 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-allocate" title="cogl_framebuffer_allocate ()"><code class="function">cogl_framebuffer_allocate()</code></a> is optional for convenience and the
281 framebuffer will automatically be allocated when you first try to
282 draw to it, but if you do the allocation manually then you can
283 also catch any possible errors that may arise from your
284 configuration.
285 </p>
286 </div>
287 <div class="refsect1">
288 <a name="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.details"></a><h2>Details</h2>
289 <div class="refsect2">
290 <a name="CoglFramebuffer"></a><h3>CoglFramebuffer</h3>
291 <pre class="programlisting">typedef struct _CoglFramebuffer CoglFramebuffer;</pre>
292 </div>
293 <hr>
294 <div class="refsect2">
295 <a name="COGL-FRAMEBUFFER:CAPS"></a><h3>COGL_FRAMEBUFFER()</h3>
296 <pre class="programlisting">#define COGL_FRAMEBUFFER(X) ((CoglFramebuffer *)(X))
297 </pre>
298 </div>
299 <hr>
300 <div class="refsect2">
301 <a name="cogl-framebuffer-allocate"></a><h3>cogl_framebuffer_allocate ()</h3>
302 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            cogl_framebuffer_allocate           (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
303                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
304 <p>
305 Explicitly allocates a configured <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> allowing developers to
306 check and handle any errors that might arise from an unsupported
307 configuration so that fallback configurations may be tried.
308 </p>
309 <p>
310 </p>
311 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
312 <h3 class="title">Note</h3>Many applications don't support any fallback options at least when
313 they are initially developed and in that case the don't need to use this API
314 since Cogl will automatically allocate a framebuffer when it first gets
315 used.  The disadvantage of relying on automatic allocation is that the
316 program will abort with an error message if there is an error during
317 automatic allocation.</div>
318 <p>
319 </p>
320 <div class="variablelist"><table border="0">
321 <col align="left" valign="top">
322 <tbody>
323 <tr>
324 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
325 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
326 </td>
327 </tr>
328 <tr>
329 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
330 <td>A pointer to a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for returning exceptions.</td>
331 </tr>
332 <tr>
333 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
334 <td>
335 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there were no error allocating the framebuffer, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</td>
336 </tr>
337 </tbody>
338 </table></div>
339 <p class="since">Since 1.8</p>
340 <p class="stability">Stability Level: Unstable</p>
341 </div>
342 <hr>
343 <div class="refsect2">
344 <a name="cogl-framebuffer-get-width"></a><h3>cogl_framebuffer_get_width ()</h3>
345 <pre class="programlisting"><span class="returnvalue">int</span>                 cogl_framebuffer_get_width          (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
346 <p>
347 Queries the current width of the given <em class="parameter"><code>framebuffer</code></em>.
348 </p>
349 <div class="variablelist"><table border="0">
350 <col align="left" valign="top">
351 <tbody>
352 <tr>
353 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
354 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
355 </td>
356 </tr>
357 <tr>
358 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
359 <td>The width of <em class="parameter"><code>framebuffer</code></em>.</td>
360 </tr>
361 </tbody>
362 </table></div>
363 <p class="since">Since 1.8</p>
364 <p class="stability">Stability Level: Unstable</p>
365 </div>
366 <hr>
367 <div class="refsect2">
368 <a name="cogl-framebuffer-get-height"></a><h3>cogl_framebuffer_get_height ()</h3>
369 <pre class="programlisting"><span class="returnvalue">int</span>                 cogl_framebuffer_get_height         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
370 <p>
371 Queries the current height of the given <em class="parameter"><code>framebuffer</code></em>.
372 </p>
373 <div class="variablelist"><table border="0">
374 <col align="left" valign="top">
375 <tbody>
376 <tr>
377 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
378 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
379 </td>
380 </tr>
381 <tr>
382 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
383 <td>The height of <em class="parameter"><code>framebuffer</code></em>.</td>
384 </tr>
385 </tbody>
386 </table></div>
387 <p class="since">Since 1.8</p>
388 <p class="stability">Stability Level: Unstable</p>
389 </div>
390 <hr>
391 <div class="refsect2">
392 <a name="cogl-framebuffer-set-viewport"></a><h3>cogl_framebuffer_set_viewport ()</h3>
393 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_set_viewport       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
394                                                          <em class="parameter"><code><span class="type">float</span> x</code></em>,
395                                                          <em class="parameter"><code><span class="type">float</span> y</code></em>,
396                                                          <em class="parameter"><code><span class="type">float</span> width</code></em>,
397                                                          <em class="parameter"><code><span class="type">float</span> height</code></em>);</pre>
398 <p>
399 Defines a scale and offset for everything rendered relative to the
400 top-left of the destination framebuffer.
401 </p>
402 <p>
403 By default the viewport has an origin of (0,0) and width and height
404 that match the framebuffer's size. Assuming a default projection and
405 modelview matrix then you could translate the contents of a window
406 down and right by leaving the viewport size unchanged by moving the
407 offset to (10,10). The viewport coordinates are measured in pixels.
408 If you left the x and y origin as (0,0) you could scale the windows
409 contents down by specify and width and height that's half the real
410 size of the framebuffer.
411 </p>
412 <p>
413 </p>
414 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
415 <h3 class="title">Note</h3>Although the function takes floating point arguments, existing
416 drivers only allow the use of integer values. In the future floating
417 point values will be exposed via a checkable feature.</div>
418 <p>
419 </p>
420 <div class="variablelist"><table border="0">
421 <col align="left" valign="top">
422 <tbody>
423 <tr>
424 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
425 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
426 </td>
427 </tr>
428 <tr>
429 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
430 <td>The top-left x coordinate of the viewport origin (only integers
431 supported currently)</td>
432 </tr>
433 <tr>
434 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
435 <td>The top-left y coordinate of the viewport origin (only integers
436 supported currently)</td>
437 </tr>
438 <tr>
439 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
440 <td>The width of the viewport (only integers supported currently)</td>
441 </tr>
442 <tr>
443 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
444 <td>The height of the viewport (only integers supported currently)</td>
445 </tr>
446 </tbody>
447 </table></div>
448 <p class="since">Since 1.8</p>
449 <p class="stability">Stability Level: Unstable</p>
450 </div>
451 <hr>
452 <div class="refsect2">
453 <a name="cogl-framebuffer-get-viewport-x"></a><h3>cogl_framebuffer_get_viewport_x ()</h3>
454 <pre class="programlisting"><span class="returnvalue">float</span>               cogl_framebuffer_get_viewport_x     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
455 <p>
456 Queries the x coordinate of the viewport origin as set using <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-set-viewport" title="cogl_framebuffer_set_viewport ()"><code class="function">cogl_framebuffer_set_viewport()</code></a>
457 or the default value which is <code class="literal">0</code>.
458 </p>
459 <div class="variablelist"><table border="0">
460 <col align="left" valign="top">
461 <tbody>
462 <tr>
463 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
464 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
465 </td>
466 </tr>
467 <tr>
468 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
469 <td>The x coordinate of the viewport origin.</td>
470 </tr>
471 </tbody>
472 </table></div>
473 <p class="since">Since 1.8</p>
474 <p class="stability">Stability Level: Unstable</p>
475 </div>
476 <hr>
477 <div class="refsect2">
478 <a name="cogl-framebuffer-get-viewport-y"></a><h3>cogl_framebuffer_get_viewport_y ()</h3>
479 <pre class="programlisting"><span class="returnvalue">float</span>               cogl_framebuffer_get_viewport_y     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
480 <p>
481 Queries the y coordinate of the viewport origin as set using <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-set-viewport" title="cogl_framebuffer_set_viewport ()"><code class="function">cogl_framebuffer_set_viewport()</code></a>
482 or the default value which is <code class="literal">0</code>.
483 </p>
484 <div class="variablelist"><table border="0">
485 <col align="left" valign="top">
486 <tbody>
487 <tr>
488 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
489 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
490 </td>
491 </tr>
492 <tr>
493 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
494 <td>The y coordinate of the viewport origin.</td>
495 </tr>
496 </tbody>
497 </table></div>
498 <p class="since">Since 1.8</p>
499 <p class="stability">Stability Level: Unstable</p>
500 </div>
501 <hr>
502 <div class="refsect2">
503 <a name="cogl-framebuffer-get-viewport-width"></a><h3>cogl_framebuffer_get_viewport_width ()</h3>
504 <pre class="programlisting"><span class="returnvalue">float</span>               cogl_framebuffer_get_viewport_width (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
505 <p>
506 Queries the width of the viewport as set using <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-set-viewport" title="cogl_framebuffer_set_viewport ()"><code class="function">cogl_framebuffer_set_viewport()</code></a>
507 or the default value which is the width of the framebuffer.
508 </p>
509 <div class="variablelist"><table border="0">
510 <col align="left" valign="top">
511 <tbody>
512 <tr>
513 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
514 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
515 </td>
516 </tr>
517 <tr>
518 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
519 <td>The width of the viewport.</td>
520 </tr>
521 </tbody>
522 </table></div>
523 <p class="since">Since 1.8</p>
524 <p class="stability">Stability Level: Unstable</p>
525 </div>
526 <hr>
527 <div class="refsect2">
528 <a name="cogl-framebuffer-get-viewport-height"></a><h3>cogl_framebuffer_get_viewport_height ()</h3>
529 <pre class="programlisting"><span class="returnvalue">float</span>               cogl_framebuffer_get_viewport_height
530                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
531 <p>
532 Queries the height of the viewport as set using <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-set-viewport" title="cogl_framebuffer_set_viewport ()"><code class="function">cogl_framebuffer_set_viewport()</code></a>
533 or the default value which is the height of the framebuffer.
534 </p>
535 <div class="variablelist"><table border="0">
536 <col align="left" valign="top">
537 <tbody>
538 <tr>
539 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
540 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
541 </td>
542 </tr>
543 <tr>
544 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
545 <td>The height of the viewport.</td>
546 </tr>
547 </tbody>
548 </table></div>
549 <p class="since">Since 1.8</p>
550 <p class="stability">Stability Level: Unstable</p>
551 </div>
552 <hr>
553 <div class="refsect2">
554 <a name="cogl-framebuffer-get-viewport4fv"></a><h3>cogl_framebuffer_get_viewport4fv ()</h3>
555 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_get_viewport4fv    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
556                                                          <em class="parameter"><code><span class="type">float</span> *viewport</code></em>);</pre>
557 <p>
558 Queries the x, y, width and height components of the current viewport as set
559 using <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-set-viewport" title="cogl_framebuffer_set_viewport ()"><code class="function">cogl_framebuffer_set_viewport()</code></a> or the default values which are 0, 0,
560 framebuffer_width and framebuffer_height.  The values are written into the
561 given <em class="parameter"><code>viewport</code></em> array.
562 </p>
563 <div class="variablelist"><table border="0">
564 <col align="left" valign="top">
565 <tbody>
566 <tr>
567 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
568 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
569 </td>
570 </tr>
571 <tr>
572 <td><p><span class="term"><em class="parameter"><code>viewport</code></em> :</span></p></td>
573 <td>A pointer to an array of 4 floats to receive the (x, y, width, height)
574 components of the current viewport.</td>
575 </tr>
576 </tbody>
577 </table></div>
578 <p class="since">Since 1.8</p>
579 <p class="stability">Stability Level: Unstable</p>
580 </div>
581 <hr>
582 <div class="refsect2">
583 <a name="cogl-framebuffer-get-color-format"></a><h3>cogl_framebuffer_get_color_format ()</h3>
584 <pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a>     cogl_framebuffer_get_color_format   (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
585 <p>
586 Queries the common <a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> of all color buffers attached
587 to this framebuffer. For an offscreen framebuffer created with
588 <a class="link" href="cogl-2.0-experimental-Offscreen-Framebuffers.html#cogl-offscreen-new-to-texture" title="cogl_offscreen_new_to_texture ()"><code class="function">cogl_offscreen_new_to_texture()</code></a> this will correspond to the format
589 of the texture.
590 </p>
591 <div class="variablelist"><table border="0">
592 <col align="left" valign="top">
593 <tbody><tr>
594 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
595 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> framebuffer</td>
596 </tr></tbody>
597 </table></div>
598 <p class="since">Since 1.8</p>
599 <p class="stability">Stability Level: Unstable</p>
600 </div>
601 <hr>
602 <div class="refsect2">
603 <a name="cogl-framebuffer-get-red-bits"></a><h3>cogl_framebuffer_get_red_bits ()</h3>
604 <pre class="programlisting"><span class="returnvalue">int</span>                 cogl_framebuffer_get_red_bits       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
605 <p>
606 Retrieves the number of red bits of <em class="parameter"><code>framebuffer</code></em>
607 </p>
608 <div class="variablelist"><table border="0">
609 <col align="left" valign="top">
610 <tbody>
611 <tr>
612 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
613 <td>a pointer to a <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
614 </td>
615 </tr>
616 <tr>
617 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
618 <td>the number of bits</td>
619 </tr>
620 </tbody>
621 </table></div>
622 <p class="since">Since 1.8</p>
623 <p class="stability">Stability Level: Unstable</p>
624 </div>
625 <hr>
626 <div class="refsect2">
627 <a name="cogl-framebuffer-get-green-bits"></a><h3>cogl_framebuffer_get_green_bits ()</h3>
628 <pre class="programlisting"><span class="returnvalue">int</span>                 cogl_framebuffer_get_green_bits     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
629 <p>
630 Retrieves the number of green bits of <em class="parameter"><code>framebuffer</code></em>
631 </p>
632 <div class="variablelist"><table border="0">
633 <col align="left" valign="top">
634 <tbody>
635 <tr>
636 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
637 <td>a pointer to a <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
638 </td>
639 </tr>
640 <tr>
641 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
642 <td>the number of bits</td>
643 </tr>
644 </tbody>
645 </table></div>
646 <p class="since">Since 1.8</p>
647 <p class="stability">Stability Level: Unstable</p>
648 </div>
649 <hr>
650 <div class="refsect2">
651 <a name="cogl-framebuffer-get-blue-bits"></a><h3>cogl_framebuffer_get_blue_bits ()</h3>
652 <pre class="programlisting"><span class="returnvalue">int</span>                 cogl_framebuffer_get_blue_bits      (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
653 <p>
654 Retrieves the number of blue bits of <em class="parameter"><code>framebuffer</code></em>
655 </p>
656 <div class="variablelist"><table border="0">
657 <col align="left" valign="top">
658 <tbody>
659 <tr>
660 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
661 <td>a pointer to a <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
662 </td>
663 </tr>
664 <tr>
665 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
666 <td>the number of bits</td>
667 </tr>
668 </tbody>
669 </table></div>
670 <p class="since">Since 1.8</p>
671 <p class="stability">Stability Level: Unstable</p>
672 </div>
673 <hr>
674 <div class="refsect2">
675 <a name="cogl-framebuffer-get-color-mask"></a><h3>cogl_framebuffer_get_color_mask ()</h3>
676 <pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglColorMask" title="enum CoglColorMask"><span class="returnvalue">CoglColorMask</span></a>       cogl_framebuffer_get_color_mask     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
677 <p>
678 Gets the current <a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglColorMask" title="enum CoglColorMask"><span class="type">CoglColorMask</span></a> of which channels would be written to the
679 current framebuffer. Each bit set in the mask means that the
680 corresponding color would be written.
681 </p>
682 <div class="variablelist"><table border="0">
683 <col align="left" valign="top">
684 <tbody>
685 <tr>
686 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
687 <td>a pointer to a <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
688 </td>
689 </tr>
690 <tr>
691 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
692 <td>A <a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglColorMask" title="enum CoglColorMask"><span class="type">CoglColorMask</span></a>
693 </td>
694 </tr>
695 </tbody>
696 </table></div>
697 <p class="since">Since 1.8</p>
698 <p class="stability">Stability Level: Unstable</p>
699 </div>
700 <hr>
701 <div class="refsect2">
702 <a name="cogl-framebuffer-set-color-mask"></a><h3>cogl_framebuffer_set_color_mask ()</h3>
703 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_set_color_mask     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
704                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglColorMask" title="enum CoglColorMask"><span class="type">CoglColorMask</span></a> color_mask</code></em>);</pre>
705 <p>
706 Defines a bit mask of which color channels should be written to the
707 given <em class="parameter"><code>framebuffer</code></em>. If a bit is set in <em class="parameter"><code>color_mask</code></em> that means that
708 color will be written.
709 </p>
710 <div class="variablelist"><table border="0">
711 <col align="left" valign="top">
712 <tbody>
713 <tr>
714 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
715 <td>a pointer to a <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
716 </td>
717 </tr>
718 <tr>
719 <td><p><span class="term"><em class="parameter"><code>color_mask</code></em> :</span></p></td>
720 <td>A <a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglColorMask" title="enum CoglColorMask"><span class="type">CoglColorMask</span></a> of which color channels to write to
721 the current framebuffer.</td>
722 </tr>
723 </tbody>
724 </table></div>
725 <p class="since">Since 1.8</p>
726 <p class="stability">Stability Level: Unstable</p>
727 </div>
728 <hr>
729 <div class="refsect2">
730 <a name="cogl-framebuffer-resolve-samples"></a><h3>cogl_framebuffer_resolve_samples ()</h3>
731 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_resolve_samples    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
732 <p>
733 When point sample rendering (also known as multisample rendering)
734 has been enabled via <code class="function">cogl_framebuffer_set_samples_per_pixel()</code>
735 then you can optionally call this function (or
736 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-resolve-samples-region" title="cogl_framebuffer_resolve_samples_region ()"><code class="function">cogl_framebuffer_resolve_samples_region()</code></a>) to explicitly resolve
737 the point samples into values for the final color buffer.
738 </p>
739 <p>
740 Some GPUs will implicitly resolve the point samples during
741 rendering and so this function is effectively a nop, but with other
742 architectures it is desirable to defer the resolve step until the
743 end of the frame.
744 </p>
745 <p>
746 Since Cogl will automatically ensure samples are resolved if the
747 target color buffer is used as a source this API only needs to be
748 used if explicit control is desired - perhaps because you want to
749 ensure that the resolve is completed in advance to avoid later
750 having to wait for the resolve to complete.
751 </p>
752 <p>
753 If you are performing incremental updates to a framebuffer you
754 should consider using <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-resolve-samples-region" title="cogl_framebuffer_resolve_samples_region ()"><code class="function">cogl_framebuffer_resolve_samples_region()</code></a>
755 instead to avoid resolving redundant pixels.
756 </p>
757 <div class="variablelist"><table border="0">
758 <col align="left" valign="top">
759 <tbody><tr>
760 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
761 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> framebuffer</td>
762 </tr></tbody>
763 </table></div>
764 <p class="since">Since 1.8</p>
765 <p class="stability">Stability Level: Unstable</p>
766 </div>
767 <hr>
768 <div class="refsect2">
769 <a name="cogl-framebuffer-resolve-samples-region"></a><h3>cogl_framebuffer_resolve_samples_region ()</h3>
770 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_resolve_samples_region
771                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
772                                                          <em class="parameter"><code><span class="type">int</span> x</code></em>,
773                                                          <em class="parameter"><code><span class="type">int</span> y</code></em>,
774                                                          <em class="parameter"><code><span class="type">int</span> width</code></em>,
775                                                          <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
776 <p>
777 When point sample rendering (also known as multisample rendering)
778 has been enabled via <code class="function">cogl_framebuffer_set_samples_per_pixel()</code>
779 then you can optionally call this function (or
780 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-resolve-samples" title="cogl_framebuffer_resolve_samples ()"><code class="function">cogl_framebuffer_resolve_samples()</code></a>) to explicitly resolve the point
781 samples into values for the final color buffer.
782 </p>
783 <p>
784 Some GPUs will implicitly resolve the point samples during
785 rendering and so this function is effectively a nop, but with other
786 architectures it is desirable to defer the resolve step until the
787 end of the frame.
788 </p>
789 <p>
790 Use of this API is recommended if incremental, small updates to
791 a framebuffer are being made because by default Cogl will
792 implicitly resolve all the point samples of the framebuffer which
793 can result in redundant work if only a small number of samples have
794 changed.
795 </p>
796 <p>
797 Because some GPUs implicitly resolve point samples this function
798 only guarantees that at-least the region specified will be resolved
799 and if you have rendered to a larger region then it's possible that
800 other samples may be implicitly resolved.
801 </p>
802 <div class="variablelist"><table border="0">
803 <col align="left" valign="top">
804 <tbody>
805 <tr>
806 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
807 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> framebuffer</td>
808 </tr>
809 <tr>
810 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
811 <td>top-left x coordinate of region to resolve</td>
812 </tr>
813 <tr>
814 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
815 <td>top-left y coordinate of region to resolve</td>
816 </tr>
817 <tr>
818 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
819 <td>width of region to resolve</td>
820 </tr>
821 <tr>
822 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
823 <td>height of region to resolve</td>
824 </tr>
825 </tbody>
826 </table></div>
827 <p class="since">Since 1.8</p>
828 <p class="stability">Stability Level: Unstable</p>
829 </div>
830 <hr>
831 <div class="refsect2">
832 <a name="cogl-framebuffer-get-context"></a><h3>cogl_framebuffer_get_context ()</h3>
833 <pre class="programlisting"><span class="returnvalue">CoglContext</span> *       cogl_framebuffer_get_context        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
834 </div>
835 <hr>
836 <div class="refsect2">
837 <a name="cogl-framebuffer-clear"></a><h3>cogl_framebuffer_clear ()</h3>
838 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_clear              (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
839                                                          <em class="parameter"><code><span class="type">unsigned long </span> buffers</code></em>,
840                                                          <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-Color-Type.html#CoglColor" title="struct CoglColor"><span class="type">CoglColor</span></a> *color</code></em>);</pre>
841 <p>
842 Clears all the auxiliary buffers identified in the <em class="parameter"><code>buffers</code></em> mask, and if
843 that includes the color buffer then the specified <em class="parameter"><code>color</code></em> is used.
844 </p>
845 <div class="variablelist"><table border="0">
846 <col align="left" valign="top">
847 <tbody>
848 <tr>
849 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
850 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
851 </td>
852 </tr>
853 <tr>
854 <td><p><span class="term"><em class="parameter"><code>buffers</code></em> :</span></p></td>
855 <td>A mask of <a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBufferBit" title="enum CoglBufferBit"><span class="type">CoglBufferBit</span></a>'s identifying which auxiliary
856 buffers to clear</td>
857 </tr>
858 <tr>
859 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
860 <td>The color to clear the color buffer too if specified in
861 <em class="parameter"><code>buffers</code></em>.</td>
862 </tr>
863 </tbody>
864 </table></div>
865 <p class="since">Since 1.8</p>
866 <p class="stability">Stability Level: Unstable</p>
867 </div>
868 <hr>
869 <div class="refsect2">
870 <a name="cogl-framebuffer-clear4f"></a><h3>cogl_framebuffer_clear4f ()</h3>
871 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_clear4f            (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
872                                                          <em class="parameter"><code><span class="type">unsigned long </span> buffers</code></em>,
873                                                          <em class="parameter"><code><span class="type">float</span> red</code></em>,
874                                                          <em class="parameter"><code><span class="type">float</span> green</code></em>,
875                                                          <em class="parameter"><code><span class="type">float</span> blue</code></em>,
876                                                          <em class="parameter"><code><span class="type">float</span> alpha</code></em>);</pre>
877 <p>
878 Clears all the auxiliary buffers identified in the <em class="parameter"><code>buffers</code></em> mask, and if
879 that includes the color buffer then the specified <em class="parameter"><code>color</code></em> is used.
880 </p>
881 <div class="variablelist"><table border="0">
882 <col align="left" valign="top">
883 <tbody>
884 <tr>
885 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
886 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
887 </td>
888 </tr>
889 <tr>
890 <td><p><span class="term"><em class="parameter"><code>buffers</code></em> :</span></p></td>
891 <td>A mask of <a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBufferBit" title="enum CoglBufferBit"><span class="type">CoglBufferBit</span></a>'s identifying which auxiliary
892 buffers to clear</td>
893 </tr>
894 <tr>
895 <td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
896 <td>The red component of color to clear the color buffer too if
897 specified in <em class="parameter"><code>buffers</code></em>.</td>
898 </tr>
899 <tr>
900 <td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
901 <td>The green component of color to clear the color buffer too if
902 specified in <em class="parameter"><code>buffers</code></em>.</td>
903 </tr>
904 <tr>
905 <td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
906 <td>The blue component of color to clear the color buffer too if
907 specified in <em class="parameter"><code>buffers</code></em>.</td>
908 </tr>
909 <tr>
910 <td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
911 <td>The alpha component of color to clear the color buffer too if
912 specified in <em class="parameter"><code>buffers</code></em>.</td>
913 </tr>
914 </tbody>
915 </table></div>
916 <p class="since">Since 1.8</p>
917 <p class="stability">Stability Level: Unstable</p>
918 </div>
919 <hr>
920 <div class="refsect2">
921 <a name="cogl-framebuffer-read-pixels-into-bitmap"></a><h3>cogl_framebuffer_read_pixels_into_bitmap ()</h3>
922 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            cogl_framebuffer_read_pixels_into_bitmap
923                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
924                                                          <em class="parameter"><code><span class="type">int</span> x</code></em>,
925                                                          <em class="parameter"><code><span class="type">int</span> y</code></em>,
926                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#CoglReadPixelsFlags" title="enum CoglReadPixelsFlags"><span class="type">CoglReadPixelsFlags</span></a> source</code></em>,
927                                                          <em class="parameter"><code><a href="../cogl/cogl-Bitmaps.html#CoglBitmap"><span class="type">CoglBitmap</span></a> *bitmap</code></em>);</pre>
928 <p>
929 This reads a rectangle of pixels from the given framebuffer where
930 position (0, 0) is the top left. The pixel at (x, y) is the first
931 read, and a rectangle of pixels with the same size as the bitmap is
932 read right and downwards from that point.
933 </p>
934 <p>
935 Currently Cogl assumes that the framebuffer is in a premultiplied
936 format so if the format of <em class="parameter"><code>bitmap</code></em> is non-premultiplied it will
937 convert it. To read the pixel values without any conversion you
938 should either specify a format that doesn't use an alpha channel or
939 use one of the formats ending in PRE.
940 </p>
941 <div class="variablelist"><table border="0">
942 <col align="left" valign="top">
943 <tbody>
944 <tr>
945 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
946 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
947 </td>
948 </tr>
949 <tr>
950 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
951 <td>The x position to read from</td>
952 </tr>
953 <tr>
954 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
955 <td>The y position to read from</td>
956 </tr>
957 <tr>
958 <td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
959 <td>Identifies which auxillary buffer you want to read
960 (only COGL_READ_PIXELS_COLOR_BUFFER supported currently)</td>
961 </tr>
962 <tr>
963 <td><p><span class="term"><em class="parameter"><code>bitmap</code></em> :</span></p></td>
964 <td>The bitmap to store the results in.</td>
965 </tr>
966 <tr>
967 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
968 <td>
969 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the read succeeded or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise. The
970 function is only likely to fail if the bitmap points to a pixel
971 buffer and it could not be mapped.</td>
972 </tr>
973 </tbody>
974 </table></div>
975 <p class="since">Since 1.10</p>
976 <p class="stability">Stability Level: Unstable</p>
977 </div>
978 <hr>
979 <div class="refsect2">
980 <a name="cogl-framebuffer-read-pixels"></a><h3>cogl_framebuffer_read_pixels ()</h3>
981 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            cogl_framebuffer_read_pixels        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
982                                                          <em class="parameter"><code><span class="type">int</span> x</code></em>,
983                                                          <em class="parameter"><code><span class="type">int</span> y</code></em>,
984                                                          <em class="parameter"><code><span class="type">int</span> width</code></em>,
985                                                          <em class="parameter"><code><span class="type">int</span> height</code></em>,
986                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="type">CoglPixelFormat</span></a> format</code></em>,
987                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *pixels</code></em>);</pre>
988 <p>
989 This is a convenience wrapper around
990 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-read-pixels-into-bitmap" title="cogl_framebuffer_read_pixels_into_bitmap ()"><code class="function">cogl_framebuffer_read_pixels_into_bitmap()</code></a> which allocates a
991 temporary <a href="../cogl/cogl-Bitmaps.html#CoglBitmap"><span class="type">CoglBitmap</span></a> to read pixel data directly into the given
992 buffer. The rowstride of the buffer is assumed to be the width of
993 the region times the bytes per pixel of the format. The source for
994 the data is always taken from the color buffer. If you want to use
995 any other rowstride or source, please use the
996 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-read-pixels-into-bitmap" title="cogl_framebuffer_read_pixels_into_bitmap ()"><code class="function">cogl_framebuffer_read_pixels_into_bitmap()</code></a> function directly.
997 </p>
998 <p>
999 The implementation of the function looks like this:
1000 </p>
1001 <p>
1002 </p>
1003 <div class="informalexample">
1004   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1005     <tbody>
1006       <tr>
1007         <td class="listing_lines" align="right"><pre>1
1008 2
1009 3
1010 4
1011 5
1012 6
1013 7
1014 8
1015 9
1016 10
1017 11</pre></td>
1018         <td class="listing_code"><pre class="programlisting"><span class="normal">bitmap </span><span class="symbol">=</span><span class="normal"> </span><span class="function">cogl_bitmap_new_for_data</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">context</span><span class="symbol">,</span>
1019 <span class="normal">                                   width</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">,</span>
1020 <span class="normal">                                   format</span><span class="symbol">,</span>
1021 <span class="normal">                                   </span><span class="comment">/* rowstride */</span>
1022 <span class="normal">                                   bpp </span><span class="symbol">*</span><span class="normal"> width</span><span class="symbol">,</span>
1023 <span class="normal">                                   pixels</span><span class="symbol">);</span>
1024 <span class="function"><a href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-read-pixels-into-bitmap">cogl_framebuffer_read_pixels_into_bitmap</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">framebuffer</span><span class="symbol">,</span>
1025 <span class="normal">                                          x</span><span class="symbol">,</span><span class="normal"> y</span><span class="symbol">,</span>
1026 <span class="normal">                                          <a href="cogl-2.0-experimental-The-Top-Level-Context.html#COGL-READ-PIXELS-COLOR-BUFFER:CAPS">COGL_READ_PIXELS_COLOR_BUFFER</a></span><span class="symbol">,</span>
1027 <span class="normal">                                          bitmap</span><span class="symbol">);</span>
1028 <span class="function"><a href="cogl-2.0-experimental-The-Object-Interface.html#cogl-object-unref">cogl_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">bitmap</span><span class="symbol">);</span></pre></td>
1029       </tr>
1030     </tbody>
1031   </table>
1032 </div>
1033
1034 <p>
1035 </p>
1036 <div class="variablelist"><table border="0">
1037 <col align="left" valign="top">
1038 <tbody>
1039 <tr>
1040 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1041 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1042 </td>
1043 </tr>
1044 <tr>
1045 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
1046 <td>The x position to read from</td>
1047 </tr>
1048 <tr>
1049 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
1050 <td>The y position to read from</td>
1051 </tr>
1052 <tr>
1053 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
1054 <td>The width of the region of rectangles to read</td>
1055 </tr>
1056 <tr>
1057 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
1058 <td>The height of the region of rectangles to read</td>
1059 </tr>
1060 <tr>
1061 <td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
1062 <td>The pixel format to store the data in</td>
1063 </tr>
1064 <tr>
1065 <td><p><span class="term"><em class="parameter"><code>pixels</code></em> :</span></p></td>
1066 <td>The address of the buffer to store the data in</td>
1067 </tr>
1068 <tr>
1069 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1070 <td>
1071 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the read succeeded or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
1072 </tr>
1073 </tbody>
1074 </table></div>
1075 <p class="since">Since 1.10</p>
1076 <p class="stability">Stability Level: Unstable</p>
1077 </div>
1078 <hr>
1079 <div class="refsect2">
1080 <a name="cogl-framebuffer-set-dither-enabled"></a><h3>cogl_framebuffer_set_dither_enabled ()</h3>
1081 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_set_dither_enabled (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
1082                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> dither_enabled</code></em>);</pre>
1083 <p>
1084 Enables or disabled dithering if supported by the hardware.
1085 </p>
1086 <p>
1087 Dithering is a hardware dependent technique to increase the visible
1088 color resolution beyond what the underlying hardware supports by playing
1089 tricks with the colors placed into the framebuffer to give the illusion
1090 of other colors. (For example this can be compared to half-toning used
1091 by some news papers to show varying levels of grey even though their may
1092 only be black and white are available).
1093 </p>
1094 <p>
1095 If the current display pipeline for <em class="parameter"><code>framebuffer</code></em> does not support dithering
1096 then this has no affect.
1097 </p>
1098 <p>
1099 Dithering is enabled by default.
1100 </p>
1101 <div class="variablelist"><table border="0">
1102 <col align="left" valign="top">
1103 <tbody>
1104 <tr>
1105 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1106 <td>a pointer to a <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1107 </td>
1108 </tr>
1109 <tr>
1110 <td><p><span class="term"><em class="parameter"><code>dither_enabled</code></em> :</span></p></td>
1111 <td>
1112 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to enable dithering or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to disable</td>
1113 </tr>
1114 </tbody>
1115 </table></div>
1116 <p class="since">Since 1.8</p>
1117 <p class="stability">Stability Level: Unstable</p>
1118 </div>
1119 <hr>
1120 <div class="refsect2">
1121 <a name="cogl-framebuffer-get-dither-enabled"></a><h3>cogl_framebuffer_get_dither_enabled ()</h3>
1122 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            cogl_framebuffer_get_dither_enabled (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
1123 <p>
1124 Returns whether dithering has been requested for the given <em class="parameter"><code>framebuffer</code></em>.
1125 See <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-set-dither-enabled" title="cogl_framebuffer_set_dither_enabled ()"><code class="function">cogl_framebuffer_set_dither_enabled()</code></a> for more details about dithering.
1126 </p>
1127 <p>
1128 </p>
1129 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1130 <h3 class="title">Note</h3>This may return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> even when the underlying <em class="parameter"><code>framebuffer</code></em>
1131 display pipeline does not support dithering. This value only represents
1132 the user's request for dithering.</div>
1133 <p>
1134 </p>
1135 <div class="variablelist"><table border="0">
1136 <col align="left" valign="top">
1137 <tbody>
1138 <tr>
1139 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1140 <td>a pointer to a <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1141 </td>
1142 </tr>
1143 <tr>
1144 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1145 <td>
1146 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if dithering has been requested or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</td>
1147 </tr>
1148 </tbody>
1149 </table></div>
1150 <p class="since">Since 1.8</p>
1151 <p class="stability">Stability Level: Unstable</p>
1152 </div>
1153 <hr>
1154 <div class="refsect2">
1155 <a name="cogl-framebuffer-draw-primitive"></a><h3>cogl_framebuffer_draw_primitive ()</h3>
1156 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_draw_primitive     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
1157                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
1158                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Primitives.html#CoglPrimitive" title="CoglPrimitive"><span class="type">CoglPrimitive</span></a> *primitive</code></em>);</pre>
1159 <p>
1160 Draws the given <em class="parameter"><code>primitive</code></em> geometry to the specified destination
1161 <em class="parameter"><code>framebuffer</code></em> using the graphics processing state described by <em class="parameter"><code>pipeline</code></em>.
1162 </p>
1163 <p>
1164 This drawing api doesn't support high-level meta texture types such
1165 as <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> so it is the user's responsibility to
1166 ensure that only low-level textures that can be directly sampled by
1167 a GPU such as <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a>, <a class="link" href="cogl-2.0-experimental-Rectangle-textures-(non-normalized-coordinates).html#CoglTextureRectangle" title="CoglTextureRectangle"><span class="type">CoglTextureRectangle</span></a> or <a class="link" href="cogl-2.0-experimental-3D-textures.html#CoglTexture3D" title="CoglTexture3D"><span class="type">CoglTexture3D</span></a>
1168 are associated with layers of the given <em class="parameter"><code>pipeline</code></em>.
1169 </p>
1170 <p>
1171 </p>
1172 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1173 <h3 class="title">Note</h3>This api doesn't support any of the legacy global state options such
1174 as <a href="../cogl/cogl-General-API-(Deprecated).html#cogl-set-depth-test-enabled"><code class="function">cogl_set_depth_test_enabled()</code></a>, <a href="../cogl/cogl-General-API.html#cogl-set-backface-culling-enabled"><code class="function">cogl_set_backface_culling_enabled()</code></a> or
1175 <a href="../cogl/cogl-Shaders-and-Programmable-Pipeline-(Deprecated).html#cogl-program-use"><code class="function">cogl_program_use()</code></a>
1176 </div>
1177 <p>
1178 </p>
1179 <div class="variablelist"><table border="0">
1180 <col align="left" valign="top">
1181 <tbody>
1182 <tr>
1183 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1184 <td>A destination <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1185 </td>
1186 </tr>
1187 <tr>
1188 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
1189 <td>A <span class="type">CoglPipeline</span> state object</td>
1190 </tr>
1191 <tr>
1192 <td><p><span class="term"><em class="parameter"><code>primitive</code></em> :</span></p></td>
1193 <td>A <a class="link" href="cogl-2.0-experimental-Primitives.html#CoglPrimitive" title="CoglPrimitive"><span class="type">CoglPrimitive</span></a> geometry object</td>
1194 </tr>
1195 </tbody>
1196 </table></div>
1197 <p class="since">Since 1.10</p>
1198 <p class="stability">Stability Level: Unstable</p>
1199 </div>
1200 <hr>
1201 <div class="refsect2">
1202 <a name="cogl-framebuffer-draw-attributes"></a><h3>cogl_framebuffer_draw_attributes ()</h3>
1203 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_draw_attributes    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
1204                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
1205                                                          <em class="parameter"><code><a href="../cogl/cogl-Vertex-Buffers.html#CoglVerticesMode"><span class="type">CoglVerticesMode</span></a> mode</code></em>,
1206                                                          <em class="parameter"><code><span class="type">int</span> first_vertex</code></em>,
1207                                                          <em class="parameter"><code><span class="type">int</span> n_vertices</code></em>,
1208                                                          <em class="parameter"><code><span class="type">CoglAttribute</span> **attributes</code></em>,
1209                                                          <em class="parameter"><code><span class="type">int</span> n_attributes</code></em>);</pre>
1210 <p>
1211 First defines a geometry primitive by grouping a set of vertex <em class="parameter"><code>attributes</code></em>;
1212 specifying a <em class="parameter"><code>first_vertex</code></em>; a number of vertices (<em class="parameter"><code>n_vertices</code></em>) and
1213 specifying  what kind of topology the vertices have via <em class="parameter"><code>mode</code></em>.
1214 </p>
1215 <p>
1216 Then the function draws the given <em class="parameter"><code>primitive</code></em> geometry to the specified
1217 destination <em class="parameter"><code>framebuffer</code></em> using the graphics processing pipeline described by
1218 <em class="parameter"><code>pipeline</code></em>.
1219 </p>
1220 <p>
1221 The list of <span class="type">CoglAttribute</span>s define the attributes of the vertices to
1222 be drawn, such as positions, colors and normals and the number of attributes
1223 is given as <em class="parameter"><code>n_attributes</code></em>.
1224 </p>
1225 <p>
1226 This drawing api doesn't support high-level meta texture types such
1227 as <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> so it is the user's responsibility to
1228 ensure that only low-level textures that can be directly sampled by
1229 a GPU such as <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a>, <a class="link" href="cogl-2.0-experimental-Rectangle-textures-(non-normalized-coordinates).html#CoglTextureRectangle" title="CoglTextureRectangle"><span class="type">CoglTextureRectangle</span></a> or <a class="link" href="cogl-2.0-experimental-3D-textures.html#CoglTexture3D" title="CoglTexture3D"><span class="type">CoglTexture3D</span></a>
1230 are associated with layers of the given <em class="parameter"><code>pipeline</code></em>.
1231 </p>
1232 <p>
1233 </p>
1234 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1235 <h3 class="title">Note</h3>This api doesn't support any of the legacy global state options such
1236 as <a href="../cogl/cogl-General-API-(Deprecated).html#cogl-set-depth-test-enabled"><code class="function">cogl_set_depth_test_enabled()</code></a>, <a href="../cogl/cogl-General-API.html#cogl-set-backface-culling-enabled"><code class="function">cogl_set_backface_culling_enabled()</code></a> or
1237 <a href="../cogl/cogl-Shaders-and-Programmable-Pipeline-(Deprecated).html#cogl-program-use"><code class="function">cogl_program_use()</code></a>
1238 </div>
1239 <p>
1240 </p>
1241 <div class="variablelist"><table border="0">
1242 <col align="left" valign="top">
1243 <tbody>
1244 <tr>
1245 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1246 <td>A destination <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1247 </td>
1248 </tr>
1249 <tr>
1250 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
1251 <td>A <span class="type">CoglPipeline</span> state object</td>
1252 </tr>
1253 <tr>
1254 <td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
1255 <td>The <a href="../cogl/cogl-Vertex-Buffers.html#CoglVerticesMode"><span class="type">CoglVerticesMode</span></a> defining the topology of vertices</td>
1256 </tr>
1257 <tr>
1258 <td><p><span class="term"><em class="parameter"><code>first_vertex</code></em> :</span></p></td>
1259 <td>The vertex offset within the given attributes to draw from</td>
1260 </tr>
1261 <tr>
1262 <td><p><span class="term"><em class="parameter"><code>n_vertices</code></em> :</span></p></td>
1263 <td>The number of vertices to draw from the given attributes</td>
1264 </tr>
1265 <tr>
1266 <td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td>
1267 <td>An array of pointers to <span class="type">CoglAttribute</span>&lt;-- --&gt;s defining vertex
1268 geometry</td>
1269 </tr>
1270 <tr>
1271 <td><p><span class="term"><em class="parameter"><code>n_attributes</code></em> :</span></p></td>
1272 <td>The number of attributes in the <em class="parameter"><code>attributes</code></em> array.</td>
1273 </tr>
1274 </tbody>
1275 </table></div>
1276 <p class="since">Since 1.10</p>
1277 <p class="stability">Stability Level: Unstable</p>
1278 </div>
1279 <hr>
1280 <div class="refsect2">
1281 <a name="cogl-framebuffer-vdraw-attributes"></a><h3>cogl_framebuffer_vdraw_attributes ()</h3>
1282 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_vdraw_attributes   (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
1283                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
1284                                                          <em class="parameter"><code><a href="../cogl/cogl-Vertex-Buffers.html#CoglVerticesMode"><span class="type">CoglVerticesMode</span></a> mode</code></em>,
1285                                                          <em class="parameter"><code><span class="type">int</span> first_vertex</code></em>,
1286                                                          <em class="parameter"><code><span class="type">int</span> n_vertices</code></em>,
1287                                                          <em class="parameter"><code>...</code></em>);</pre>
1288 <p>
1289 First defines a geometry primitive by grouping a set of vertex attributes;
1290 specifying a <em class="parameter"><code>first_vertex</code></em>; a number of vertices (<em class="parameter"><code>n_vertices</code></em>) and
1291 specifying  what kind of topology the vertices have via <em class="parameter"><code>mode</code></em>.
1292 </p>
1293 <p>
1294 Then the function draws the given <em class="parameter"><code>primitive</code></em> geometry to the specified
1295 destination <em class="parameter"><code>framebuffer</code></em> using the graphics processing pipeline described by
1296 <em class="parameter"><code>pipeline</code></em>.
1297 </p>
1298 <p>
1299 The list of <span class="type">CoglAttribute</span>s define the attributes of the vertices to
1300 be drawn, such as positions, colors and normals and should be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1301 terminated.
1302 </p>
1303 <p>
1304 This drawing api doesn't support high-level meta texture types such
1305 as <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> so it is the user's responsibility to
1306 ensure that only low-level textures that can be directly sampled by
1307 a GPU such as <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a>, <a class="link" href="cogl-2.0-experimental-Rectangle-textures-(non-normalized-coordinates).html#CoglTextureRectangle" title="CoglTextureRectangle"><span class="type">CoglTextureRectangle</span></a> or <a class="link" href="cogl-2.0-experimental-3D-textures.html#CoglTexture3D" title="CoglTexture3D"><span class="type">CoglTexture3D</span></a>
1308 are associated with layers of the given <em class="parameter"><code>pipeline</code></em>.
1309 </p>
1310 <div class="variablelist"><table border="0">
1311 <col align="left" valign="top">
1312 <tbody>
1313 <tr>
1314 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1315 <td>A destination <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1316 </td>
1317 </tr>
1318 <tr>
1319 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
1320 <td>A <span class="type">CoglPipeline</span> state object</td>
1321 </tr>
1322 <tr>
1323 <td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
1324 <td>The <a href="../cogl/cogl-Vertex-Buffers.html#CoglVerticesMode"><span class="type">CoglVerticesMode</span></a> defining the topology of vertices</td>
1325 </tr>
1326 <tr>
1327 <td><p><span class="term"><em class="parameter"><code>first_vertex</code></em> :</span></p></td>
1328 <td>The vertex offset within the given attributes to draw from</td>
1329 </tr>
1330 <tr>
1331 <td><p><span class="term"><em class="parameter"><code>n_vertices</code></em> :</span></p></td>
1332 <td>The number of vertices to draw from the given attributes</td>
1333 </tr>
1334 <tr>
1335 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1336 <td>A set of vertex <span class="type">CoglAttribute</span>s defining vertex geometry</td>
1337 </tr>
1338 </tbody>
1339 </table></div>
1340 <p class="since">Since 1.10</p>
1341 <p class="stability">Stability Level: Unstable</p>
1342 </div>
1343 <hr>
1344 <div class="refsect2">
1345 <a name="cogl-framebuffer-draw-indexed-attributes"></a><h3>cogl_framebuffer_draw_indexed_attributes ()</h3>
1346 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_draw_indexed_attributes
1347                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
1348                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
1349                                                          <em class="parameter"><code><a href="../cogl/cogl-Vertex-Buffers.html#CoglVerticesMode"><span class="type">CoglVerticesMode</span></a> mode</code></em>,
1350                                                          <em class="parameter"><code><span class="type">int</span> first_vertex</code></em>,
1351                                                          <em class="parameter"><code><span class="type">int</span> n_vertices</code></em>,
1352                                                          <em class="parameter"><code><span class="type">CoglIndices</span> *indices</code></em>,
1353                                                          <em class="parameter"><code><span class="type">CoglAttribute</span> **attributes</code></em>,
1354                                                          <em class="parameter"><code><span class="type">int</span> n_attributes</code></em>);</pre>
1355 <p>
1356 Behaves the same as <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-attributes" title="cogl_framebuffer_draw_attributes ()"><code class="function">cogl_framebuffer_draw_attributes()</code></a> except that
1357 instead of reading vertex data sequentially from the specified
1358 <em class="parameter"><code>attributes</code></em> the <em class="parameter"><code>indices</code></em> provide an indirection for how the data
1359 should be indexed allowing a random access order to be
1360 specified.
1361 </p>
1362 <p>
1363 For example an indices array of [0, 1, 2, 0, 2, 3] could be used
1364 used to draw two triangles (<em class="parameter"><code>mode</code></em> = <a href="../cogl/cogl-Vertex-Buffers.html#COGL-VERTICES-MODE-TRIANGLES:CAPS"><code class="literal">COGL_VERTICES_MODE_TRIANGLES</code></a> +
1365 <em class="parameter"><code>n_vertices</code></em> = 6) but only provide attribute data for the 4 corners
1366 of a rectangle. When the GPU needs to read in each of the 6
1367 vertices it will read the <em class="parameter"><code>indices</code></em> array for each vertex in
1368 sequence and use the index to look up the vertex attribute data. So
1369 here you can see that first and fourth vertex will point to the
1370 same data and third and fifth vertex will also point to shared
1371 data.
1372 </p>
1373 <p>
1374 Drawing with indices can be a good way of minimizing the size of a
1375 mesh by allowing you to avoid data for duplicate vertices because
1376 multiple entries in the index array can refer back to a single
1377 shared vertex.
1378 </p>
1379 <p>
1380 </p>
1381 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1382 <h3 class="title">Note</h3>The <em class="parameter"><code>indices</code></em> array must be at least as long as <em class="parameter"><code>first_vertex</code></em>
1383 + <em class="parameter"><code>n_vertices</code></em> otherwise the GPU will overrun the indices array when
1384 looking up vertex data.</div>
1385 <p>
1386 </p>
1387 <p>
1388 Since it's very common to want to draw a run of rectangles using
1389 indices to avoid duplicating vertex data you can use
1390 <code class="function">cogl_get_rectangle_indices()</code> to get a set of indices that can be
1391 shared.
1392 </p>
1393 <p>
1394 This drawing api doesn't support high-level meta texture types such
1395 as <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> so it is the user's responsibility to
1396 ensure that only low-level textures that can be directly sampled by
1397 a GPU such as <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a>, <a class="link" href="cogl-2.0-experimental-Rectangle-textures-(non-normalized-coordinates).html#CoglTextureRectangle" title="CoglTextureRectangle"><span class="type">CoglTextureRectangle</span></a> or
1398 <a class="link" href="cogl-2.0-experimental-3D-textures.html#CoglTexture3D" title="CoglTexture3D"><span class="type">CoglTexture3D</span></a> are associated with layers of the given <em class="parameter"><code>pipeline</code></em>.
1399 </p>
1400 <p>
1401 </p>
1402 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1403 <h3 class="title">Note</h3>This api doesn't support any of the legacy global state
1404 options such as <a href="../cogl/cogl-General-API-(Deprecated).html#cogl-set-depth-test-enabled"><code class="function">cogl_set_depth_test_enabled()</code></a>,
1405 <a href="../cogl/cogl-General-API.html#cogl-set-backface-culling-enabled"><code class="function">cogl_set_backface_culling_enabled()</code></a> or <a href="../cogl/cogl-Shaders-and-Programmable-Pipeline-(Deprecated).html#cogl-program-use"><code class="function">cogl_program_use()</code></a>
1406 </div>
1407 <p>
1408 </p>
1409 <div class="variablelist"><table border="0">
1410 <col align="left" valign="top">
1411 <tbody>
1412 <tr>
1413 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1414 <td>A destination <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1415 </td>
1416 </tr>
1417 <tr>
1418 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
1419 <td>A <span class="type">CoglPipeline</span> state object</td>
1420 </tr>
1421 <tr>
1422 <td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
1423 <td>The <a href="../cogl/cogl-Vertex-Buffers.html#CoglVerticesMode"><span class="type">CoglVerticesMode</span></a> defining the topology of vertices</td>
1424 </tr>
1425 <tr>
1426 <td><p><span class="term"><em class="parameter"><code>first_vertex</code></em> :</span></p></td>
1427 <td>The vertex offset within the given attributes to draw from</td>
1428 </tr>
1429 <tr>
1430 <td><p><span class="term"><em class="parameter"><code>n_vertices</code></em> :</span></p></td>
1431 <td>The number of vertices to draw from the given attributes</td>
1432 </tr>
1433 <tr>
1434 <td><p><span class="term"><em class="parameter"><code>indices</code></em> :</span></p></td>
1435 <td>The array of indices used by the GPU to lookup attribute
1436 data for each vertex.</td>
1437 </tr>
1438 <tr>
1439 <td><p><span class="term"><em class="parameter"><code>attributes</code></em> :</span></p></td>
1440 <td>An array of pointers to <span class="type">CoglAttribute</span>&lt;-- --&gt;s defining vertex
1441 geometry</td>
1442 </tr>
1443 <tr>
1444 <td><p><span class="term"><em class="parameter"><code>n_attributes</code></em> :</span></p></td>
1445 <td>The number of attributes in the <em class="parameter"><code>attributes</code></em> array.</td>
1446 </tr>
1447 </tbody>
1448 </table></div>
1449 <p class="since">Since 1.10</p>
1450 <p class="stability">Stability Level: Unstable</p>
1451 </div>
1452 <hr>
1453 <div class="refsect2">
1454 <a name="cogl-framebuffer-vdraw-indexed-attributes"></a><h3>cogl_framebuffer_vdraw_indexed_attributes ()</h3>
1455 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_vdraw_indexed_attributes
1456                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
1457                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
1458                                                          <em class="parameter"><code><a href="../cogl/cogl-Vertex-Buffers.html#CoglVerticesMode"><span class="type">CoglVerticesMode</span></a> mode</code></em>,
1459                                                          <em class="parameter"><code><span class="type">int</span> first_vertex</code></em>,
1460                                                          <em class="parameter"><code><span class="type">int</span> n_vertices</code></em>,
1461                                                          <em class="parameter"><code><span class="type">CoglIndices</span> *indices</code></em>,
1462                                                          <em class="parameter"><code>...</code></em>);</pre>
1463 <p>
1464 Behaves the same as <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-vdraw-attributes" title="cogl_framebuffer_vdraw_attributes ()"><code class="function">cogl_framebuffer_vdraw_attributes()</code></a> except that
1465 instead of reading vertex data sequentially from the specified
1466 attributes the <em class="parameter"><code>indices</code></em> provide an indirection for how the data
1467 should be indexed allowing a random access order to be
1468 specified.
1469 </p>
1470 <p>
1471 For example an indices array of [0, 1, 2, 0, 2, 3] could be used
1472 used to draw two triangles (<em class="parameter"><code>mode</code></em> = <a href="../cogl/cogl-Vertex-Buffers.html#COGL-VERTICES-MODE-TRIANGLES:CAPS"><code class="literal">COGL_VERTICES_MODE_TRIANGLES</code></a> +
1473 <em class="parameter"><code>n_vertices</code></em> = 6) but only provide attribute data for the 4 corners
1474 of a rectangle. When the GPU needs to read in each of the 6
1475 vertices it will read the <em class="parameter"><code>indices</code></em> array for each vertex in
1476 sequence and use the index to look up the vertex attribute data. So
1477 here you can see that first and fourth vertex will point to the
1478 same data and third and fifth vertex will also point to shared
1479 data.
1480 </p>
1481 <p>
1482 Drawing with indices can be a good way of minimizing the size of a
1483 mesh by allowing you to avoid data for duplicate vertices because
1484 multiple entries in the index array can refer back to a single
1485 shared vertex.
1486 </p>
1487 <p>
1488 </p>
1489 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1490 <h3 class="title">Note</h3>The <em class="parameter"><code>indices</code></em> array must be at least as long as <em class="parameter"><code>first_vertex</code></em>
1491 + <em class="parameter"><code>n_vertices</code></em> otherwise the GPU will overrun the indices array when
1492 looking up vertex data.</div>
1493 <p>
1494 </p>
1495 <p>
1496 Since it's very common to want to draw a run of rectangles using
1497 indices to avoid duplicating vertex data you can use
1498 <code class="function">cogl_get_rectangle_indices()</code> to get a set of indices that can be
1499 shared.
1500 </p>
1501 <p>
1502 This drawing api doesn't support high-level meta texture types such
1503 as <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> so it is the user's responsibility to
1504 ensure that only low-level textures that can be directly sampled by
1505 a GPU such as <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a>, <a class="link" href="cogl-2.0-experimental-Rectangle-textures-(non-normalized-coordinates).html#CoglTextureRectangle" title="CoglTextureRectangle"><span class="type">CoglTextureRectangle</span></a> or
1506 <a class="link" href="cogl-2.0-experimental-3D-textures.html#CoglTexture3D" title="CoglTexture3D"><span class="type">CoglTexture3D</span></a> are associated with layers of the given <em class="parameter"><code>pipeline</code></em>.
1507 </p>
1508 <p>
1509 </p>
1510 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1511 <h3 class="title">Note</h3>This api doesn't support any of the legacy global state
1512 options such as <a href="../cogl/cogl-General-API-(Deprecated).html#cogl-set-depth-test-enabled"><code class="function">cogl_set_depth_test_enabled()</code></a>,
1513 <a href="../cogl/cogl-General-API.html#cogl-set-backface-culling-enabled"><code class="function">cogl_set_backface_culling_enabled()</code></a> or <a href="../cogl/cogl-Shaders-and-Programmable-Pipeline-(Deprecated).html#cogl-program-use"><code class="function">cogl_program_use()</code></a>
1514 </div>
1515 <p>
1516 </p>
1517 <div class="variablelist"><table border="0">
1518 <col align="left" valign="top">
1519 <tbody>
1520 <tr>
1521 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1522 <td>A destination <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1523 </td>
1524 </tr>
1525 <tr>
1526 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
1527 <td>A <span class="type">CoglPipeline</span> state object</td>
1528 </tr>
1529 <tr>
1530 <td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
1531 <td>The <a href="../cogl/cogl-Vertex-Buffers.html#CoglVerticesMode"><span class="type">CoglVerticesMode</span></a> defining the topology of vertices</td>
1532 </tr>
1533 <tr>
1534 <td><p><span class="term"><em class="parameter"><code>first_vertex</code></em> :</span></p></td>
1535 <td>The vertex offset within the given attributes to draw from</td>
1536 </tr>
1537 <tr>
1538 <td><p><span class="term"><em class="parameter"><code>n_vertices</code></em> :</span></p></td>
1539 <td>The number of vertices to draw from the given attributes</td>
1540 </tr>
1541 <tr>
1542 <td><p><span class="term"><em class="parameter"><code>indices</code></em> :</span></p></td>
1543 <td>The array of indices used by the GPU to lookup attribute
1544 data for each vertex.</td>
1545 </tr>
1546 <tr>
1547 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
1548 <td>A set of vertex <span class="type">CoglAttribute</span>s defining vertex geometry</td>
1549 </tr>
1550 </tbody>
1551 </table></div>
1552 <p class="since">Since 1.10</p>
1553 <p class="stability">Stability Level: Unstable</p>
1554 </div>
1555 <hr>
1556 <div class="refsect2">
1557 <a name="cogl-framebuffer-draw-rectangle"></a><h3>cogl_framebuffer_draw_rectangle ()</h3>
1558 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_draw_rectangle     (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
1559                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
1560                                                          <em class="parameter"><code><span class="type">float</span> x_1</code></em>,
1561                                                          <em class="parameter"><code><span class="type">float</span> y_1</code></em>,
1562                                                          <em class="parameter"><code><span class="type">float</span> x_2</code></em>,
1563                                                          <em class="parameter"><code><span class="type">float</span> y_2</code></em>);</pre>
1564 <p>
1565 Draws a rectangle to <em class="parameter"><code>framebuffer</code></em> with the given <em class="parameter"><code>pipeline</code></em> state
1566 and with the top left corner positioned at (<em class="parameter"><code>x_1</code></em>, <em class="parameter"><code>y_1</code></em>) and the
1567 bottom right corner positioned at (<em class="parameter"><code>x_2</code></em>, <em class="parameter"><code>y_2</code></em>).
1568 </p>
1569 <p>
1570 </p>
1571 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1572 <h3 class="title">Note</h3>The position is the position before the rectangle has been
1573 transformed by the model-view matrix and the projection
1574 matrix.</div>
1575 <p>
1576 </p>
1577 <p>
1578 </p>
1579 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1580 <h3 class="title">Note</h3>If you want to describe a rectangle with a texture mapped on
1581 it then you can use
1582 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-textured-rectangle" title="cogl_framebuffer_draw_textured_rectangle ()"><code class="function">cogl_framebuffer_draw_textured_rectangle()</code></a>.</div>
1583 <p>
1584 </p>
1585 <div class="variablelist"><table border="0">
1586 <col align="left" valign="top">
1587 <tbody>
1588 <tr>
1589 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1590 <td>A destination <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1591 </td>
1592 </tr>
1593 <tr>
1594 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
1595 <td>A <span class="type">CoglPipeline</span> state object</td>
1596 </tr>
1597 <tr>
1598 <td><p><span class="term"><em class="parameter"><code>x_1</code></em> :</span></p></td>
1599 <td>X coordinate of the top-left corner</td>
1600 </tr>
1601 <tr>
1602 <td><p><span class="term"><em class="parameter"><code>y_1</code></em> :</span></p></td>
1603 <td>Y coordinate of the top-left corner</td>
1604 </tr>
1605 <tr>
1606 <td><p><span class="term"><em class="parameter"><code>x_2</code></em> :</span></p></td>
1607 <td>X coordinate of the bottom-right corner</td>
1608 </tr>
1609 <tr>
1610 <td><p><span class="term"><em class="parameter"><code>y_2</code></em> :</span></p></td>
1611 <td>Y coordinate of the bottom-right corner</td>
1612 </tr>
1613 </tbody>
1614 </table></div>
1615 <p class="since">Since 1.10</p>
1616 <p class="stability">Stability Level: Unstable</p>
1617 </div>
1618 <hr>
1619 <div class="refsect2">
1620 <a name="cogl-framebuffer-draw-textured-rectangle"></a><h3>cogl_framebuffer_draw_textured_rectangle ()</h3>
1621 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_draw_textured_rectangle
1622                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
1623                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
1624                                                          <em class="parameter"><code><span class="type">float</span> x_1</code></em>,
1625                                                          <em class="parameter"><code><span class="type">float</span> y_1</code></em>,
1626                                                          <em class="parameter"><code><span class="type">float</span> x_2</code></em>,
1627                                                          <em class="parameter"><code><span class="type">float</span> y_2</code></em>,
1628                                                          <em class="parameter"><code><span class="type">float</span> s_1</code></em>,
1629                                                          <em class="parameter"><code><span class="type">float</span> t_1</code></em>,
1630                                                          <em class="parameter"><code><span class="type">float</span> s_2</code></em>,
1631                                                          <em class="parameter"><code><span class="type">float</span> t_2</code></em>);</pre>
1632 <p>
1633 Draws a textured rectangle to <em class="parameter"><code>framebuffer</code></em> using the given
1634 <em class="parameter"><code>pipeline</code></em> state with the top left corner positioned at (<em class="parameter"><code>x_1</code></em>, <em class="parameter"><code>y_1</code></em>)
1635 and the bottom right corner positioned at (<em class="parameter"><code>x_2</code></em>, <em class="parameter"><code>y_2</code></em>). The top
1636 left corner will have texture coordinates of (<em class="parameter"><code>s_1</code></em>, <em class="parameter"><code>t_1</code></em>) and the
1637 bottom right corner will have texture coordinates of (<em class="parameter"><code>s_2</code></em>, <em class="parameter"><code>t_2</code></em>).
1638 </p>
1639 <p>
1640 </p>
1641 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1642 <h3 class="title">Note</h3>The position is the position before the rectangle has been
1643 transformed by the model-view matrix and the projection
1644 matrix.</div>
1645 <p>
1646 </p>
1647 <p>
1648 This is a high level drawing api that can handle any kind of
1649 <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a> texture such as <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> textures
1650 which may internally be comprised of multiple low-level textures.
1651 This is unlike low-level drawing apis such as
1652 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-primitive" title="cogl_framebuffer_draw_primitive ()"><code class="function">cogl_framebuffer_draw_primitive()</code></a> or
1653 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-attributes" title="cogl_framebuffer_draw_attributes ()"><code class="function">cogl_framebuffer_draw_attributes()</code></a> which only support low level
1654 texture types that are directly supported by GPUs such as
1655 <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a>.
1656 </p>
1657 <p>
1658 </p>
1659 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1660 <h3 class="title">Note</h3>The given texture coordinates will only be used for the first
1661 texture layer of the pipeline and if your pipeline has more than
1662 one layer then all other layers will have default texture
1663 coordinates of <em class="parameter"><code>s_1</code></em>=0.0 <em class="parameter"><code>t_1</code></em>=0.0 <em class="parameter"><code>s_2</code></em>=1.0 <em class="parameter"><code>t_2</code></em>=1.0 </div>
1664 <p>
1665 </p>
1666 <p>
1667 The given texture coordinates should always be normalized such that
1668 (0, 0) corresponds to the top left and (1, 1) corresponds to the
1669 bottom right. To map an entire texture across the rectangle pass
1670 in <em class="parameter"><code>s_1</code></em>=<code class="literal">0</code>, <em class="parameter"><code>t_1</code></em>=<code class="literal">0</code>, <em class="parameter"><code>s_2</code></em>=<code class="literal">1</code>, <em class="parameter"><code>t_2</code></em>=<code class="literal">1</code>.
1671 </p>
1672 <p>
1673 </p>
1674 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1675 <h3 class="title">Note</h3>Even if you have associated a <a class="link" href="cogl-2.0-experimental-Rectangle-textures-(non-normalized-coordinates).html#CoglTextureRectangle" title="CoglTextureRectangle"><span class="type">CoglTextureRectangle</span></a> texture
1676 with one of your <em class="parameter"><code>pipeline</code></em> layers which normally implies working
1677 with non-normalized texture coordinates this api should still be
1678 passed normalized texture coordinates.</div>
1679 <p>
1680 </p>
1681 <div class="variablelist"><table border="0">
1682 <col align="left" valign="top">
1683 <tbody>
1684 <tr>
1685 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1686 <td>A destination <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1687 </td>
1688 </tr>
1689 <tr>
1690 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
1691 <td>A <span class="type">CoglPipeline</span> state object</td>
1692 </tr>
1693 <tr>
1694 <td><p><span class="term"><em class="parameter"><code>x_1</code></em> :</span></p></td>
1695 <td>x coordinate upper left on screen.</td>
1696 </tr>
1697 <tr>
1698 <td><p><span class="term"><em class="parameter"><code>y_1</code></em> :</span></p></td>
1699 <td>y coordinate upper left on screen.</td>
1700 </tr>
1701 <tr>
1702 <td><p><span class="term"><em class="parameter"><code>x_2</code></em> :</span></p></td>
1703 <td>x coordinate lower right on screen.</td>
1704 </tr>
1705 <tr>
1706 <td><p><span class="term"><em class="parameter"><code>y_2</code></em> :</span></p></td>
1707 <td>y coordinate lower right on screen.</td>
1708 </tr>
1709 <tr>
1710 <td><p><span class="term"><em class="parameter"><code>s_1</code></em> :</span></p></td>
1711 <td>S texture coordinate of the top-left coorner</td>
1712 </tr>
1713 <tr>
1714 <td><p><span class="term"><em class="parameter"><code>t_1</code></em> :</span></p></td>
1715 <td>T texture coordinate of the top-left coorner</td>
1716 </tr>
1717 <tr>
1718 <td><p><span class="term"><em class="parameter"><code>s_2</code></em> :</span></p></td>
1719 <td>S texture coordinate of the bottom-right coorner</td>
1720 </tr>
1721 <tr>
1722 <td><p><span class="term"><em class="parameter"><code>t_2</code></em> :</span></p></td>
1723 <td>T texture coordinate of the bottom-right coorner</td>
1724 </tr>
1725 </tbody>
1726 </table></div>
1727 <p class="since">Since 1.10</p>
1728 <p class="stability">Stability Level: Unstable</p>
1729 </div>
1730 <hr>
1731 <div class="refsect2">
1732 <a name="cogl-framebuffer-draw-multitextured-rectangle"></a><h3>cogl_framebuffer_draw_multitextured_rectangle ()</h3>
1733 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_draw_multitextured_rectangle
1734                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
1735                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
1736                                                          <em class="parameter"><code><span class="type">float</span> x_1</code></em>,
1737                                                          <em class="parameter"><code><span class="type">float</span> y_1</code></em>,
1738                                                          <em class="parameter"><code><span class="type">float</span> x_2</code></em>,
1739                                                          <em class="parameter"><code><span class="type">float</span> y_2</code></em>,
1740                                                          <em class="parameter"><code>const <span class="type">float</span> *tex_coords</code></em>,
1741                                                          <em class="parameter"><code><span class="type">int</span> tex_coords_len</code></em>);</pre>
1742 <p>
1743 Draws a textured rectangle to <em class="parameter"><code>framebuffer</code></em> with the given <em class="parameter"><code>pipeline</code></em>
1744 state with the top left corner positioned at (<em class="parameter"><code>x_1</code></em>, <em class="parameter"><code>y_1</code></em>) and the
1745 bottom right corner positioned at (<em class="parameter"><code>x_2</code></em>, <em class="parameter"><code>y_2</code></em>). As a pipeline may
1746 contain multiple texture layers this interface lets you supply
1747 texture coordinates for each layer of the pipeline.
1748 </p>
1749 <p>
1750 </p>
1751 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1752 <h3 class="title">Note</h3>The position is the position before the rectangle has been
1753 transformed by the model-view matrix and the projection
1754 matrix.</div>
1755 <p>
1756 </p>
1757 <p>
1758 This is a high level drawing api that can handle any kind of
1759 <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a> texture for the first layer such as
1760 <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> textures which may internally be comprised of
1761 multiple low-level textures.  This is unlike low-level drawing apis
1762 such as <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-primitive" title="cogl_framebuffer_draw_primitive ()"><code class="function">cogl_framebuffer_draw_primitive()</code></a> or
1763 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-attributes" title="cogl_framebuffer_draw_attributes ()"><code class="function">cogl_framebuffer_draw_attributes()</code></a> which only support low level
1764 texture types that are directly supported by GPUs such as
1765 <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a>.
1766 </p>
1767 <p>
1768 </p>
1769 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1770 <h3 class="title">Note</h3>This api can not currently handle multiple high-level meta
1771 texture layers. The first layer may be a high level meta texture
1772 such as <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> but all other layers much be low
1773 level textures such as <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a> and additionally they
1774 should be textures that can be sampled using normalized coordinates
1775 (so not <a class="link" href="cogl-2.0-experimental-Rectangle-textures-(non-normalized-coordinates).html#CoglTextureRectangle" title="CoglTextureRectangle"><span class="type">CoglTextureRectangle</span></a> textures).</div>
1776 <p>
1777 </p>
1778 <p>
1779 The top left texture coordinate for layer 0 of any pipeline will be
1780 (tex_coords[0], tex_coords[1]) and the bottom right coordinate will
1781 be (tex_coords[2], tex_coords[3]). The coordinates for layer 1
1782 would be (tex_coords[4], tex_coords[5]) (tex_coords[6],
1783 tex_coords[7]) and so on...
1784 </p>
1785 <p>
1786 The given texture coordinates should always be normalized such that
1787 (0, 0) corresponds to the top left and (1, 1) corresponds to the
1788 bottom right. To map an entire texture across the rectangle pass
1789 in tex_coords[0]=<code class="literal">0</code>, tex_coords[1]=<code class="literal">0</code>, tex_coords[2]=<code class="literal">1</code>,
1790 tex_coords[3]=<code class="literal">1</code>.
1791 </p>
1792 <p>
1793 </p>
1794 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1795 <h3 class="title">Note</h3>Even if you have associated a <a class="link" href="cogl-2.0-experimental-Rectangle-textures-(non-normalized-coordinates).html#CoglTextureRectangle" title="CoglTextureRectangle"><span class="type">CoglTextureRectangle</span></a> texture
1796 which normally implies working with non-normalized texture
1797 coordinates this api should still be passed normalized texture
1798 coordinates.</div>
1799 <p>
1800 </p>
1801 <p>
1802 The first pair of coordinates are for the first layer (with the
1803 smallest layer index) and if you supply less texture coordinates
1804 than there are layers in the current source material then default
1805 texture coordinates (0.0, 0.0, 1.0, 1.0) are generated.
1806 </p>
1807 <div class="variablelist"><table border="0">
1808 <col align="left" valign="top">
1809 <tbody>
1810 <tr>
1811 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1812 <td>A destination <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1813 </td>
1814 </tr>
1815 <tr>
1816 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
1817 <td>A <span class="type">CoglPipeline</span> state object</td>
1818 </tr>
1819 <tr>
1820 <td><p><span class="term"><em class="parameter"><code>x_1</code></em> :</span></p></td>
1821 <td>x coordinate upper left on screen.</td>
1822 </tr>
1823 <tr>
1824 <td><p><span class="term"><em class="parameter"><code>y_1</code></em> :</span></p></td>
1825 <td>y coordinate upper left on screen.</td>
1826 </tr>
1827 <tr>
1828 <td><p><span class="term"><em class="parameter"><code>x_2</code></em> :</span></p></td>
1829 <td>x coordinate lower right on screen.</td>
1830 </tr>
1831 <tr>
1832 <td><p><span class="term"><em class="parameter"><code>y_2</code></em> :</span></p></td>
1833 <td>y coordinate lower right on screen.</td>
1834 </tr>
1835 <tr>
1836 <td><p><span class="term"><em class="parameter"><code>tex_coords</code></em> :</span></p></td>
1837 <td>An array containing groups of
1838 4 float values: [s_1, t_1, s_2, t_2] that are interpreted as two texture
1839 coordinates; one for the top left texel, and one for the bottom right
1840 texel. Each value should be between 0.0 and 1.0, where the coordinate
1841 (0.0, 0.0) represents the top left of the texture, and (1.0, 1.0) the
1842 bottom right. <span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1843 </td>
1844 </tr>
1845 <tr>
1846 <td><p><span class="term"><em class="parameter"><code>tex_coords_len</code></em> :</span></p></td>
1847 <td>The length of the <em class="parameter"><code>tex_coords</code></em> array. (For one layer
1848 and one group of texture coordinates, this would be 4)</td>
1849 </tr>
1850 </tbody>
1851 </table></div>
1852 <p class="since">Since 1.10</p>
1853 <p class="stability">Stability Level: Unstable</p>
1854 </div>
1855 <hr>
1856 <div class="refsect2">
1857 <a name="cogl-framebuffer-draw-rectangles"></a><h3>cogl_framebuffer_draw_rectangles ()</h3>
1858 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_draw_rectangles    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
1859                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
1860                                                          <em class="parameter"><code>const <span class="type">float</span> *verts</code></em>,
1861                                                          <em class="parameter"><code>unsigned <span class="type">int</span> n_rects</code></em>);</pre>
1862 <p>
1863 Draws a series of rectangles to <em class="parameter"><code>framebuffer</code></em> with the given
1864 <em class="parameter"><code>pipeline</code></em> state in the same way that
1865 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-rectangle" title="cogl_framebuffer_draw_rectangle ()"><code class="function">cogl_framebuffer_draw_rectangle()</code></a> does.
1866 </p>
1867 <p>
1868 The top left corner of the first rectangle is positioned at
1869 (coordinates[0], coordinates[1]) and the bottom right corner is
1870 positioned at (coordinates[2], coordinates[3]). The positions for
1871 the second rectangle are (coordinates[4], coordinates[5]) and
1872 (coordinates[6], coordinates[7]) and so on...
1873 </p>
1874 <p>
1875 </p>
1876 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1877 <h3 class="title">Note</h3>The position is the position before the rectangle has been
1878 transformed by the model-view matrix and the projection
1879 matrix.</div>
1880 <p>
1881 </p>
1882 <p>
1883 As a general rule for better performance its recommended to use
1884 this this API instead of calling
1885 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-textured-rectangle" title="cogl_framebuffer_draw_textured_rectangle ()"><code class="function">cogl_framebuffer_draw_textured_rectangle()</code></a> separately for multiple
1886 rectangles if all of the rectangles will be drawn together with the
1887 same <em class="parameter"><code>pipeline</code></em> state.
1888 </p>
1889 <div class="variablelist"><table border="0">
1890 <col align="left" valign="top">
1891 <tbody>
1892 <tr>
1893 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1894 <td>A destination <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1895 </td>
1896 </tr>
1897 <tr>
1898 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
1899 <td>A <span class="type">CoglPipeline</span> state object</td>
1900 </tr>
1901 <tr>
1902 <td><p><span class="term"><em class="parameter"><code>coordinates</code></em> :</span></p></td>
1903 <td>an array of coordinates
1904 containing groups of 4 float values: [x_1, y_1, x_2, y_2] that are
1905 interpreted as two position coordinates; one for the top left of
1906 the rectangle (x1, y1), and one for the bottom right of the
1907 rectangle (x2, y2). <span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1908 </td>
1909 </tr>
1910 <tr>
1911 <td><p><span class="term"><em class="parameter"><code>n_rectangles</code></em> :</span></p></td>
1912 <td>number of rectangles defined in <em class="parameter"><code>coordinates</code></em>.</td>
1913 </tr>
1914 </tbody>
1915 </table></div>
1916 <p class="since">Since 1.10</p>
1917 <p class="stability">Stability Level: Unstable</p>
1918 </div>
1919 <hr>
1920 <div class="refsect2">
1921 <a name="cogl-framebuffer-draw-textured-rectangles"></a><h3>cogl_framebuffer_draw_textured_rectangles ()</h3>
1922 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_draw_textured_rectangles
1923                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
1924                                                          <em class="parameter"><code><span class="type">CoglPipeline</span> *pipeline</code></em>,
1925                                                          <em class="parameter"><code>const <span class="type">float</span> *coordinates</code></em>,
1926                                                          <em class="parameter"><code>unsigned <span class="type">int</span> n_rectangles</code></em>);</pre>
1927 <p>
1928 Draws a series of rectangles to <em class="parameter"><code>framebuffer</code></em> with the given
1929 <em class="parameter"><code>pipeline</code></em> state in the same way that
1930 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-textured-rectangle" title="cogl_framebuffer_draw_textured_rectangle ()"><code class="function">cogl_framebuffer_draw_textured_rectangle()</code></a> does.
1931 </p>
1932 <p>
1933 </p>
1934 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1935 <h3 class="title">Note</h3>The position is the position before the rectangle has been
1936 transformed by the model-view matrix and the projection
1937 matrix.</div>
1938 <p>
1939 </p>
1940 <p>
1941 This is a high level drawing api that can handle any kind of
1942 <a class="link" href="cogl-2.0-experimental-High-Level-Meta-Textures.html#CoglMetaTexture" title="CoglMetaTexture"><span class="type">CoglMetaTexture</span></a> texture such as <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a> textures
1943 which may internally be comprised of multiple low-level textures.
1944 This is unlike low-level drawing apis such as
1945 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-primitive" title="cogl_framebuffer_draw_primitive ()"><code class="function">cogl_framebuffer_draw_primitive()</code></a> or
1946 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-attributes" title="cogl_framebuffer_draw_attributes ()"><code class="function">cogl_framebuffer_draw_attributes()</code></a> which only support low level
1947 texture types that are directly supported by GPUs such as
1948 <a class="link" href="cogl-2.0-experimental-2D-textures.html#CoglTexture2D" title="CoglTexture2D"><span class="type">CoglTexture2D</span></a>.
1949 </p>
1950 <p>
1951 The top left corner of the first rectangle is positioned at
1952 (coordinates[0], coordinates[1]) and the bottom right corner is
1953 positioned at (coordinates[2], coordinates[3]). The top left
1954 texture coordinate is (coordinates[4], coordinates[5]) and the
1955 bottom right texture coordinate is (coordinates[6],
1956 coordinates[7]). The coordinates for subsequent rectangles
1957 are defined similarly by the subsequent coordinates.
1958 </p>
1959 <p>
1960 As a general rule for better performance its recommended to use
1961 this this API instead of calling
1962 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-textured-rectangle" title="cogl_framebuffer_draw_textured_rectangle ()"><code class="function">cogl_framebuffer_draw_textured_rectangle()</code></a> separately for multiple
1963 rectangles if all of the rectangles will be drawn together with the
1964 same <em class="parameter"><code>pipeline</code></em> state.
1965 </p>
1966 <p>
1967 The given texture coordinates should always be normalized such that
1968 (0, 0) corresponds to the top left and (1, 1) corresponds to the
1969 bottom right. To map an entire texture across the rectangle pass
1970 in tex_coords[0]=<code class="literal">0</code>, tex_coords[1]=<code class="literal">0</code>, tex_coords[2]=<code class="literal">1</code>,
1971 tex_coords[3]=<code class="literal">1</code>.
1972 </p>
1973 <p>
1974 </p>
1975 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1976 <h3 class="title">Note</h3>Even if you have associated a <a class="link" href="cogl-2.0-experimental-Rectangle-textures-(non-normalized-coordinates).html#CoglTextureRectangle" title="CoglTextureRectangle"><span class="type">CoglTextureRectangle</span></a> texture
1977 which normally implies working with non-normalized texture
1978 coordinates this api should still be passed normalized texture
1979 coordinates.</div>
1980 <p>
1981 </p>
1982 <div class="variablelist"><table border="0">
1983 <col align="left" valign="top">
1984 <tbody>
1985 <tr>
1986 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
1987 <td>A destination <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
1988 </td>
1989 </tr>
1990 <tr>
1991 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
1992 <td>A <span class="type">CoglPipeline</span> state object</td>
1993 </tr>
1994 <tr>
1995 <td><p><span class="term"><em class="parameter"><code>coordinates</code></em> :</span></p></td>
1996 <td>an array containing
1997 groups of 8 float values: [x_1, y_1, x_2, y_2, s_1, t_1, s_2, t_2]
1998 that have the same meaning as the arguments for
1999 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-draw-textured-rectangle" title="cogl_framebuffer_draw_textured_rectangle ()"><code class="function">cogl_framebuffer_draw_textured_rectangle()</code></a>. <span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
2000 </td>
2001 </tr>
2002 <tr>
2003 <td><p><span class="term"><em class="parameter"><code>n_rectangles</code></em> :</span></p></td>
2004 <td>number of rectangles to <em class="parameter"><code>coordinates</code></em> to draw</td>
2005 </tr>
2006 </tbody>
2007 </table></div>
2008 <p class="since">Since 1.10</p>
2009 <p class="stability">Stability Level: Unstable</p>
2010 </div>
2011 <hr>
2012 <div class="refsect2">
2013 <a name="cogl-framebuffer-finish"></a><h3>cogl_framebuffer_finish ()</h3>
2014 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_finish             (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
2015 <p>
2016 This blocks the CPU until all pending rendering associated with the
2017 specified framebuffer has completed. It's very rare that developers should
2018 ever need this level of synchronization with the GPU and should never be
2019 used unless you clearly understand why you need to explicitly force
2020 synchronization.
2021 </p>
2022 <p>
2023 One example might be for benchmarking purposes to be sure timing
2024 measurements reflect the time that the GPU is busy for not just the time it
2025 takes to queue rendering commands.
2026 </p>
2027 <div class="variablelist"><table border="0">
2028 <col align="left" valign="top">
2029 <tbody><tr>
2030 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2031 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2032 </tr></tbody>
2033 </table></div>
2034 <p class="since">Since 1.10</p>
2035 <p class="stability">Stability Level: Unstable</p>
2036 </div>
2037 <hr>
2038 <div class="refsect2">
2039 <a name="cogl-framebuffer-push-matrix"></a><h3>cogl_framebuffer_push_matrix ()</h3>
2040 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_push_matrix        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
2041 <p>
2042 Copies the current model-view matrix onto the matrix stack. The matrix
2043 can later be restored with <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-pop-matrix" title="cogl_framebuffer_pop_matrix ()"><code class="function">cogl_framebuffer_pop_matrix()</code></a>.
2044 </p>
2045 <div class="variablelist"><table border="0">
2046 <col align="left" valign="top">
2047 <tbody><tr>
2048 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2049 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2050 </tr></tbody>
2051 </table></div>
2052 <p class="since">Since 1.10</p>
2053 </div>
2054 <hr>
2055 <div class="refsect2">
2056 <a name="cogl-framebuffer-pop-matrix"></a><h3>cogl_framebuffer_pop_matrix ()</h3>
2057 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_pop_matrix         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
2058 <p>
2059 Restores the model-view matrix on the top of the matrix stack.
2060 </p>
2061 <div class="variablelist"><table border="0">
2062 <col align="left" valign="top">
2063 <tbody><tr>
2064 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2065 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2066 </tr></tbody>
2067 </table></div>
2068 <p class="since">Since 1.10</p>
2069 </div>
2070 <hr>
2071 <div class="refsect2">
2072 <a name="cogl-framebuffer-identity-matrix"></a><h3>cogl_framebuffer_identity_matrix ()</h3>
2073 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_identity_matrix    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
2074 <p>
2075 Resets the current model-view matrix to the identity matrix.
2076 </p>
2077 <div class="variablelist"><table border="0">
2078 <col align="left" valign="top">
2079 <tbody><tr>
2080 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2081 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2082 </tr></tbody>
2083 </table></div>
2084 <p class="since">Since 1.10</p>
2085 <p class="stability">Stability Level: Unstable</p>
2086 </div>
2087 <hr>
2088 <div class="refsect2">
2089 <a name="cogl-framebuffer-scale"></a><h3>cogl_framebuffer_scale ()</h3>
2090 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_scale              (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2091                                                          <em class="parameter"><code><span class="type">float</span> x</code></em>,
2092                                                          <em class="parameter"><code><span class="type">float</span> y</code></em>,
2093                                                          <em class="parameter"><code><span class="type">float</span> z</code></em>);</pre>
2094 <p>
2095 Multiplies the current model-view matrix by one that scales the x,
2096 y and z axes by the given values.
2097 </p>
2098 <div class="variablelist"><table border="0">
2099 <col align="left" valign="top">
2100 <tbody>
2101 <tr>
2102 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2103 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2104 </tr>
2105 <tr>
2106 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
2107 <td>Amount to scale along the x-axis</td>
2108 </tr>
2109 <tr>
2110 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
2111 <td>Amount to scale along the y-axis</td>
2112 </tr>
2113 <tr>
2114 <td><p><span class="term"><em class="parameter"><code>z</code></em> :</span></p></td>
2115 <td>Amount to scale along the z-axis</td>
2116 </tr>
2117 </tbody>
2118 </table></div>
2119 <p class="since">Since 1.10</p>
2120 <p class="stability">Stability Level: Unstable</p>
2121 </div>
2122 <hr>
2123 <div class="refsect2">
2124 <a name="cogl-framebuffer-translate"></a><h3>cogl_framebuffer_translate ()</h3>
2125 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_translate          (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2126                                                          <em class="parameter"><code><span class="type">float</span> x</code></em>,
2127                                                          <em class="parameter"><code><span class="type">float</span> y</code></em>,
2128                                                          <em class="parameter"><code><span class="type">float</span> z</code></em>);</pre>
2129 <p>
2130 Multiplies the current model-view matrix by one that translates the
2131 model along all three axes according to the given values.
2132 </p>
2133 <div class="variablelist"><table border="0">
2134 <col align="left" valign="top">
2135 <tbody>
2136 <tr>
2137 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2138 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2139 </tr>
2140 <tr>
2141 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
2142 <td>Distance to translate along the x-axis</td>
2143 </tr>
2144 <tr>
2145 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
2146 <td>Distance to translate along the y-axis</td>
2147 </tr>
2148 <tr>
2149 <td><p><span class="term"><em class="parameter"><code>z</code></em> :</span></p></td>
2150 <td>Distance to translate along the z-axis</td>
2151 </tr>
2152 </tbody>
2153 </table></div>
2154 <p class="since">Since 1.10</p>
2155 <p class="stability">Stability Level: Unstable</p>
2156 </div>
2157 <hr>
2158 <div class="refsect2">
2159 <a name="cogl-framebuffer-rotate"></a><h3>cogl_framebuffer_rotate ()</h3>
2160 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_rotate             (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2161                                                          <em class="parameter"><code><span class="type">float</span> angle</code></em>,
2162                                                          <em class="parameter"><code><span class="type">float</span> x</code></em>,
2163                                                          <em class="parameter"><code><span class="type">float</span> y</code></em>,
2164                                                          <em class="parameter"><code><span class="type">float</span> z</code></em>);</pre>
2165 <p>
2166 Multiplies the current model-view matrix by one that rotates the
2167 model around the vertex specified by <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> and <em class="parameter"><code>z</code></em>. The rotation
2168 follows the right-hand thumb rule so for example rotating by 10
2169 degrees about the vertex (0, 0, 1) causes a small counter-clockwise
2170 rotation.
2171 </p>
2172 <div class="variablelist"><table border="0">
2173 <col align="left" valign="top">
2174 <tbody>
2175 <tr>
2176 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2177 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2178 </tr>
2179 <tr>
2180 <td><p><span class="term"><em class="parameter"><code>angle</code></em> :</span></p></td>
2181 <td>Angle in degrees to rotate.</td>
2182 </tr>
2183 <tr>
2184 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
2185 <td>X-component of vertex to rotate around.</td>
2186 </tr>
2187 <tr>
2188 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
2189 <td>Y-component of vertex to rotate around.</td>
2190 </tr>
2191 <tr>
2192 <td><p><span class="term"><em class="parameter"><code>z</code></em> :</span></p></td>
2193 <td>Z-component of vertex to rotate around.</td>
2194 </tr>
2195 </tbody>
2196 </table></div>
2197 <p class="since">Since 1.10</p>
2198 <p class="stability">Stability Level: Unstable</p>
2199 </div>
2200 <hr>
2201 <div class="refsect2">
2202 <a name="cogl-framebuffer-transform"></a><h3>cogl_framebuffer_transform ()</h3>
2203 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_transform          (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2204                                                          <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
2205 <p>
2206 Multiplies the current model-view matrix by the given matrix.
2207 </p>
2208 <div class="variablelist"><table border="0">
2209 <col align="left" valign="top">
2210 <tbody>
2211 <tr>
2212 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2213 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2214 </tr>
2215 <tr>
2216 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
2217 <td>the matrix to multiply with the current model-view</td>
2218 </tr>
2219 </tbody>
2220 </table></div>
2221 <p class="since">Since 1.10</p>
2222 <p class="stability">Stability Level: Unstable</p>
2223 </div>
2224 <hr>
2225 <div class="refsect2">
2226 <a name="cogl-framebuffer-get-modelview-matrix"></a><h3>cogl_framebuffer_get_modelview_matrix ()</h3>
2227 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_get_modelview_matrix
2228                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2229                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
2230 <p>
2231 Stores the current model-view matrix in <em class="parameter"><code>matrix</code></em>.
2232 </p>
2233 <div class="variablelist"><table border="0">
2234 <col align="left" valign="top">
2235 <tbody>
2236 <tr>
2237 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2238 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2239 </tr>
2240 <tr>
2241 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
2242 <td>return location for the model-view matrix. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
2243 </td>
2244 </tr>
2245 </tbody>
2246 </table></div>
2247 <p class="since">Since 1.10</p>
2248 <p class="stability">Stability Level: Unstable</p>
2249 </div>
2250 <hr>
2251 <div class="refsect2">
2252 <a name="cogl-framebuffer-set-modelview-matrix"></a><h3>cogl_framebuffer_set_modelview_matrix ()</h3>
2253 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_set_modelview_matrix
2254                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2255                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
2256 <p>
2257 Sets <em class="parameter"><code>matrix</code></em> as the new model-view matrix.
2258 </p>
2259 <div class="variablelist"><table border="0">
2260 <col align="left" valign="top">
2261 <tbody>
2262 <tr>
2263 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2264 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2265 </tr>
2266 <tr>
2267 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
2268 <td>the new model-view matrix</td>
2269 </tr>
2270 </tbody>
2271 </table></div>
2272 <p class="since">Since 1.10</p>
2273 <p class="stability">Stability Level: Unstable</p>
2274 </div>
2275 <hr>
2276 <div class="refsect2">
2277 <a name="cogl-framebuffer-perspective"></a><h3>cogl_framebuffer_perspective ()</h3>
2278 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_perspective        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2279                                                          <em class="parameter"><code><span class="type">float</span> fov_y</code></em>,
2280                                                          <em class="parameter"><code><span class="type">float</span> aspect</code></em>,
2281                                                          <em class="parameter"><code><span class="type">float</span> z_near</code></em>,
2282                                                          <em class="parameter"><code><span class="type">float</span> z_far</code></em>);</pre>
2283 <p>
2284 Replaces the current projection matrix with a perspective matrix
2285 based on the provided values.
2286 </p>
2287 <p>
2288 </p>
2289 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
2290 <h3 class="title">Note</h3>You should be careful not to have to great a <em class="parameter"><code>z_far</code></em> / <em class="parameter"><code>z_near</code></em>
2291 ratio since that will reduce the effectiveness of depth testing
2292 since there wont be enough precision to identify the depth of
2293 objects near to each other.</div>
2294 <p>
2295 </p>
2296 <div class="variablelist"><table border="0">
2297 <col align="left" valign="top">
2298 <tbody>
2299 <tr>
2300 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2301 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2302 </tr>
2303 <tr>
2304 <td><p><span class="term"><em class="parameter"><code>fov_y</code></em> :</span></p></td>
2305 <td>Vertical field of view angle in degrees.</td>
2306 </tr>
2307 <tr>
2308 <td><p><span class="term"><em class="parameter"><code>aspect</code></em> :</span></p></td>
2309 <td>The (width over height) aspect ratio for display</td>
2310 </tr>
2311 <tr>
2312 <td><p><span class="term"><em class="parameter"><code>z_near</code></em> :</span></p></td>
2313 <td>The distance to the near clipping plane (Must be positive,
2314 and must not be 0)</td>
2315 </tr>
2316 <tr>
2317 <td><p><span class="term"><em class="parameter"><code>z_far</code></em> :</span></p></td>
2318 <td>The distance to the far clipping plane (Must be positive)</td>
2319 </tr>
2320 </tbody>
2321 </table></div>
2322 <p class="since">Since 1.10</p>
2323 <p class="stability">Stability Level: Unstable</p>
2324 </div>
2325 <hr>
2326 <div class="refsect2">
2327 <a name="cogl-framebuffer-frustum"></a><h3>cogl_framebuffer_frustum ()</h3>
2328 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_frustum            (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2329                                                          <em class="parameter"><code><span class="type">float</span> left</code></em>,
2330                                                          <em class="parameter"><code><span class="type">float</span> right</code></em>,
2331                                                          <em class="parameter"><code><span class="type">float</span> bottom</code></em>,
2332                                                          <em class="parameter"><code><span class="type">float</span> top</code></em>,
2333                                                          <em class="parameter"><code><span class="type">float</span> z_near</code></em>,
2334                                                          <em class="parameter"><code><span class="type">float</span> z_far</code></em>);</pre>
2335 <p>
2336 Replaces the current projection matrix with a perspective matrix
2337 for a given viewing frustum defined by 4 side clip planes that
2338 all cross through the origin and 2 near and far clip planes.
2339 </p>
2340 <div class="variablelist"><table border="0">
2341 <col align="left" valign="top">
2342 <tbody>
2343 <tr>
2344 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2345 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2346 </tr>
2347 <tr>
2348 <td><p><span class="term"><em class="parameter"><code>left</code></em> :</span></p></td>
2349 <td>X position of the left clipping plane where it
2350 intersects the near clipping plane</td>
2351 </tr>
2352 <tr>
2353 <td><p><span class="term"><em class="parameter"><code>right</code></em> :</span></p></td>
2354 <td>X position of the right clipping plane where it
2355 intersects the near clipping plane</td>
2356 </tr>
2357 <tr>
2358 <td><p><span class="term"><em class="parameter"><code>bottom</code></em> :</span></p></td>
2359 <td>Y position of the bottom clipping plane where it
2360 intersects the near clipping plane</td>
2361 </tr>
2362 <tr>
2363 <td><p><span class="term"><em class="parameter"><code>top</code></em> :</span></p></td>
2364 <td>Y position of the top clipping plane where it intersects
2365 the near clipping plane</td>
2366 </tr>
2367 <tr>
2368 <td><p><span class="term"><em class="parameter"><code>z_near</code></em> :</span></p></td>
2369 <td>The distance to the near clipping plane (Must be positive)</td>
2370 </tr>
2371 <tr>
2372 <td><p><span class="term"><em class="parameter"><code>z_far</code></em> :</span></p></td>
2373 <td>The distance to the far clipping plane (Must be positive)</td>
2374 </tr>
2375 </tbody>
2376 </table></div>
2377 <p class="since">Since 1.10</p>
2378 <p class="stability">Stability Level: Unstable</p>
2379 </div>
2380 <hr>
2381 <div class="refsect2">
2382 <a name="cogl-framebuffer-orthographic"></a><h3>cogl_framebuffer_orthographic ()</h3>
2383 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_orthographic       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2384                                                          <em class="parameter"><code><span class="type">float</span> x_1</code></em>,
2385                                                          <em class="parameter"><code><span class="type">float</span> y_1</code></em>,
2386                                                          <em class="parameter"><code><span class="type">float</span> x_2</code></em>,
2387                                                          <em class="parameter"><code><span class="type">float</span> y_2</code></em>,
2388                                                          <em class="parameter"><code><span class="type">float</span> near</code></em>,
2389                                                          <em class="parameter"><code><span class="type">float</span> far</code></em>);</pre>
2390 <p>
2391 Replaces the current projection matrix with an orthographic projection
2392 matrix.
2393 </p>
2394 <div class="variablelist"><table border="0">
2395 <col align="left" valign="top">
2396 <tbody>
2397 <tr>
2398 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2399 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2400 </tr>
2401 <tr>
2402 <td><p><span class="term"><em class="parameter"><code>x_1</code></em> :</span></p></td>
2403 <td>The x coordinate for the first vertical clipping plane</td>
2404 </tr>
2405 <tr>
2406 <td><p><span class="term"><em class="parameter"><code>y_1</code></em> :</span></p></td>
2407 <td>The y coordinate for the first horizontal clipping plane</td>
2408 </tr>
2409 <tr>
2410 <td><p><span class="term"><em class="parameter"><code>x_2</code></em> :</span></p></td>
2411 <td>The x coordinate for the second vertical clipping plane</td>
2412 </tr>
2413 <tr>
2414 <td><p><span class="term"><em class="parameter"><code>y_2</code></em> :</span></p></td>
2415 <td>The y coordinate for the second horizontal clipping plane</td>
2416 </tr>
2417 <tr>
2418 <td><p><span class="term"><em class="parameter"><code>near</code></em> :</span></p></td>
2419 <td>The <span class="emphasis"><em>distance</em></span> to the near clipping
2420 plane (will be <span class="emphasis"><em>negative</em></span> if the plane is
2421 behind the viewer)</td>
2422 </tr>
2423 <tr>
2424 <td><p><span class="term"><em class="parameter"><code>far</code></em> :</span></p></td>
2425 <td>The <span class="emphasis"><em>distance</em></span> to the far clipping
2426 plane (will be <span class="emphasis"><em>negative</em></span> if the plane is
2427 behind the viewer)</td>
2428 </tr>
2429 </tbody>
2430 </table></div>
2431 <p class="since">Since 1.10</p>
2432 <p class="stability">Stability Level: Unstable</p>
2433 </div>
2434 <hr>
2435 <div class="refsect2">
2436 <a name="cogl-framebuffer-get-projection-matrix"></a><h3>cogl_framebuffer_get_projection_matrix ()</h3>
2437 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_get_projection_matrix
2438                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2439                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
2440 <p>
2441 Stores the current projection matrix in <em class="parameter"><code>matrix</code></em>.
2442 </p>
2443 <div class="variablelist"><table border="0">
2444 <col align="left" valign="top">
2445 <tbody>
2446 <tr>
2447 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2448 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2449 </tr>
2450 <tr>
2451 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
2452 <td>return location for the projection matrix. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
2453 </td>
2454 </tr>
2455 </tbody>
2456 </table></div>
2457 <p class="since">Since 1.10</p>
2458 <p class="stability">Stability Level: Unstable</p>
2459 </div>
2460 <hr>
2461 <div class="refsect2">
2462 <a name="cogl-framebuffer-set-projection-matrix"></a><h3>cogl_framebuffer_set_projection_matrix ()</h3>
2463 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_set_projection_matrix
2464                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2465                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="type">CoglMatrix</span></a> *matrix</code></em>);</pre>
2466 <p>
2467 Sets <em class="parameter"><code>matrix</code></em> as the new projection matrix.
2468 </p>
2469 <div class="variablelist"><table border="0">
2470 <col align="left" valign="top">
2471 <tbody>
2472 <tr>
2473 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2474 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2475 </tr>
2476 <tr>
2477 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
2478 <td>the new projection matrix</td>
2479 </tr>
2480 </tbody>
2481 </table></div>
2482 <p class="since">Since 1.10</p>
2483 <p class="stability">Stability Level: Unstable</p>
2484 </div>
2485 <hr>
2486 <div class="refsect2">
2487 <a name="cogl-framebuffer-push-scissor-clip"></a><h3>cogl_framebuffer_push_scissor_clip ()</h3>
2488 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_push_scissor_clip  (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2489                                                          <em class="parameter"><code><span class="type">int</span> x</code></em>,
2490                                                          <em class="parameter"><code><span class="type">int</span> y</code></em>,
2491                                                          <em class="parameter"><code><span class="type">int</span> width</code></em>,
2492                                                          <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
2493 <p>
2494 Specifies a rectangular clipping area for all subsequent drawing
2495 operations. Any drawing commands that extend outside the rectangle
2496 will be clipped so that only the portion inside the rectangle will
2497 be displayed. The rectangle dimensions are not transformed by the
2498 current model-view matrix.
2499 </p>
2500 <p>
2501 The rectangle is intersected with the current clip region. To undo
2502 the effect of this function, call <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-pop-clip" title="cogl_framebuffer_pop_clip ()"><code class="function">cogl_framebuffer_pop_clip()</code></a>.
2503 </p>
2504 <div class="variablelist"><table border="0">
2505 <col align="left" valign="top">
2506 <tbody>
2507 <tr>
2508 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2509 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2510 </tr>
2511 <tr>
2512 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
2513 <td>left edge of the clip rectangle in window coordinates</td>
2514 </tr>
2515 <tr>
2516 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
2517 <td>top edge of the clip rectangle in window coordinates</td>
2518 </tr>
2519 <tr>
2520 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
2521 <td>width of the clip rectangle</td>
2522 </tr>
2523 <tr>
2524 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
2525 <td>height of the clip rectangle</td>
2526 </tr>
2527 </tbody>
2528 </table></div>
2529 <p class="since">Since 1.10</p>
2530 <p class="stability">Stability Level: Unstable</p>
2531 </div>
2532 <hr>
2533 <div class="refsect2">
2534 <a name="cogl-framebuffer-push-rectangle-clip"></a><h3>cogl_framebuffer_push_rectangle_clip ()</h3>
2535 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_push_rectangle_clip
2536                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2537                                                          <em class="parameter"><code><span class="type">float</span> x_1</code></em>,
2538                                                          <em class="parameter"><code><span class="type">float</span> y_1</code></em>,
2539                                                          <em class="parameter"><code><span class="type">float</span> x_2</code></em>,
2540                                                          <em class="parameter"><code><span class="type">float</span> y_2</code></em>);</pre>
2541 <p>
2542 Specifies a modelview transformed rectangular clipping area for all
2543 subsequent drawing operations. Any drawing commands that extend
2544 outside the rectangle will be clipped so that only the portion
2545 inside the rectangle will be displayed. The rectangle dimensions
2546 are transformed by the current model-view matrix.
2547 </p>
2548 <p>
2549 The rectangle is intersected with the current clip region. To undo
2550 the effect of this function, call <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-pop-clip" title="cogl_framebuffer_pop_clip ()"><code class="function">cogl_framebuffer_pop_clip()</code></a>.
2551 </p>
2552 <div class="variablelist"><table border="0">
2553 <col align="left" valign="top">
2554 <tbody>
2555 <tr>
2556 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2557 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2558 </tr>
2559 <tr>
2560 <td><p><span class="term"><em class="parameter"><code>x_1</code></em> :</span></p></td>
2561 <td>x coordinate for top left corner of the clip rectangle</td>
2562 </tr>
2563 <tr>
2564 <td><p><span class="term"><em class="parameter"><code>y_1</code></em> :</span></p></td>
2565 <td>y coordinate for top left corner of the clip rectangle</td>
2566 </tr>
2567 <tr>
2568 <td><p><span class="term"><em class="parameter"><code>x_2</code></em> :</span></p></td>
2569 <td>x coordinate for bottom right corner of the clip rectangle</td>
2570 </tr>
2571 <tr>
2572 <td><p><span class="term"><em class="parameter"><code>y_2</code></em> :</span></p></td>
2573 <td>y coordinate for bottom right corner of the clip rectangle</td>
2574 </tr>
2575 </tbody>
2576 </table></div>
2577 <p class="since">Since 1.10</p>
2578 <p class="stability">Stability Level: Unstable</p>
2579 </div>
2580 <hr>
2581 <div class="refsect2">
2582 <a name="cogl-framebuffer-push-primitive-clip"></a><h3>cogl_framebuffer_push_primitive_clip ()</h3>
2583 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_push_primitive_clip
2584                                                         (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
2585                                                          <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Primitives.html#CoglPrimitive" title="CoglPrimitive"><span class="type">CoglPrimitive</span></a> *primitive</code></em>,
2586                                                          <em class="parameter"><code><span class="type">float</span> bounds_x1</code></em>,
2587                                                          <em class="parameter"><code><span class="type">float</span> bounds_y1</code></em>,
2588                                                          <em class="parameter"><code><span class="type">float</span> bounds_x2</code></em>,
2589                                                          <em class="parameter"><code><span class="type">float</span> bounds_y2</code></em>);</pre>
2590 <p>
2591 Sets a new clipping area using a 2D shaped described with a
2592 <a class="link" href="cogl-2.0-experimental-Primitives.html#CoglPrimitive" title="CoglPrimitive"><span class="type">CoglPrimitive</span></a>. The shape must not contain self overlapping
2593 geometry and must lie on a single 2D plane. A bounding box of the
2594 2D shape in local coordinates (the same coordinates used to
2595 describe the shape) must be given. It is acceptable for the bounds
2596 to be larger than the true bounds but behaviour is undefined if the
2597 bounds are smaller than the true bounds.
2598 </p>
2599 <p>
2600 The primitive is transformed by the current model-view matrix and
2601 the silhouette is intersected with the previous clipping area.  To
2602 restore the previous clipping area, call
2603 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-pop-clip" title="cogl_framebuffer_pop_clip ()"><code class="function">cogl_framebuffer_pop_clip()</code></a>.
2604 </p>
2605 <div class="variablelist"><table border="0">
2606 <col align="left" valign="top">
2607 <tbody>
2608 <tr>
2609 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2610 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2611 </tr>
2612 <tr>
2613 <td><p><span class="term"><em class="parameter"><code>primitive</code></em> :</span></p></td>
2614 <td>A <a class="link" href="cogl-2.0-experimental-Primitives.html#CoglPrimitive" title="CoglPrimitive"><span class="type">CoglPrimitive</span></a> describing a flat 2D shape</td>
2615 </tr>
2616 <tr>
2617 <td><p><span class="term"><em class="parameter"><code>bounds_x1</code></em> :</span></p></td>
2618 <td>x coordinate for the top-left corner of the primitives
2619 bounds</td>
2620 </tr>
2621 <tr>
2622 <td><p><span class="term"><em class="parameter"><code>bounds_y1</code></em> :</span></p></td>
2623 <td>y coordinate for the top-left corner of the primitives
2624 bounds</td>
2625 </tr>
2626 <tr>
2627 <td><p><span class="term"><em class="parameter"><code>bounds_x2</code></em> :</span></p></td>
2628 <td>x coordinate for the top-left corner of the primitives
2629 bounds</td>
2630 </tr>
2631 <tr>
2632 <td><p><span class="term"><em class="parameter"><code>bounds_y2</code></em> :</span></p></td>
2633 <td>x coordinate for the bottom-right corner of the
2634 primitives bounds.</td>
2635 </tr>
2636 <tr>
2637 <td><p><span class="term"><em class="parameter"><code>bounds_x1</code></em> :</span></p></td>
2638 <td>y coordinate for the bottom-right corner of the
2639 primitives bounds.</td>
2640 </tr>
2641 </tbody>
2642 </table></div>
2643 <p class="since">Since 1.10</p>
2644 <p class="stability">Stability Level: Unstable</p>
2645 </div>
2646 <hr>
2647 <div class="refsect2">
2648 <a name="cogl-framebuffer-pop-clip"></a><h3>cogl_framebuffer_pop_clip ()</h3>
2649 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_framebuffer_pop_clip           (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>);</pre>
2650 <p>
2651 Reverts the clipping region to the state before the last call to
2652 <code class="function">cogl_framebuffer_push_clip()</code>.
2653 </p>
2654 <div class="variablelist"><table border="0">
2655 <col align="left" valign="top">
2656 <tbody><tr>
2657 <td><p><span class="term"><em class="parameter"><code>framebuffer</code></em> :</span></p></td>
2658 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> pointer</td>
2659 </tr></tbody>
2660 </table></div>
2661 <p class="since">Since 1.10</p>
2662 <p class="stability">Stability Level: Unstable</p>
2663 </div>
2664 <hr>
2665 <div class="refsect2">
2666 <a name="cogl-get-draw-framebuffer"></a><h3>cogl_get_draw_framebuffer ()</h3>
2667 <pre class="programlisting"><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="returnvalue">CoglFramebuffer</span></a> *   cogl_get_draw_framebuffer           (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
2668 <p>
2669 Gets the current <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> as set using
2670 <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-push-framebuffer" title="cogl_push_framebuffer ()"><code class="function">cogl_push_framebuffer()</code></a>
2671 </p>
2672 <div class="variablelist"><table border="0">
2673 <col align="left" valign="top">
2674 <tbody><tr>
2675 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
2676 <td>The current <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a>
2677 </td>
2678 </tr></tbody>
2679 </table></div>
2680 <p class="since">Since 1.8</p>
2681 <p class="stability">Stability Level: Unstable</p>
2682 </div>
2683 <hr>
2684 <div class="refsect2">
2685 <a name="cogl-set-framebuffer"></a><h3>cogl_set_framebuffer ()</h3>
2686 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_set_framebuffer                (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *buffer</code></em>);</pre>
2687 <p>
2688 This redirects all subsequent drawing to the specified framebuffer. This can
2689 either be an offscreen buffer created with <a class="link" href="cogl-2.0-experimental-Offscreen-Framebuffers.html#cogl-offscreen-new-to-texture" title="cogl_offscreen_new_to_texture ()"><code class="function">cogl_offscreen_new_to_texture()</code></a>
2690 or in the future it may be an onscreen framebuffers too.
2691 </p>
2692 <div class="variablelist"><table border="0">
2693 <col align="left" valign="top">
2694 <tbody><tr>
2695 <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
2696 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> object, either onscreen or offscreen.</td>
2697 </tr></tbody>
2698 </table></div>
2699 <p class="since">Since 1.2</p>
2700 </div>
2701 <hr>
2702 <div class="refsect2">
2703 <a name="cogl-push-framebuffer"></a><h3>cogl_push_framebuffer ()</h3>
2704 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_push_framebuffer               (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *buffer</code></em>);</pre>
2705 <p>
2706 Redirects all subsequent drawing to the specified framebuffer. This can
2707 either be an offscreen buffer created with <a class="link" href="cogl-2.0-experimental-Offscreen-Framebuffers.html#cogl-offscreen-new-to-texture" title="cogl_offscreen_new_to_texture ()"><code class="function">cogl_offscreen_new_to_texture()</code></a>
2708 or in the future it may be an onscreen framebuffer too.
2709 </p>
2710 <p>
2711 You should understand that a framebuffer owns the following state:
2712 </p>
2713 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
2714 <li class="listitem">The projection matrix</li>
2715 <li class="listitem">The modelview matrix stack</li>
2716 <li class="listitem">The viewport</li>
2717 <li class="listitem">The clip stack</li>
2718 </ul></div>
2719 <p>
2720 So these items will automatically be saved and restored when you
2721 push and pop between different framebuffers.
2722 </p>
2723 <p>
2724 Also remember a newly allocated framebuffer will have an identity matrix for
2725 the projection and modelview matrices which gives you a coordinate space
2726 like OpenGL with (-1, -1) corresponding to the top left of the viewport,
2727 (1, 1) corresponding to the bottom right and +z coming out towards the
2728 viewer.
2729 </p>
2730 <p>
2731 If you want to set up a coordinate space like Clutter does with (0, 0)
2732 corresponding to the top left and (framebuffer_width, framebuffer_height)
2733 corresponding to the bottom right you can do so like this:
2734 </p>
2735 <p>
2736 </p>
2737 <div class="informalexample">
2738   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
2739     <tbody>
2740       <tr>
2741         <td class="listing_lines" align="right"><pre>1
2742 2
2743 3
2744 4
2745 5
2746 6
2747 7
2748 8
2749 9
2750 10
2751 11
2752 12
2753 13
2754 14
2755 15
2756 16
2757 17
2758 18
2759 19
2760 20
2761 21
2762 22
2763 23
2764 24
2765 25
2766 26
2767 27
2768 28
2769 29
2770 30
2771 31
2772 32
2773 33
2774 34
2775 35
2776 36
2777 37
2778 38
2779 39
2780 40
2781 41
2782 42
2783 43</pre></td>
2784         <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2785 <span class="function">setup_viewport</span><span class="normal"> </span><span class="symbol">(</span><span class="type">unsigned</span><span class="normal"> </span><span class="type">int</span><span class="normal"> width</span><span class="symbol">,</span>
2786 <span class="normal">                </span><span class="type">unsigned</span><span class="normal"> </span><span class="type">int</span><span class="normal"> height</span><span class="symbol">,</span>
2787 <span class="normal">                </span><span class="type">float</span><span class="normal"> fovy</span><span class="symbol">,</span>
2788 <span class="normal">                </span><span class="type">float</span><span class="normal"> aspect</span><span class="symbol">,</span>
2789 <span class="normal">                </span><span class="type">float</span><span class="normal"> z_near</span><span class="symbol">,</span>
2790 <span class="normal">                </span><span class="type">float</span><span class="normal"> z_far</span><span class="symbol">)</span>
2791 <span class="cbracket">{</span>
2792 <span class="normal">  </span><span class="type">float</span><span class="normal"> z_camera</span><span class="symbol">;</span>
2793 <span class="normal">  </span><span class="usertype">CoglMatrix</span><span class="normal"> projection_matrix</span><span class="symbol">;</span>
2794 <span class="normal">  </span><span class="usertype">CoglMatrix</span><span class="normal"> mv_matrix</span><span class="symbol">;</span>
2795
2796 <span class="normal">  </span><span class="function"><a href="cogl-2.0-experimental-The-Top-Level-Context.html#cogl-set-viewport">cogl_set_viewport</a></span><span class="normal"> </span><span class="symbol">(</span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> width</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">);</span>
2797 <span class="normal">  </span><span class="function"><a href="cogl-2.0-experimental-The-Top-Level-Context.html#cogl-perspective">cogl_perspective</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">fovy</span><span class="symbol">,</span><span class="normal"> aspect</span><span class="symbol">,</span><span class="normal"> z_near</span><span class="symbol">,</span><span class="normal"> z_far</span><span class="symbol">);</span>
2798
2799 <span class="normal">  </span><span class="function"><a href="cogl-2.0-experimental-The-Top-Level-Context.html#cogl-get-projection-matrix">cogl_get_projection_matrix</a></span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">projection_matrix</span><span class="symbol">);</span>
2800 <span class="normal">  z_camera </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0.5</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> projection_matrix</span><span class="symbol">.</span><span class="normal">xx</span><span class="symbol">;</span>
2801
2802 <span class="normal">  </span><span class="function"><a href="cogl-2.0-experimental-Matrices.html#cogl-matrix-init-identity">cogl_matrix_init_identity</a></span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">mv_matrix</span><span class="symbol">);</span>
2803 <span class="normal">  </span><span class="function"><a href="cogl-2.0-experimental-Matrices.html#cogl-matrix-translate">cogl_matrix_translate</a></span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">mv_matrix</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="number">0</span><span class="symbol">.</span><span class="normal">5f</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="number">0</span><span class="symbol">.</span><span class="normal">5f</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="normal">z_camera</span><span class="symbol">);</span>
2804 <span class="normal">  </span><span class="function"><a href="cogl-2.0-experimental-Matrices.html#cogl-matrix-scale">cogl_matrix_scale</a></span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">mv_matrix</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">.</span><span class="normal">0f </span><span class="symbol">/</span><span class="normal"> width</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">.</span><span class="normal">0f </span><span class="symbol">/</span><span class="normal"> height</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">.</span><span class="normal">0f </span><span class="symbol">/</span><span class="normal"> width</span><span class="symbol">);</span>
2805 <span class="normal">  </span><span class="function"><a href="cogl-2.0-experimental-Matrices.html#cogl-matrix-translate">cogl_matrix_translate</a></span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">mv_matrix</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">.</span><span class="normal">0f</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="number">1.0</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> height</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">.</span><span class="normal">0f</span><span class="symbol">);</span>
2806 <span class="normal">  </span><span class="function"><a href="cogl-2.0-experimental-The-Top-Level-Context.html#cogl-set-modelview-matrix">cogl_set_modelview_matrix</a></span><span class="normal"> </span><span class="symbol">(&amp;</span><span class="normal">mv_matrix</span><span class="symbol">);</span>
2807 <span class="cbracket">}</span>
2808
2809 <span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
2810 <span class="function">my_init_framebuffer</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ClutterStage</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">stage</span><span class="symbol">,</span>
2811 <span class="normal">                     </span><span class="usertype">CoglFramebuffer</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">framebuffer</span><span class="symbol">,</span>
2812 <span class="normal">                     </span><span class="type">unsigned</span><span class="normal"> </span><span class="type">int</span><span class="normal"> framebuffer_width</span><span class="symbol">,</span>
2813 <span class="normal">                     </span><span class="type">unsigned</span><span class="normal"> </span><span class="type">int</span><span class="normal"> framebuffer_height</span><span class="symbol">)</span>
2814 <span class="cbracket">{</span>
2815 <span class="normal">  </span><span class="usertype">ClutterPerspective</span><span class="normal"> perspective</span><span class="symbol">;</span>
2816
2817 <span class="normal">  </span><span class="function">clutter_stage_get_perspective</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">perspective</span><span class="symbol">);</span>
2818
2819 <span class="normal">  </span><span class="function"><a href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-push-framebuffer">cogl_push_framebuffer</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">framebuffer</span><span class="symbol">);</span>
2820 <span class="normal">  </span><span class="function">setup_viewport</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">framebuffer_width</span><span class="symbol">,</span>
2821 <span class="normal">                  framebuffer_height</span><span class="symbol">,</span>
2822 <span class="normal">                  perspective</span><span class="symbol">.</span><span class="normal">fovy</span><span class="symbol">,</span>
2823 <span class="normal">                  perspective</span><span class="symbol">.</span><span class="normal">aspect</span><span class="symbol">,</span>
2824 <span class="normal">                  perspective</span><span class="symbol">.</span><span class="normal">z_near</span><span class="symbol">,</span>
2825 <span class="normal">                  perspective</span><span class="symbol">.</span><span class="normal">z_far</span><span class="symbol">);</span>
2826 <span class="cbracket">}</span></pre></td>
2827       </tr>
2828     </tbody>
2829   </table>
2830 </div>
2831
2832 <p>
2833 </p>
2834 <p>
2835 The previous framebuffer can be restored by calling <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-pop-framebuffer" title="cogl_pop_framebuffer ()"><code class="function">cogl_pop_framebuffer()</code></a>
2836 </p>
2837 <div class="variablelist"><table border="0">
2838 <col align="left" valign="top">
2839 <tbody><tr>
2840 <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
2841 <td>A <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> object, either onscreen or offscreen.</td>
2842 </tr></tbody>
2843 </table></div>
2844 <p class="since">Since 1.2</p>
2845 </div>
2846 <hr>
2847 <div class="refsect2">
2848 <a name="cogl-pop-framebuffer"></a><h3>cogl_pop_framebuffer ()</h3>
2849 <pre class="programlisting"><span class="returnvalue">void</span>                cogl_pop_framebuffer                (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
2850 <p>
2851 Restores the framebuffer that was previously at the top of the stack.
2852 All subsequent drawing will be redirected to this framebuffer.
2853 </p>
2854 <p class="since">Since 1.2</p>
2855 </div>
2856 </div>
2857 </div>
2858 <div class="footer">
2859 <hr>
2860           Generated by GTK-Doc V1.18.1</div>
2861 </body>
2862 </html>