"Initial commit to Gerrit"
[profile/ivi/cogl.git] / doc / reference / cogl-2.0-experimental / html / cogl-2.0-experimental-Offscreen-Framebuffers.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>Offscreen Framebuffers</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-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html" title="CoglFramebuffer: The Framebuffer Interface">
10 <link rel="next" href="cogl-utilities.html" title="Utilities">
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-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.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-utilities.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-Offscreen-Framebuffers.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#cogl-2.0-experimental-Offscreen-Framebuffers.description" class="shortcut">Description</a>
27 </td></tr>
28 </table>
29 <div class="refentry">
30 <a name="cogl-2.0-experimental-Offscreen-Framebuffers"></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-Offscreen-Framebuffers.top_of_page"></a>Offscreen Framebuffers</span></h2>
34 <p>Offscreen Framebuffers — Fuctions for creating and manipulating offscreen
35                     framebuffers.</p>
36 </td>
37 <td valign="top" align="right"></td>
38 </tr></table></div>
39 <div class="refsynopsisdiv">
40 <a name="cogl-2.0-experimental-Offscreen-Framebuffers.synopsis"></a><h2>Synopsis</h2>
41 <pre class="synopsis"><span class="returnvalue">CoglOffscreen</span> *     <a class="link" href="cogl-2.0-experimental-Offscreen-Framebuffers.html#cogl-offscreen-new-to-texture" title="cogl_offscreen_new_to_texture ()">cogl_offscreen_new_to_texture</a>       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>);
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-Offscreen-Framebuffers.html#cogl-is-offscreen" title="cogl_is_offscreen ()">cogl_is_offscreen</a>                   (<em class="parameter"><code><span class="type">void</span> *object</code></em>);
43 </pre>
44 </div>
45 <div class="refsect1">
46 <a name="cogl-2.0-experimental-Offscreen-Framebuffers.description"></a><h2>Description</h2>
47 <p>
48 Cogl allows creating and operating on offscreen framebuffers.
49 </p>
50 </div>
51 <div class="refsect1">
52 <a name="cogl-2.0-experimental-Offscreen-Framebuffers.details"></a><h2>Details</h2>
53 <div class="refsect2">
54 <a name="cogl-offscreen-new-to-texture"></a><h3>cogl_offscreen_new_to_texture ()</h3>
55 <pre class="programlisting"><span class="returnvalue">CoglOffscreen</span> *     cogl_offscreen_new_to_texture       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> *texture</code></em>);</pre>
56 <p>
57 This creates an offscreen buffer object using the given <em class="parameter"><code>texture</code></em> as the
58 primary color buffer. It doesn't just initialize the contents of the
59 offscreen buffer with the <em class="parameter"><code>texture</code></em>; they are tightly bound so that
60 drawing to the offscreen buffer effectivly updates the contents of the
61 given texture. You don't need to destroy the offscreen buffer before
62 you can use the <em class="parameter"><code>texture</code></em> again.
63 </p>
64 <p>
65 </p>
66 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
67 <h3 class="title">Note</h3>This only works with low-level <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> types such as
68 <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-3D-textures.html#CoglTexture3D" title="CoglTexture3D"><span class="type">CoglTexture3D</span></a> and <a class="link" href="cogl-2.0-experimental-Rectangle-textures-(non-normalized-coordinates).html#CoglTextureRectangle" title="CoglTextureRectangle"><span class="type">CoglTextureRectangle</span></a>, and not
69 with meta-texture types such as <a class="link" href="cogl-2.0-experimental-Sliced-Textures.html#CoglTexture2DSliced" title="CoglTexture2DSliced"><span class="type">CoglTexture2DSliced</span></a>.</div>
70 <p>
71 </p>
72 <div class="variablelist"><table border="0">
73 <col align="left" valign="top">
74 <tbody>
75 <tr>
76 <td><p><span class="term"><em class="parameter"><code>texture</code></em> :</span></p></td>
77 <td>A <a class="link" href="cogl-2.0-experimental-The-Texture-Interface.html#CoglTexture" title="CoglTexture"><span class="type">CoglTexture</span></a> pointer</td>
78 </tr>
79 <tr>
80 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
81 <td>a newly instantiated <span class="type">CoglOffscreen</span>
82 framebuffer or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it wasn't possible to create the
83 buffer. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
84 </td>
85 </tr>
86 </tbody>
87 </table></div>
88 </div>
89 <hr>
90 <div class="refsect2">
91 <a name="cogl-is-offscreen"></a><h3>cogl_is_offscreen ()</h3>
92 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            cogl_is_offscreen                   (<em class="parameter"><code><span class="type">void</span> *object</code></em>);</pre>
93 <p>
94 Determines whether the given <a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a> references an offscreen
95 framebuffer object.
96 </p>
97 <div class="variablelist"><table border="0">
98 <col align="left" valign="top">
99 <tbody>
100 <tr>
101 <td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
102 <td>A pointer to a <a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a>
103 </td>
104 </tr>
105 <tr>
106 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
107 <td>
108 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>object</code></em> is a <span class="type">CoglOffscreen</span> framebuffer,
109 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
110 </tr>
111 </tbody>
112 </table></div>
113 </div>
114 </div>
115 </div>
116 <div class="footer">
117 <hr>
118           Generated by GTK-Doc V1.18.1</div>
119 </body>
120 </html>