1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>General API (Deprecated)</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="Cogl Reference Manual">
8 <link rel="up" href="ch03.html" title="Cogl deprecated API">
9 <link rel="prev" href="ch03.html" title="Cogl deprecated API">
10 <link rel="next" href="cogl-Textures-(Deprecated).html" title="Textures (Deprecated)">
11 <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
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">
17 <td><a accesskey="p" href="ch03.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch03.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 Reference Manual</th>
21 <td><a accesskey="n" href="cogl-Textures-(Deprecated).html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#cogl-General-API-(Deprecated).synopsis" class="shortcut">Top</a>
26 <a href="#cogl-General-API-(Deprecated).description" class="shortcut">Description</a>
29 <div class="refentry">
30 <a name="cogl-General-API-(Deprecated)"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
33 <h2><span class="refentrytitle"><a name="cogl-General-API-(Deprecated).top_of_page"></a>General API (Deprecated)</span></h2>
34 <p>General API (Deprecated)</p>
36 <td valign="top" align="right"></td>
38 <div class="refsynopsisdiv">
39 <a name="cogl-General-API-(Deprecated).synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis"><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-General-API-(Deprecated).html#cogl-check-extension" title="cogl_check_extension ()">cogl_check_extension</a> (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
41 <em class="parameter"><code>const <span class="type">char</span> *ext</code></em>);
42 <span class="returnvalue">void</span> <a class="link" href="cogl-General-API-(Deprecated).html#cogl-viewport" title="cogl_viewport ()">cogl_viewport</a> (<em class="parameter"><code>unsigned <span class="type">int</span> width</code></em>,
43 <em class="parameter"><code>unsigned <span class="type">int</span> height</code></em>);
44 <span class="returnvalue">void</span> <a class="link" href="cogl-General-API-(Deprecated).html#cogl-get-bitmasks" title="cogl_get_bitmasks ()">cogl_get_bitmasks</a> (<em class="parameter"><code><span class="type">int</span> *red</code></em>,
45 <em class="parameter"><code><span class="type">int</span> *green</code></em>,
46 <em class="parameter"><code><span class="type">int</span> *blue</code></em>,
47 <em class="parameter"><code><span class="type">int</span> *alpha</code></em>);
48 <span class="returnvalue">void</span> <a class="link" href="cogl-General-API-(Deprecated).html#cogl-set-depth-test-enabled" title="cogl_set_depth_test_enabled ()">cogl_set_depth_test_enabled</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);
49 <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-General-API-(Deprecated).html#cogl-get-depth-test-enabled" title="cogl_get_depth_test_enabled ()">cogl_get_depth_test_enabled</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
52 <div class="refsect1">
53 <a name="cogl-General-API-(Deprecated).description"></a><h2>Description</h2>
55 <div class="refsect1">
56 <a name="cogl-General-API-(Deprecated).details"></a><h2>Details</h2>
57 <div class="refsect2">
58 <a name="cogl-check-extension"></a><h3>cogl_check_extension ()</h3>
59 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> cogl_check_extension (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
60 <em class="parameter"><code>const <span class="type">char</span> *ext</code></em>);</pre>
61 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
62 <h3 class="title">Warning</h3>
63 <p><code class="literal">cogl_check_extension</code> has been deprecated since version 1.2 and should not be used in newly-written code. OpenGL is an implementation detail for Cogl and so it's
64 not appropriate to expose OpenGL extensions through the Cogl API. This
65 function can be replaced by the following equivalent code:
67 <div class="informalexample">
68 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
71 <td class="listing_lines" align="right"><pre>1</pre></td>
72 <td class="listing_code"><pre class="programlisting"><span class="usertype">gboolean</span><span class="normal"> retval </span><span class="symbol">=</span><span class="normal"> </span><span class="symbol">(</span><span class="function">strstr</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">ext</span><span class="symbol">,</span><span class="normal"> name</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">!=</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">?</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a> </span><span class="symbol">:</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">;</span></pre></td>
80 Check whether <em class="parameter"><code>name</code></em> occurs in list of extensions in <em class="parameter"><code>ext</code></em>.
82 <div class="variablelist"><table border="0">
83 <col align="left" valign="top">
86 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
87 <td>extension to check for</td>
90 <td><p><span class="term"><em class="parameter"><code>ext</code></em> :</span></p></td>
91 <td>list of extensions</td>
94 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
96 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the extension occurs in the list, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
102 <div class="refsect2">
103 <a name="cogl-viewport"></a><h3>cogl_viewport ()</h3>
104 <pre class="programlisting"><span class="returnvalue">void</span> cogl_viewport (<em class="parameter"><code>unsigned <span class="type">int</span> width</code></em>,
105 <em class="parameter"><code>unsigned <span class="type">int</span> height</code></em>);</pre>
106 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
107 <h3 class="title">Warning</h3>
108 <p><code class="literal">cogl_viewport</code> has been deprecated since version 1.2 and should not be used in newly-written code. Use <a class="link" href="cogl-General-API.html#cogl-set-viewport" title="cogl_set_viewport ()"><code class="function">cogl_set_viewport()</code></a> instead</p>
111 Replace the current viewport with the given values.
113 <div class="variablelist"><table border="0">
114 <col align="left" valign="top">
117 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
118 <td>Width of the viewport</td>
121 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
122 <td>Height of the viewport</td>
126 <p class="since">Since 0.8.2</p>
129 <div class="refsect2">
130 <a name="cogl-get-bitmasks"></a><h3>cogl_get_bitmasks ()</h3>
131 <pre class="programlisting"><span class="returnvalue">void</span> cogl_get_bitmasks (<em class="parameter"><code><span class="type">int</span> *red</code></em>,
132 <em class="parameter"><code><span class="type">int</span> *green</code></em>,
133 <em class="parameter"><code><span class="type">int</span> *blue</code></em>,
134 <em class="parameter"><code><span class="type">int</span> *alpha</code></em>);</pre>
136 Gets the number of bitplanes used for each of the color components
137 in the color buffer. Pass <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for any of the arguments if the
138 value is not required.
140 <div class="variablelist"><table border="0">
141 <col align="left" valign="top">
144 <td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
145 <td>Return location for the number of red bits or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
149 <td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
150 <td>Return location for the number of green bits or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
154 <td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
155 <td>Return location for the number of blue bits or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
159 <td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
160 <td>Return location for the number of alpha bits or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
167 <div class="refsect2">
168 <a name="cogl-set-depth-test-enabled"></a><h3>cogl_set_depth_test_enabled ()</h3>
169 <pre class="programlisting"><span class="returnvalue">void</span> cogl_set_depth_test_enabled (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);</pre>
170 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
171 <h3 class="title">Warning</h3>
172 <p><code class="literal">cogl_set_depth_test_enabled</code> has been deprecated since version 1.4 and should not be used in newly-written code. Use <code class="function">cogl_material_set_depth_test_enabled()</code>
176 Sets whether depth testing is enabled. If it is disabled then the
177 order that actors are layered on the screen depends solely on the
178 order specified using <code class="function">clutter_actor_raise()</code> and
179 <code class="function">clutter_actor_lower()</code>, otherwise it will also take into account the
180 actor's depth. Depth testing is disabled by default.
182 <div class="variablelist"><table border="0">
183 <col align="left" valign="top">
185 <td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
187 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to enable depth testing 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>
192 <div class="refsect2">
193 <a name="cogl-get-depth-test-enabled"></a><h3>cogl_get_depth_test_enabled ()</h3>
194 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> cogl_get_depth_test_enabled (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
195 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
196 <h3 class="title">Warning</h3>
197 <p><code class="literal">cogl_get_depth_test_enabled</code> has been deprecated since version 1.4 and should not be used in newly-written code. Use <code class="function">cogl_material_get_depth_test_enabled()</code>
201 Queries if depth testing has been enabled via <code class="function">cogl_set_depth_test_enable()</code>
203 <div class="variablelist"><table border="0">
204 <col align="left" valign="top">
206 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
208 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if depth testing is enabled, and <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
216 Generated by GTK-Doc V1.18.1</div>