~oem-solutions-group/unity-2d/clutter-1.0

« back to all changes in this revision

Viewing changes to doc/reference/cogl/html/cogl-General-API.html

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<link rel="up" href="ch01.html" title="COGL - GL Abstraction API">
9
9
<link rel="prev" href="ch01.html" title="COGL - GL Abstraction API">
10
10
<link rel="next" href="cogl-Color-Type.html" title="Color Type">
11
 
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="chapter" href="ch01.html" title="COGL - GL Abstraction API">
14
 
<link rel="index" href="ix01.html" title="Index">
 
14
<link rel="chapter" href="ch02.html" title="COGL experimental API">
 
15
<link rel="index" href="ix01.html" title="Index of all symbols">
 
16
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
 
17
<link rel="index" href="ix03.html" title="Index of new symbols in 0.8">
 
18
<link rel="index" href="ix04.html" title="Index of new symbols in 1.0">
 
19
<link rel="index" href="ix05.html" title="Index of new symbols in 1.2">
15
20
<link rel="appendix" href="license.html" title="AppendixĀ A.Ā License">
16
21
</head>
17
22
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
30
</tr>
26
31
<tr><td colspan="5" class="shortcuts">
27
32
<a href="#cogl-General-API.synopsis" class="shortcut">Top</a>
28
 
                Ā |Ā 
29
 
                <a href="#cogl-General-API.description" class="shortcut">Description</a>
 
33
                  Ā |Ā 
 
34
                  <a href="#cogl-General-API.description" class="shortcut">Description</a>
30
35
</td></tr>
31
36
</table>
32
37
<div class="refentry" title="General API">
40
45
</tr></table></div>
41
46
<div class="refsynopsisdiv" title="Synopsis">
42
47
<a name="cogl-General-API.synopsis"></a><h2>Synopsis</h2>
43
 
<pre class="synopsis">
44
 
#define             <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE--CAPS" title="COGL_INVALID_HANDLE">COGL_INVALID_HANDLE</a>
 
48
<pre class="synopsis">#define             <a class="link" href="cogl-General-API.html#COGL-INVALID-HANDLE:CAPS" title="COGL_INVALID_HANDLE">COGL_INVALID_HANDLE</a>
45
49
typedef             <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>;
46
 
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          <a class="link" href="cogl-General-API.html#cogl-handle-ref" title="cogl_handle_ref ()">cogl_handle_ref</a>                     (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);
47
 
void                <a class="link" href="cogl-General-API.html#cogl-handle-unref" title="cogl_handle_unref ()">cogl_handle_unref</a>                   (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> Handle);
 
50
<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          <a class="link" href="cogl-General-API.html#cogl-handle-ref" title="cogl_handle_ref ()">cogl_handle_ref</a>                     (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);
 
51
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-handle-unref" title="cogl_handle_unref ()">cogl_handle_unref</a>                   (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> Handle);
48
52
 
49
 
void                (<a class="link" href="cogl-General-API.html#CoglFuncPtr" title="CoglFuncPtr ()">*CoglFuncPtr</a>)                      (void);
50
 
#define             <a class="link" href="cogl-General-API.html#COGL-PIXEL-FORMAT-24--CAPS" title="COGL_PIXEL_FORMAT_24">COGL_PIXEL_FORMAT_24</a>
51
 
#define             <a class="link" href="cogl-General-API.html#COGL-PIXEL-FORMAT-32--CAPS" title="COGL_PIXEL_FORMAT_32">COGL_PIXEL_FORMAT_32</a>
52
 
#define             <a class="link" href="cogl-General-API.html#COGL-A-BIT--CAPS" title="COGL_A_BIT">COGL_A_BIT</a>
53
 
#define             <a class="link" href="cogl-General-API.html#COGL-BGR-BIT--CAPS" title="COGL_BGR_BIT">COGL_BGR_BIT</a>
54
 
#define             <a class="link" href="cogl-General-API.html#COGL-AFIRST-BIT--CAPS" title="COGL_AFIRST_BIT">COGL_AFIRST_BIT</a>
55
 
#define             <a class="link" href="cogl-General-API.html#COGL-PREMULT-BIT--CAPS" title="COGL_PREMULT_BIT">COGL_PREMULT_BIT</a>
56
 
#define             <a class="link" href="cogl-General-API.html#COGL-UNORDERED-MASK--CAPS" title="COGL_UNORDERED_MASK">COGL_UNORDERED_MASK</a>
57
 
#define             <a class="link" href="cogl-General-API.html#COGL-UNPREMULT-MASK--CAPS" title="COGL_UNPREMULT_MASK">COGL_UNPREMULT_MASK</a>
 
53
<span class="returnvalue">void</span>                (<a class="link" href="cogl-General-API.html#CoglFuncPtr" title="CoglFuncPtr ()">*CoglFuncPtr</a>)                      (void);
58
54
enum                <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a>;
59
55
enum                <a class="link" href="cogl-General-API.html#CoglBufferTarget" title="enum CoglBufferTarget">CoglBufferTarget</a>;
60
56
enum                <a class="link" href="cogl-General-API.html#CoglBufferBit" title="enum CoglBufferBit">CoglBufferBit</a>;
61
57
enum                <a class="link" href="cogl-General-API.html#CoglAttributeType" title="enum CoglAttributeType">CoglAttributeType</a>;
62
58
 
63
59
enum                <a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags">CoglFeatureFlags</a>;
64
 
<a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags">CoglFeatureFlags</a>    <a class="link" href="cogl-General-API.html#cogl-get-features" title="cogl_get_features ()">cogl_get_features</a>                   (void);
65
 
<a
66
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
67
 
>gboolean</a>            <a class="link" href="cogl-General-API.html#cogl-features-available" title="cogl_features_available ()">cogl_features_available</a>             (<a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags">CoglFeatureFlags</a> features);
68
 
<a
69
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
70
 
>gboolean</a>            <a class="link" href="cogl-General-API.html#cogl-check-extension" title="cogl_check_extension ()">cogl_check_extension</a>                (const <a
71
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
72
 
>gchar</a> *name,
73
 
                                                         const <a
74
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
75
 
>gchar</a> *ext);
76
 
<a class="link" href="cogl-General-API.html#CoglFuncPtr" title="CoglFuncPtr ()">CoglFuncPtr</a>         <a class="link" href="cogl-General-API.html#cogl-get-proc-address" title="cogl_get_proc_address ()">cogl_get_proc_address</a>               (const <a
77
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
78
 
>gchar</a> *name);
79
 
<a
80
 
href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"
81
 
>GOptionGroup</a> *      <a class="link" href="cogl-General-API.html#cogl-get-option-group" title="cogl_get_option_group ()">cogl_get_option_group</a>               (void);
82
 
 
83
 
void                <a class="link" href="cogl-General-API.html#cogl-push-matrix" title="cogl_push_matrix ()">cogl_push_matrix</a>                    (void);
84
 
void                <a class="link" href="cogl-General-API.html#cogl-pop-matrix" title="cogl_pop_matrix ()">cogl_pop_matrix</a>                     (void);
85
 
void                <a class="link" href="cogl-General-API.html#cogl-scale" title="cogl_scale ()">cogl_scale</a>                          (float x,
86
 
                                                         float y,
87
 
                                                         float z);
88
 
void                <a class="link" href="cogl-General-API.html#cogl-translate" title="cogl_translate ()">cogl_translate</a>                      (float x,
89
 
                                                         float y,
90
 
                                                         float z);
91
 
void                <a class="link" href="cogl-General-API.html#cogl-rotate" title="cogl_rotate ()">cogl_rotate</a>                         (float angle,
92
 
                                                         float x,
93
 
                                                         float y,
94
 
                                                         float z);
95
 
void                <a class="link" href="cogl-General-API.html#cogl-frustum" title="cogl_frustum ()">cogl_frustum</a>                        (float left,
96
 
                                                         float right,
97
 
                                                         float bottom,
98
 
                                                         float top,
99
 
                                                         float z_near,
100
 
                                                         float z_far);
101
 
void                <a class="link" href="cogl-General-API.html#cogl-perspective" title="cogl_perspective ()">cogl_perspective</a>                    (float fovy,
102
 
                                                         float aspect,
103
 
                                                         float z_near,
104
 
                                                         float z_far);
105
 
void                <a class="link" href="cogl-General-API.html#cogl-ortho" title="cogl_ortho ()">cogl_ortho</a>                          (float left,
106
 
                                                         float right,
107
 
                                                         float bottom,
108
 
                                                         float top,
109
 
                                                         float near,
110
 
                                                         float far);
111
 
 
112
 
void                <a class="link" href="cogl-General-API.html#cogl-get-modelview-matrix" title="cogl_get_modelview_matrix ()">cogl_get_modelview_matrix</a>           (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix">CoglMatrix</a> *matrix);
113
 
void                <a class="link" href="cogl-General-API.html#cogl-set-modelview-matrix" title="cogl_set_modelview_matrix ()">cogl_set_modelview_matrix</a>           (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix">CoglMatrix</a> *matrix);
114
 
void                <a class="link" href="cogl-General-API.html#cogl-get-projection-matrix" title="cogl_get_projection_matrix ()">cogl_get_projection_matrix</a>          (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix">CoglMatrix</a> *matrix);
115
 
void                <a class="link" href="cogl-General-API.html#cogl-set-projection-matrix" title="cogl_set_projection_matrix ()">cogl_set_projection_matrix</a>          (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix">CoglMatrix</a> *matrix);
116
 
void                <a class="link" href="cogl-General-API.html#cogl-viewport" title="cogl_viewport ()">cogl_viewport</a>                       (<a
117
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
118
 
>guint</a> width,
119
 
                                                         <a
120
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
121
 
>guint</a> height);
122
 
void                <a class="link" href="cogl-General-API.html#cogl-get-viewport" title="cogl_get_viewport ()">cogl_get_viewport</a>                   (float v[4]);
123
 
 
124
 
void                <a class="link" href="cogl-General-API.html#cogl-clear" title="cogl_clear ()">cogl_clear</a>                          (const <a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor">CoglColor</a> *color,
125
 
                                                         <a
126
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
127
 
>gulong</a> buffers);
128
 
void                <a class="link" href="cogl-General-API.html#cogl-get-bitmasks" title="cogl_get_bitmasks ()">cogl_get_bitmasks</a>                   (<a
129
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
130
 
>gint</a> *red,
131
 
                                                         <a
132
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
133
 
>gint</a> *green,
134
 
                                                         <a
135
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
136
 
>gint</a> *blue,
137
 
                                                         <a
138
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
139
 
>gint</a> *alpha);
140
 
void                <a class="link" href="cogl-General-API.html#cogl-set-depth-test-enabled" title="cogl_set_depth_test_enabled ()">cogl_set_depth_test_enabled</a>         (<a
141
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
142
 
>gboolean</a> setting);
143
 
<a
144
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
145
 
>gboolean</a>            <a class="link" href="cogl-General-API.html#cogl-get-depth-test-enabled" title="cogl_get_depth_test_enabled ()">cogl_get_depth_test_enabled</a>         (void);
146
 
void                <a class="link" href="cogl-General-API.html#cogl-set-backface-culling-enabled" title="cogl_set_backface_culling_enabled ()">cogl_set_backface_culling_enabled</a>   (<a
147
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
148
 
>gboolean</a> setting);
149
 
<a
150
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
151
 
>gboolean</a>            <a class="link" href="cogl-General-API.html#cogl-get-backface-culling-enabled" title="cogl_get_backface_culling_enabled ()">cogl_get_backface_culling_enabled</a>   (void);
 
60
<a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags"><span class="returnvalue">CoglFeatureFlags</span></a>    <a class="link" href="cogl-General-API.html#cogl-get-features" title="cogl_get_features ()">cogl_get_features</a>                   (void);
 
61
<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.html#cogl-features-available" title="cogl_features_available ()">cogl_features_available</a>             (<a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags"><span class="returnvalue">CoglFeatureFlags</span></a> features);
 
62
<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.html#cogl-check-extension" title="cogl_check_extension ()">cogl_check_extension</a>                (const <span class="returnvalue">char</span> *name,
 
63
                                                         const <span class="returnvalue">char</span> *ext);
 
64
<a class="link" href="cogl-General-API.html#CoglFuncPtr" title="CoglFuncPtr ()"><span class="returnvalue">CoglFuncPtr</span></a>         <a class="link" href="cogl-General-API.html#cogl-get-proc-address" title="cogl_get_proc_address ()">cogl_get_proc_address</a>               (const <span class="returnvalue">char</span> *name);
 
65
<a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *      <a class="link" href="cogl-General-API.html#cogl-get-option-group" title="cogl_get_option_group ()">cogl_get_option_group</a>               (void);
 
66
 
 
67
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-push-matrix" title="cogl_push_matrix ()">cogl_push_matrix</a>                    (void);
 
68
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-pop-matrix" title="cogl_pop_matrix ()">cogl_pop_matrix</a>                     (void);
 
69
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-scale" title="cogl_scale ()">cogl_scale</a>                          (<span class="returnvalue">float</span> x,
 
70
                                                         <span class="returnvalue">float</span> y,
 
71
                                                         <span class="returnvalue">float</span> z);
 
72
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-translate" title="cogl_translate ()">cogl_translate</a>                      (<span class="returnvalue">float</span> x,
 
73
                                                         <span class="returnvalue">float</span> y,
 
74
                                                         <span class="returnvalue">float</span> z);
 
75
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-rotate" title="cogl_rotate ()">cogl_rotate</a>                         (<span class="returnvalue">float</span> angle,
 
76
                                                         <span class="returnvalue">float</span> x,
 
77
                                                         <span class="returnvalue">float</span> y,
 
78
                                                         <span class="returnvalue">float</span> z);
 
79
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-frustum" title="cogl_frustum ()">cogl_frustum</a>                        (<span class="returnvalue">float</span> left,
 
80
                                                         <span class="returnvalue">float</span> right,
 
81
                                                         <span class="returnvalue">float</span> bottom,
 
82
                                                         <span class="returnvalue">float</span> top,
 
83
                                                         <span class="returnvalue">float</span> z_near,
 
84
                                                         <span class="returnvalue">float</span> z_far);
 
85
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-perspective" title="cogl_perspective ()">cogl_perspective</a>                    (<span class="returnvalue">float</span> fovy,
 
86
                                                         <span class="returnvalue">float</span> aspect,
 
87
                                                         <span class="returnvalue">float</span> z_near,
 
88
                                                         <span class="returnvalue">float</span> z_far);
 
89
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-ortho" title="cogl_ortho ()">cogl_ortho</a>                          (<span class="returnvalue">float</span> left,
 
90
                                                         <span class="returnvalue">float</span> right,
 
91
                                                         <span class="returnvalue">float</span> bottom,
 
92
                                                         <span class="returnvalue">float</span> top,
 
93
                                                         <span class="returnvalue">float</span> near,
 
94
                                                         <span class="returnvalue">float</span> far);
 
95
 
 
96
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-get-modelview-matrix" title="cogl_get_modelview_matrix ()">cogl_get_modelview_matrix</a>           (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="returnvalue">CoglMatrix</span></a> *matrix);
 
97
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-set-modelview-matrix" title="cogl_set_modelview_matrix ()">cogl_set_modelview_matrix</a>           (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="returnvalue">CoglMatrix</span></a> *matrix);
 
98
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-get-projection-matrix" title="cogl_get_projection_matrix ()">cogl_get_projection_matrix</a>          (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="returnvalue">CoglMatrix</span></a> *matrix);
 
99
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-set-projection-matrix" title="cogl_set_projection_matrix ()">cogl_set_projection_matrix</a>          (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="returnvalue">CoglMatrix</span></a> *matrix);
 
100
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-viewport" title="cogl_viewport ()">cogl_viewport</a>                       (unsigned <span class="returnvalue">int</span> width,
 
101
                                                         unsigned <span class="returnvalue">int</span> height);
 
102
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-set-viewport" title="cogl_set_viewport ()">cogl_set_viewport</a>                   (<span class="returnvalue">int</span> x,
 
103
                                                         <span class="returnvalue">int</span> y,
 
104
                                                         <span class="returnvalue">int</span> width,
 
105
                                                         <span class="returnvalue">int</span> height);
 
106
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-get-viewport" title="cogl_get_viewport ()">cogl_get_viewport</a>                   (<span class="returnvalue">float</span> v[4]);
 
107
 
 
108
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-clear" title="cogl_clear ()">cogl_clear</a>                          (const <a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor"><span class="returnvalue">CoglColor</span></a> *color,
 
109
                                                         <span class="returnvalue">unsigned long </span> buffers);
 
110
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-get-bitmasks" title="cogl_get_bitmasks ()">cogl_get_bitmasks</a>                   (<span class="returnvalue">int</span> *red,
 
111
                                                         <span class="returnvalue">int</span> *green,
 
112
                                                         <span class="returnvalue">int</span> *blue,
 
113
                                                         <span class="returnvalue">int</span> *alpha);
 
114
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-set-depth-test-enabled" title="cogl_set_depth_test_enabled ()">cogl_set_depth_test_enabled</a>         (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> setting);
 
115
<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.html#cogl-get-depth-test-enabled" title="cogl_get_depth_test_enabled ()">cogl_get_depth_test_enabled</a>         (void);
 
116
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-set-backface-culling-enabled" title="cogl_set_backface_culling_enabled ()">cogl_set_backface_culling_enabled</a>   (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> setting);
 
117
<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.html#cogl-get-backface-culling-enabled" title="cogl_get_backface_culling_enabled ()">cogl_get_backface_culling_enabled</a>   (void);
152
118
 
153
119
enum                <a class="link" href="cogl-General-API.html#CoglFogMode" title="enum CoglFogMode">CoglFogMode</a>;
154
 
void                <a class="link" href="cogl-General-API.html#cogl-set-fog" title="cogl_set_fog ()">cogl_set_fog</a>                        (const <a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor">CoglColor</a> *fog_color,
155
 
                                                         <a class="link" href="cogl-General-API.html#CoglFogMode" title="enum CoglFogMode">CoglFogMode</a> mode,
156
 
                                                         float density,
157
 
                                                         float z_near,
158
 
                                                         float z_far);
159
 
void                <a class="link" href="cogl-General-API.html#cogl-disable-fog" title="cogl_disable_fog ()">cogl_disable_fog</a>                    (void);
 
120
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-set-fog" title="cogl_set_fog ()">cogl_set_fog</a>                        (const <a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor"><span class="returnvalue">CoglColor</span></a> *fog_color,
 
121
                                                         <a class="link" href="cogl-General-API.html#CoglFogMode" title="enum CoglFogMode"><span class="returnvalue">CoglFogMode</span></a> mode,
 
122
                                                         <span class="returnvalue">float</span> density,
 
123
                                                         <span class="returnvalue">float</span> z_near,
 
124
                                                         <span class="returnvalue">float</span> z_far);
 
125
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-disable-fog" title="cogl_disable_fog ()">cogl_disable_fog</a>                    (void);
160
126
 
161
 
void                <a class="link" href="cogl-General-API.html#cogl-set-source" title="cogl_set_source ()">cogl_set_source</a>                     (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> material);
162
 
void                <a class="link" href="cogl-General-API.html#cogl-set-source-color" title="cogl_set_source_color ()">cogl_set_source_color</a>               (const <a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor">CoglColor</a> *color);
163
 
void                <a class="link" href="cogl-General-API.html#cogl-set-source-color4ub" title="cogl_set_source_color4ub ()">cogl_set_source_color4ub</a>            (<a
164
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
165
 
>guint8</a> red,
166
 
                                                         <a
167
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
168
 
>guint8</a> green,
169
 
                                                         <a
170
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
171
 
>guint8</a> blue,
172
 
                                                         <a
173
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
174
 
>guint8</a> alpha);
175
 
void                <a class="link" href="cogl-General-API.html#cogl-set-source-color4f" title="cogl_set_source_color4f ()">cogl_set_source_color4f</a>             (float red,
176
 
                                                         float green,
177
 
                                                         float blue,
178
 
                                                         float alpha);
179
 
void                <a class="link" href="cogl-General-API.html#cogl-set-source-texture" title="cogl_set_source_texture ()">cogl_set_source_texture</a>             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> texture_handle);
 
127
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-set-source" title="cogl_set_source ()">cogl_set_source</a>                     (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> material);
 
128
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-set-source-color" title="cogl_set_source_color ()">cogl_set_source_color</a>               (const <a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor"><span class="returnvalue">CoglColor</span></a> *color);
 
129
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-set-source-color4ub" title="cogl_set_source_color4ub ()">cogl_set_source_color4ub</a>            (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> red,
 
130
                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> green,
 
131
                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> blue,
 
132
                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> alpha);
 
133
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-set-source-color4f" title="cogl_set_source_color4f ()">cogl_set_source_color4f</a>             (<span class="returnvalue">float</span> red,
 
134
                                                         <span class="returnvalue">float</span> green,
 
135
                                                         <span class="returnvalue">float</span> blue,
 
136
                                                         <span class="returnvalue">float</span> alpha);
 
137
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-set-source-texture" title="cogl_set_source_texture ()">cogl_set_source_texture</a>             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> texture_handle);
180
138
 
181
139
enum                <a class="link" href="cogl-General-API.html#CoglReadPixelsFlags" title="enum CoglReadPixelsFlags">CoglReadPixelsFlags</a>;
182
 
void                <a class="link" href="cogl-General-API.html#cogl-read-pixels" title="cogl_read_pixels ()">cogl_read_pixels</a>                    (int x,
183
 
                                                         int y,
184
 
                                                         int width,
185
 
                                                         int height,
186
 
                                                         <a class="link" href="cogl-General-API.html#CoglReadPixelsFlags" title="enum CoglReadPixelsFlags">CoglReadPixelsFlags</a> source,
187
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> format,
188
 
                                                         <a
189
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
190
 
>guint8</a> *pixels);
 
140
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-read-pixels" title="cogl_read_pixels ()">cogl_read_pixels</a>                    (<span class="returnvalue">int</span> x,
 
141
                                                         <span class="returnvalue">int</span> y,
 
142
                                                         <span class="returnvalue">int</span> width,
 
143
                                                         <span class="returnvalue">int</span> height,
 
144
                                                         <a class="link" href="cogl-General-API.html#CoglReadPixelsFlags" title="enum CoglReadPixelsFlags"><span class="returnvalue">CoglReadPixelsFlags</span></a> source,
 
145
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> format,
 
146
                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> *pixels);
191
147
 
192
 
void                <a class="link" href="cogl-General-API.html#cogl-flush" title="cogl_flush ()">cogl_flush</a>                          (void);
193
 
void                <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()">cogl_begin_gl</a>                       (void);
194
 
void                <a class="link" href="cogl-General-API.html#cogl-end-gl" title="cogl_end_gl ()">cogl_end_gl</a>                         (void);
 
148
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-flush" title="cogl_flush ()">cogl_flush</a>                          (void);
 
149
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()">cogl_begin_gl</a>                       (void);
 
150
<span class="returnvalue">void</span>                <a class="link" href="cogl-General-API.html#cogl-end-gl" title="cogl_end_gl ()">cogl_end_gl</a>                         (void);
195
151
</pre>
196
152
</div>
197
153
<div class="refsect1" title="Description">
198
154
<a name="cogl-General-API.description"></a><h2>Description</h2>
199
155
<p>
200
156
General utility functions for COGL.</p>
201
 
<p>
202
 
</p>
203
157
</div>
204
158
<div class="refsect1" title="Details">
205
159
<a name="cogl-General-API.details"></a><h2>Details</h2>
206
160
<div class="refsect2" title="COGL_INVALID_HANDLE">
207
 
<a name="COGL-INVALID-HANDLE--CAPS"></a><h3>COGL_INVALID_HANDLE</h3>
 
161
<a name="COGL-INVALID-HANDLE:CAPS"></a><h3>COGL_INVALID_HANDLE</h3>
208
162
<pre class="programlisting">#define COGL_INVALID_HANDLE NULL
209
163
</pre>
210
164
<p>
211
165
A COGL handle that is not valid, used for unitialized handles as well as
212
166
error conditions.</p>
213
 
<p>
214
 
</p>
215
167
</div>
216
168
<hr>
217
169
<div class="refsect2" title="CoglHandle">
221
173
<p>
222
174
Type used for storing references to cogl objects, the CoglHandle is
223
175
a fully opaque type without any public data members.</p>
224
 
<p>
225
 
</p>
226
176
</div>
227
177
<hr>
228
178
<div class="refsect2" title="cogl_handle_ref ()">
229
179
<a name="cogl-handle-ref"></a><h3>cogl_handle_ref ()</h3>
230
 
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a>          cogl_handle_ref                     (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> handle);</pre>
 
180
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a>          cogl_handle_ref                     (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> handle);</pre>
231
181
<p>
232
182
Increases the reference count of <em class="parameter"><code>handle</code></em> by 1</p>
233
 
<p>
234
 
</p>
235
183
<div class="variablelist"><table border="0">
236
184
<col align="left" valign="top">
237
185
<tbody>
251
199
<hr>
252
200
<div class="refsect2" title="cogl_handle_unref ()">
253
201
<a name="cogl-handle-unref"></a><h3>cogl_handle_unref ()</h3>
254
 
<pre class="programlisting">void                cogl_handle_unref                   (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> Handle);</pre>
 
202
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_handle_unref                   (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> Handle);</pre>
255
203
<p>
256
204
Drecreases the reference count of <em class="parameter"><code>handle</code></em> by 1; if the reference
257
205
count reaches 0, the resources allocated by <em class="parameter"><code>handle</code></em> will be freed</p>
258
 
<p>
259
 
</p>
260
206
<div class="variablelist"><table border="0">
261
207
<col align="left" valign="top">
262
208
<tbody><tr>
269
215
<hr>
270
216
<div class="refsect2" title="CoglFuncPtr ()">
271
217
<a name="CoglFuncPtr"></a><h3>CoglFuncPtr ()</h3>
272
 
<pre class="programlisting">void                (*CoglFuncPtr)                      (void);</pre>
 
218
<pre class="programlisting"><span class="returnvalue">void</span>                (*CoglFuncPtr)                      (void);</pre>
273
219
<p>
274
220
The type used by cogl for function pointers, note that this type
275
221
is used as a generic catch-all cast for function pointers and the
276
222
actual arguments and return type may be different.</p>
277
 
<p>
278
 
</p>
279
 
</div>
280
 
<hr>
281
 
<div class="refsect2" title="COGL_PIXEL_FORMAT_24">
282
 
<a name="COGL-PIXEL-FORMAT-24--CAPS"></a><h3>COGL_PIXEL_FORMAT_24</h3>
283
 
<pre class="programlisting">#define COGL_PIXEL_FORMAT_24    2
284
 
</pre>
285
 
<p>
286
 
</p>
287
 
</div>
288
 
<hr>
289
 
<div class="refsect2" title="COGL_PIXEL_FORMAT_32">
290
 
<a name="COGL-PIXEL-FORMAT-32--CAPS"></a><h3>COGL_PIXEL_FORMAT_32</h3>
291
 
<pre class="programlisting">#define COGL_PIXEL_FORMAT_32    3
292
 
</pre>
293
 
<p>
294
 
</p>
295
 
</div>
296
 
<hr>
297
 
<div class="refsect2" title="COGL_A_BIT">
298
 
<a name="COGL-A-BIT--CAPS"></a><h3>COGL_A_BIT</h3>
299
 
<pre class="programlisting">#define COGL_A_BIT              (1 &lt;&lt; 4)
300
 
</pre>
301
 
<p>
302
 
</p>
303
 
</div>
304
 
<hr>
305
 
<div class="refsect2" title="COGL_BGR_BIT">
306
 
<a name="COGL-BGR-BIT--CAPS"></a><h3>COGL_BGR_BIT</h3>
307
 
<pre class="programlisting">#define COGL_BGR_BIT            (1 &lt;&lt; 5)
308
 
</pre>
309
 
<p>
310
 
</p>
311
 
</div>
312
 
<hr>
313
 
<div class="refsect2" title="COGL_AFIRST_BIT">
314
 
<a name="COGL-AFIRST-BIT--CAPS"></a><h3>COGL_AFIRST_BIT</h3>
315
 
<pre class="programlisting">#define COGL_AFIRST_BIT         (1 &lt;&lt; 6)
316
 
</pre>
317
 
<p>
318
 
</p>
319
 
</div>
320
 
<hr>
321
 
<div class="refsect2" title="COGL_PREMULT_BIT">
322
 
<a name="COGL-PREMULT-BIT--CAPS"></a><h3>COGL_PREMULT_BIT</h3>
323
 
<pre class="programlisting">#define COGL_PREMULT_BIT        (1 &lt;&lt; 7)
324
 
</pre>
325
 
<p>
326
 
</p>
327
 
</div>
328
 
<hr>
329
 
<div class="refsect2" title="COGL_UNORDERED_MASK">
330
 
<a name="COGL-UNORDERED-MASK--CAPS"></a><h3>COGL_UNORDERED_MASK</h3>
331
 
<pre class="programlisting">#define COGL_UNORDERED_MASK     0x0F
332
 
</pre>
333
 
<p>
334
 
</p>
335
 
</div>
336
 
<hr>
337
 
<div class="refsect2" title="COGL_UNPREMULT_MASK">
338
 
<a name="COGL-UNPREMULT-MASK--CAPS"></a><h3>COGL_UNPREMULT_MASK</h3>
339
 
<pre class="programlisting">#define COGL_UNPREMULT_MASK     0x7F
340
 
</pre>
341
 
<p>
342
 
</p>
343
223
</div>
344
224
<hr>
345
225
<div class="refsect2" title="enum CoglPixelFormat">
371
251
} CoglPixelFormat;
372
252
</pre>
373
253
<p>
374
 
Pixel formats used by COGL.</p>
375
 
<p>
376
 
</p>
 
254
Pixel formats used by COGL. For the formats with a byte per
 
255
component, the order of the components specify the order in
 
256
increasing memory addresses. So for example
 
257
<a class="link" href="cogl-General-API.html#COGL-PIXEL-FORMAT-RGB-888:CAPS"><code class="literal">COGL_PIXEL_FORMAT_RGB_888</code></a> would have the red component in the
 
258
lowest address, green in the next address and blue after that
 
259
regardless of the endinanness of the system.
 
260
</p>
 
261
<p>
 
262
For the 16-bit formats the component order specifies the order
 
263
within a 16-bit number from most significant bit to least
 
264
significant. So for <a class="link" href="cogl-General-API.html#COGL-PIXEL-FORMAT-RGB-565:CAPS"><code class="literal">COGL_PIXEL_FORMAT_RGB_565</code></a>, the red component
 
265
would be in bits 11-15, the green component would be in 6-11 and
 
266
the blue component would be in 1-5. Therefore the order in memory
 
267
depends on the endianness of the system.
 
268
</p>
 
269
<p>
 
270
When uploading a texture <a class="link" href="cogl-General-API.html#COGL-PIXEL-FORMAT-ANY:CAPS"><code class="literal">COGL_PIXEL_FORMAT_ANY</code></a> can be used as the
 
271
internal format. Cogl will try to pick the best format to use
 
272
internally and convert the texture data if necessary.</p>
377
273
<div class="variablelist"><table border="0">
378
274
<col align="left" valign="top">
379
275
<tbody>
380
276
<tr>
381
 
<td><p><a name="COGL-PIXEL-FORMAT-ANY--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ANY</code></span></p></td>
 
277
<td><p><a name="COGL-PIXEL-FORMAT-ANY:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ANY</code></span></p></td>
382
278
<td> Any format
383
279
</td>
384
280
</tr>
385
281
<tr>
386
 
<td><p><a name="COGL-PIXEL-FORMAT-A-8--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_A_8</code></span></p></td>
 
282
<td><p><a name="COGL-PIXEL-FORMAT-A-8:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_A_8</code></span></p></td>
387
283
<td> 8 bits alpha mask
388
284
</td>
389
285
</tr>
390
286
<tr>
391
 
<td><p><a name="COGL-PIXEL-FORMAT-RGB-565--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGB_565</code></span></p></td>
 
287
<td><p><a name="COGL-PIXEL-FORMAT-RGB-565:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGB_565</code></span></p></td>
392
288
<td> RGB, 16 bits
393
289
</td>
394
290
</tr>
395
291
<tr>
396
 
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-4444--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_4444</code></span></p></td>
397
 
<td> RGBA, 16 bits
398
 
</td>
399
 
</tr>
400
 
<tr>
401
 
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-5551--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_5551</code></span></p></td>
402
 
<td> RGBA, 16 bits
403
 
</td>
404
 
</tr>
405
 
<tr>
406
 
<td><p><a name="COGL-PIXEL-FORMAT-YUV--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_YUV</code></span></p></td>
407
 
<td> FIXME
408
 
</td>
409
 
</tr>
410
 
<tr>
411
 
<td><p><a name="COGL-PIXEL-FORMAT-G-8--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_G_8</code></span></p></td>
412
 
<td> FIXME
413
 
</td>
414
 
</tr>
415
 
<tr>
416
 
<td><p><a name="COGL-PIXEL-FORMAT-RGB-888--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGB_888</code></span></p></td>
 
292
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-4444:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_4444</code></span></p></td>
 
293
<td> RGBA, 16 bits
 
294
</td>
 
295
</tr>
 
296
<tr>
 
297
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-5551:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_5551</code></span></p></td>
 
298
<td> RGBA, 16 bits
 
299
</td>
 
300
</tr>
 
301
<tr>
 
302
<td><p><a name="COGL-PIXEL-FORMAT-YUV:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_YUV</code></span></p></td>
 
303
<td> Not currently supported
 
304
</td>
 
305
</tr>
 
306
<tr>
 
307
<td><p><a name="COGL-PIXEL-FORMAT-G-8:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_G_8</code></span></p></td>
 
308
<td> Single luminance component
 
309
</td>
 
310
</tr>
 
311
<tr>
 
312
<td><p><a name="COGL-PIXEL-FORMAT-RGB-888:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGB_888</code></span></p></td>
417
313
<td> RGB, 24 bits
418
314
</td>
419
315
</tr>
420
316
<tr>
421
 
<td><p><a name="COGL-PIXEL-FORMAT-BGR-888--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_BGR_888</code></span></p></td>
 
317
<td><p><a name="COGL-PIXEL-FORMAT-BGR-888:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_BGR_888</code></span></p></td>
422
318
<td> BGR, 24 bits
423
319
</td>
424
320
</tr>
425
321
<tr>
426
 
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-8888--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_8888</code></span></p></td>
 
322
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-8888:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_8888</code></span></p></td>
427
323
<td> RGBA, 32 bits
428
324
</td>
429
325
</tr>
430
326
<tr>
431
 
<td><p><a name="COGL-PIXEL-FORMAT-BGRA-8888--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_BGRA_8888</code></span></p></td>
 
327
<td><p><a name="COGL-PIXEL-FORMAT-BGRA-8888:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_BGRA_8888</code></span></p></td>
432
328
<td> BGRA, 32 bits
433
329
</td>
434
330
</tr>
435
331
<tr>
436
 
<td><p><a name="COGL-PIXEL-FORMAT-ARGB-8888--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ARGB_8888</code></span></p></td>
 
332
<td><p><a name="COGL-PIXEL-FORMAT-ARGB-8888:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ARGB_8888</code></span></p></td>
437
333
<td> ARGB, 32 bits
438
334
</td>
439
335
</tr>
440
336
<tr>
441
 
<td><p><a name="COGL-PIXEL-FORMAT-ABGR-8888--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ABGR_8888</code></span></p></td>
 
337
<td><p><a name="COGL-PIXEL-FORMAT-ABGR-8888:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ABGR_8888</code></span></p></td>
442
338
<td> ABGR, 32 bits
443
339
</td>
444
340
</tr>
445
341
<tr>
446
 
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-8888-PRE--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_8888_PRE</code></span></p></td>
 
342
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-8888-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_8888_PRE</code></span></p></td>
447
343
<td> Premultiplied RGBA, 32 bits
448
344
</td>
449
345
</tr>
450
346
<tr>
451
 
<td><p><a name="COGL-PIXEL-FORMAT-BGRA-8888-PRE--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_BGRA_8888_PRE</code></span></p></td>
 
347
<td><p><a name="COGL-PIXEL-FORMAT-BGRA-8888-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_BGRA_8888_PRE</code></span></p></td>
452
348
<td> Premultiplied BGRA, 32 bits
453
349
</td>
454
350
</tr>
455
351
<tr>
456
 
<td><p><a name="COGL-PIXEL-FORMAT-ARGB-8888-PRE--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ARGB_8888_PRE</code></span></p></td>
 
352
<td><p><a name="COGL-PIXEL-FORMAT-ARGB-8888-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ARGB_8888_PRE</code></span></p></td>
457
353
<td> Premultiplied ARGB, 32 bits
458
354
</td>
459
355
</tr>
460
356
<tr>
461
 
<td><p><a name="COGL-PIXEL-FORMAT-ABGR-8888-PRE--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ABGR_8888_PRE</code></span></p></td>
 
357
<td><p><a name="COGL-PIXEL-FORMAT-ABGR-8888-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_ABGR_8888_PRE</code></span></p></td>
462
358
<td> Premultiplied ABGR, 32 bits
463
359
</td>
464
360
</tr>
465
361
<tr>
466
 
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-4444-PRE--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_4444_PRE</code></span></p></td>
 
362
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-4444-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_4444_PRE</code></span></p></td>
467
363
<td> Premultiplied RGBA, 16 bits
468
364
</td>
469
365
</tr>
470
366
<tr>
471
 
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-5551-PRE--CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_5551_PRE</code></span></p></td>
 
367
<td><p><a name="COGL-PIXEL-FORMAT-RGBA-5551-PRE:CAPS"></a><span class="term"><code class="literal">COGL_PIXEL_FORMAT_RGBA_5551_PRE</code></span></p></td>
472
368
<td> Premultiplied RGBA, 16 bits
473
369
</td>
474
370
</tr>
487
383
</pre>
488
384
<p>
489
385
Target flags for FBOs.</p>
490
 
<p>
491
 
</p>
492
386
<div class="variablelist"><table border="0">
493
387
<col align="left" valign="top">
494
388
<tbody>
495
389
<tr>
496
 
<td><p><a name="COGL-WINDOW-BUFFER--CAPS"></a><span class="term"><code class="literal">COGL_WINDOW_BUFFER</code></span></p></td>
 
390
<td><p><a name="COGL-WINDOW-BUFFER:CAPS"></a><span class="term"><code class="literal">COGL_WINDOW_BUFFER</code></span></p></td>
497
391
<td> FIXME
498
392
</td>
499
393
</tr>
500
394
<tr>
501
 
<td><p><a name="COGL-OFFSCREEN-BUFFER--CAPS"></a><span class="term"><code class="literal">COGL_OFFSCREEN_BUFFER</code></span></p></td>
 
395
<td><p><a name="COGL-OFFSCREEN-BUFFER:CAPS"></a><span class="term"><code class="literal">COGL_OFFSCREEN_BUFFER</code></span></p></td>
502
396
<td> FIXME
503
397
</td>
504
398
</tr>
517
411
</pre>
518
412
<p>
519
413
Types of auxiliary buffers</p>
520
 
<p>
521
 
</p>
522
414
<div class="variablelist"><table border="0">
523
415
<col align="left" valign="top">
524
416
<tbody>
525
417
<tr>
526
 
<td><p><a name="COGL-BUFFER-BIT-COLOR--CAPS"></a><span class="term"><code class="literal">COGL_BUFFER_BIT_COLOR</code></span></p></td>
 
418
<td><p><a name="COGL-BUFFER-BIT-COLOR:CAPS"></a><span class="term"><code class="literal">COGL_BUFFER_BIT_COLOR</code></span></p></td>
527
419
<td> Selects the primary color buffer
528
420
</td>
529
421
</tr>
530
422
<tr>
531
 
<td><p><a name="COGL-BUFFER-BIT-DEPTH--CAPS"></a><span class="term"><code class="literal">COGL_BUFFER_BIT_DEPTH</code></span></p></td>
 
423
<td><p><a name="COGL-BUFFER-BIT-DEPTH:CAPS"></a><span class="term"><code class="literal">COGL_BUFFER_BIT_DEPTH</code></span></p></td>
532
424
<td> Selects the depth buffer
533
425
</td>
534
426
</tr>
535
427
<tr>
536
 
<td><p><a name="COGL-BUFFER-BIT-STENCIL--CAPS"></a><span class="term"><code class="literal">COGL_BUFFER_BIT_STENCIL</code></span></p></td>
 
428
<td><p><a name="COGL-BUFFER-BIT-STENCIL:CAPS"></a><span class="term"><code class="literal">COGL_BUFFER_BIT_STENCIL</code></span></p></td>
537
429
<td> Selects the stencil buffer
538
430
</td>
539
431
</tr>
544
436
<hr>
545
437
<div class="refsect2" title="enum CoglAttributeType">
546
438
<a name="CoglAttributeType"></a><h3>enum CoglAttributeType</h3>
547
 
<pre class="programlisting">typedef enum _CoglAttributeType
548
 
{
 
439
<pre class="programlisting">typedef enum {
549
440
  COGL_ATTRIBUTE_TYPE_BYTE = GL_BYTE,
550
441
  COGL_ATTRIBUTE_TYPE_UNSIGNED_BYTE = GL_UNSIGNED_BYTE,
551
442
  COGL_ATTRIBUTE_TYPE_SHORT = GL_SHORT,
555
446
</pre>
556
447
<p>
557
448
Data types for the components of <a class="link" href="cogl-Vertex-Buffers.html#cogl-vertex-buffer-add" title="cogl_vertex_buffer_add ()"><code class="function">cogl_vertex_buffer_add()</code></a></p>
558
 
<p>
559
 
</p>
560
449
<div class="variablelist"><table border="0">
561
450
<col align="left" valign="top">
562
451
<tbody>
563
452
<tr>
564
 
<td><p><a name="COGL-ATTRIBUTE-TYPE-BYTE--CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_BYTE</code></span></p></td>
 
453
<td><p><a name="COGL-ATTRIBUTE-TYPE-BYTE:CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_BYTE</code></span></p></td>
565
454
<td> Data is the same size of a byte
566
455
</td>
567
456
</tr>
568
457
<tr>
569
 
<td><p><a name="COGL-ATTRIBUTE-TYPE-UNSIGNED-BYTE--CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_UNSIGNED_BYTE</code></span></p></td>
 
458
<td><p><a name="COGL-ATTRIBUTE-TYPE-UNSIGNED-BYTE:CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_UNSIGNED_BYTE</code></span></p></td>
570
459
<td> Data is the same size of an
571
460
  unsigned byte
572
461
</td>
573
462
</tr>
574
463
<tr>
575
 
<td><p><a name="COGL-ATTRIBUTE-TYPE-SHORT--CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_SHORT</code></span></p></td>
 
464
<td><p><a name="COGL-ATTRIBUTE-TYPE-SHORT:CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_SHORT</code></span></p></td>
576
465
<td> Data is the same size of a short integer
577
466
</td>
578
467
</tr>
579
468
<tr>
580
 
<td><p><a name="COGL-ATTRIBUTE-TYPE-UNSIGNED-SHORT--CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_UNSIGNED_SHORT</code></span></p></td>
 
469
<td><p><a name="COGL-ATTRIBUTE-TYPE-UNSIGNED-SHORT:CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_UNSIGNED_SHORT</code></span></p></td>
581
470
<td> Data is the same size of
582
471
  an unsigned short integer
583
472
</td>
584
473
</tr>
585
474
<tr>
586
 
<td><p><a name="COGL-ATTRIBUTE-TYPE-FLOAT--CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_FLOAT</code></span></p></td>
 
475
<td><p><a name="COGL-ATTRIBUTE-TYPE-FLOAT:CAPS"></a><span class="term"><code class="literal">COGL_ATTRIBUTE_TYPE_FLOAT</code></span></p></td>
587
476
<td> Data is the same size of a float
588
477
</td>
589
478
</tr>
606
495
  COGL_FEATURE_OFFSCREEN_BLIT         = (1 &lt;&lt; 8),
607
496
  COGL_FEATURE_FOUR_CLIP_PLANES       = (1 &lt;&lt; 9),
608
497
  COGL_FEATURE_STENCIL_BUFFER         = (1 &lt;&lt; 10),
609
 
  COGL_FEATURE_VBOS                   = (1 &lt;&lt; 11)
 
498
  COGL_FEATURE_VBOS                   = (1 &lt;&lt; 11),
 
499
  COGL_FEATURE_PBOS                   = (1 &lt;&lt; 12),
 
500
  COGL_FEATURE_UNSIGNED_INT_INDICES   = (1 &lt;&lt; 13)
610
501
} CoglFeatureFlags;
611
502
</pre>
612
503
<p>
613
504
Flags for the supported features.</p>
614
 
<p>
615
 
</p>
616
505
<div class="variablelist"><table border="0">
617
506
<col align="left" valign="top">
618
507
<tbody>
619
508
<tr>
620
 
<td><p><a name="COGL-FEATURE-TEXTURE-RECTANGLE--CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_RECTANGLE</code></span></p></td>
 
509
<td><p><a name="COGL-FEATURE-TEXTURE-RECTANGLE:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_RECTANGLE</code></span></p></td>
621
510
<td> ARB_texture_rectangle support
622
511
</td>
623
512
</tr>
624
513
<tr>
625
 
<td><p><a name="COGL-FEATURE-TEXTURE-NPOT--CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_NPOT</code></span></p></td>
 
514
<td><p><a name="COGL-FEATURE-TEXTURE-NPOT:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_NPOT</code></span></p></td>
626
515
<td> ARB_texture_non_power_of_two support
627
516
</td>
628
517
</tr>
629
518
<tr>
630
 
<td><p><a name="COGL-FEATURE-TEXTURE-YUV--CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_YUV</code></span></p></td>
 
519
<td><p><a name="COGL-FEATURE-TEXTURE-YUV:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_YUV</code></span></p></td>
631
520
<td> ycbcr conversion support
632
521
</td>
633
522
</tr>
634
523
<tr>
635
 
<td><p><a name="COGL-FEATURE-TEXTURE-READ-PIXELS--CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_READ_PIXELS</code></span></p></td>
 
524
<td><p><a name="COGL-FEATURE-TEXTURE-READ-PIXELS:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_TEXTURE_READ_PIXELS</code></span></p></td>
636
525
<td> <code class="function">glReadPixels()</code> support
637
526
</td>
638
527
</tr>
639
528
<tr>
640
 
<td><p><a name="COGL-FEATURE-SHADERS-GLSL--CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_SHADERS_GLSL</code></span></p></td>
 
529
<td><p><a name="COGL-FEATURE-SHADERS-GLSL:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_SHADERS_GLSL</code></span></p></td>
641
530
<td> GLSL support
642
531
</td>
643
532
</tr>
644
533
<tr>
645
 
<td><p><a name="COGL-FEATURE-OFFSCREEN--CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_OFFSCREEN</code></span></p></td>
 
534
<td><p><a name="COGL-FEATURE-OFFSCREEN:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_OFFSCREEN</code></span></p></td>
646
535
<td> FBO support
647
536
</td>
648
537
</tr>
649
538
<tr>
650
 
<td><p><a name="COGL-FEATURE-OFFSCREEN-MULTISAMPLE--CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_OFFSCREEN_MULTISAMPLE</code></span></p></td>
 
539
<td><p><a name="COGL-FEATURE-OFFSCREEN-MULTISAMPLE:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_OFFSCREEN_MULTISAMPLE</code></span></p></td>
651
540
<td> Multisample support on FBOs
652
541
</td>
653
542
</tr>
654
543
<tr>
655
 
<td><p><a name="COGL-FEATURE-OFFSCREEN-BLIT--CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_OFFSCREEN_BLIT</code></span></p></td>
 
544
<td><p><a name="COGL-FEATURE-OFFSCREEN-BLIT:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_OFFSCREEN_BLIT</code></span></p></td>
656
545
<td> Blit support on FBOs
657
546
</td>
658
547
</tr>
659
548
<tr>
660
 
<td><p><a name="COGL-FEATURE-FOUR-CLIP-PLANES--CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_FOUR_CLIP_PLANES</code></span></p></td>
 
549
<td><p><a name="COGL-FEATURE-FOUR-CLIP-PLANES:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_FOUR_CLIP_PLANES</code></span></p></td>
661
550
<td> At least 4 clip planes available
662
551
</td>
663
552
</tr>
664
553
<tr>
665
 
<td><p><a name="COGL-FEATURE-STENCIL-BUFFER--CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_STENCIL_BUFFER</code></span></p></td>
 
554
<td><p><a name="COGL-FEATURE-STENCIL-BUFFER:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_STENCIL_BUFFER</code></span></p></td>
666
555
<td> Stencil buffer support
667
556
</td>
668
557
</tr>
669
558
<tr>
670
 
<td><p><a name="COGL-FEATURE-VBOS--CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_VBOS</code></span></p></td>
 
559
<td><p><a name="COGL-FEATURE-VBOS:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_VBOS</code></span></p></td>
671
560
<td> VBO support
672
561
</td>
673
562
</tr>
 
563
<tr>
 
564
<td><p><a name="COGL-FEATURE-PBOS:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_PBOS</code></span></p></td>
 
565
<td> PBO support
 
566
</td>
 
567
</tr>
 
568
<tr>
 
569
<td><p><a name="COGL-FEATURE-UNSIGNED-INT-INDICES:CAPS"></a><span class="term"><code class="literal">COGL_FEATURE_UNSIGNED_INT_INDICES</code></span></p></td>
 
570
<td> Set if
 
571
    <a class="link" href="cogl-Vertex-Buffers.html#COGL-INDICES-TYPE-UNSIGNED-INT:CAPS"><code class="literal">COGL_INDICES_TYPE_UNSIGNED_INT</code></a> is supported in
 
572
    <a class="link" href="cogl-Vertex-Buffers.html#cogl-vertex-buffer-indices-new" title="cogl_vertex_buffer_indices_new ()"><code class="function">cogl_vertex_buffer_indices_new()</code></a>.
 
573
</td>
 
574
</tr>
674
575
</tbody>
675
576
</table></div>
676
577
<p class="since">Since 0.8</p>
678
579
<hr>
679
580
<div class="refsect2" title="cogl_get_features ()">
680
581
<a name="cogl-get-features"></a><h3>cogl_get_features ()</h3>
681
 
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags">CoglFeatureFlags</a>    cogl_get_features                   (void);</pre>
 
582
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags"><span class="returnvalue">CoglFeatureFlags</span></a>    cogl_get_features                   (void);</pre>
682
583
<p>
683
584
Returns all of the features supported by COGL.</p>
684
 
<p>
685
 
</p>
686
585
<div class="variablelist"><table border="0">
687
586
<col align="left" valign="top">
688
587
<tbody><tr>
697
596
<hr>
698
597
<div class="refsect2" title="cogl_features_available ()">
699
598
<a name="cogl-features-available"></a><h3>cogl_features_available ()</h3>
700
 
<pre class="programlisting"><a
701
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
702
 
>gboolean</a>            cogl_features_available             (<a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags">CoglFeatureFlags</a> features);</pre>
 
599
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            cogl_features_available             (<a class="link" href="cogl-General-API.html#CoglFeatureFlags" title="enum CoglFeatureFlags"><span class="returnvalue">CoglFeatureFlags</span></a> features);</pre>
703
600
<p>
704
601
Checks whether the given COGL features are available. Multiple
705
602
features can be checked for by or-ing them together with the '|'
706
 
operator. <a
707
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
708
 
><code class="literal">TRUE</code></a> is only returned if all of the requested features
 
603
operator. <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is only returned if all of the requested features
709
604
are available.</p>
710
 
<p>
711
 
</p>
712
605
<div class="variablelist"><table border="0">
713
606
<col align="left" valign="top">
714
607
<tbody>
719
612
</tr>
720
613
<tr>
721
614
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>Ā :</span></p></td>
722
 
<td> <a
723
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
724
 
><code class="literal">TRUE</code></a> if the features are available, <a
725
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
726
 
><code class="literal">FALSE</code></a> otherwise.
 
615
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the features are available, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
727
616
</td>
728
617
</tr>
729
618
</tbody>
732
621
<hr>
733
622
<div class="refsect2" title="cogl_check_extension ()">
734
623
<a name="cogl-check-extension"></a><h3>cogl_check_extension ()</h3>
735
 
<pre class="programlisting"><a
736
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
737
 
>gboolean</a>            cogl_check_extension                (const <a
738
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
739
 
>gchar</a> *name,
740
 
                                                         const <a
741
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
742
 
>gchar</a> *ext);</pre>
 
624
<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                (const <span class="returnvalue">char</span> *name,
 
625
                                                         const <span class="returnvalue">char</span> *ext);</pre>
 
626
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
627
<h3 class="title">Warning</h3>
 
628
<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
 
629
  not appropriate to expose OpenGL extensions through the Cogl API. This
 
630
  function can be replaced by the following equivalent code:
 
631
</p>
 
632
<div class="informalexample"><pre class="programlisting">
 
633
  gboolean retval = (strstr (ext, name) != NULL) ? TRUE : FALSE;
 
634
</pre></div>
 
635
</div>
743
636
<p>
744
637
Check whether <em class="parameter"><code>name</code></em> occurs in list of extensions in <em class="parameter"><code>ext</code></em>.</p>
745
 
<p>
746
 
</p>
747
638
<div class="variablelist"><table border="0">
748
639
<col align="left" valign="top">
749
640
<tbody>
759
650
</tr>
760
651
<tr>
761
652
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>Ā :</span></p></td>
762
 
<td> <a
763
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
764
 
><code class="literal">TRUE</code></a> if the extension occurs in the list, <a
765
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
766
 
><code class="literal">FALSE</code></a> otherwize.
 
653
<td> <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.
 
654
 
767
655
</td>
768
656
</tr>
769
657
</tbody>
772
660
<hr>
773
661
<div class="refsect2" title="cogl_get_proc_address ()">
774
662
<a name="cogl-get-proc-address"></a><h3>cogl_get_proc_address ()</h3>
775
 
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglFuncPtr" title="CoglFuncPtr ()">CoglFuncPtr</a>         cogl_get_proc_address               (const <a
776
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
777
 
>gchar</a> *name);</pre>
 
663
<pre class="programlisting"><a class="link" href="cogl-General-API.html#CoglFuncPtr" title="CoglFuncPtr ()"><span class="returnvalue">CoglFuncPtr</span></a>         cogl_get_proc_address               (const <span class="returnvalue">char</span> *name);</pre>
778
664
<p>
779
665
Gets a pointer to a given GL or GL ES extension function. This acts
780
666
as a wrapper around <code class="function">glXGetProcAddress()</code> or whatever is the
781
667
appropriate function for the current backend.</p>
782
 
<p>
783
 
</p>
784
668
<div class="variablelist"><table border="0">
785
669
<col align="left" valign="top">
786
670
<tbody>
791
675
</tr>
792
676
<tr>
793
677
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>Ā :</span></p></td>
794
 
<td> a pointer to the requested function or <a
795
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
796
 
><code class="literal">NULL</code></a> if the
797
 
function is not available.
 
678
<td> a pointer to the requested function or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the
 
679
  function is not available.
798
680
</td>
799
681
</tr>
800
682
</tbody>
803
685
<hr>
804
686
<div class="refsect2" title="cogl_get_option_group ()">
805
687
<a name="cogl-get-option-group"></a><h3>cogl_get_option_group ()</h3>
806
 
<pre class="programlisting"><a
807
 
href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"
808
 
>GOptionGroup</a> *      cogl_get_option_group               (void);</pre>
 
688
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *      cogl_get_option_group               (void);</pre>
809
689
<p>
810
 
Retrieves the <a
811
 
href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"
812
 
><span class="type">GOptionGroup</span></a> used by COGL to parse the command
 
690
Retrieves the <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"><span class="type">GOptionGroup</span></a> used by COGL to parse the command
813
691
line options. Clutter uses this to handle the COGL command line
814
692
options during its initialization process.</p>
815
 
<p>
816
 
</p>
817
693
<div class="variablelist"><table border="0">
818
694
<col align="left" valign="top">
819
695
<tbody><tr>
820
696
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>Ā :</span></p></td>
821
 
<td> a <a
822
 
href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"
823
 
><span class="type">GOptionGroup</span></a>
 
697
<td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Commandline-option-parser.html#GOptionGroup"><span class="type">GOptionGroup</span></a>
824
698
 
825
699
</td>
826
700
</tr></tbody>
830
704
<hr>
831
705
<div class="refsect2" title="cogl_push_matrix ()">
832
706
<a name="cogl-push-matrix"></a><h3>cogl_push_matrix ()</h3>
833
 
<pre class="programlisting">void                cogl_push_matrix                    (void);</pre>
 
707
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_push_matrix                    (void);</pre>
834
708
<p>
835
 
Store the current model-view matrix on the matrix stack. The matrix
 
709
Stores the current model-view matrix on the matrix stack. The matrix
836
710
can later be restored with <a class="link" href="cogl-General-API.html#cogl-pop-matrix" title="cogl_pop_matrix ()"><code class="function">cogl_pop_matrix()</code></a>.</p>
837
 
<p>
838
 
</p>
839
711
</div>
840
712
<hr>
841
713
<div class="refsect2" title="cogl_pop_matrix ()">
842
714
<a name="cogl-pop-matrix"></a><h3>cogl_pop_matrix ()</h3>
843
 
<pre class="programlisting">void                cogl_pop_matrix                     (void);</pre>
844
 
<p>
845
 
Restore the current model-view matrix from the matrix stack.</p>
846
 
<p>
847
 
</p>
 
715
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_pop_matrix                     (void);</pre>
 
716
<p>
 
717
Restores the current model-view matrix from the matrix stack.</p>
848
718
</div>
849
719
<hr>
850
720
<div class="refsect2" title="cogl_scale ()">
851
721
<a name="cogl-scale"></a><h3>cogl_scale ()</h3>
852
 
<pre class="programlisting">void                cogl_scale                          (float x,
853
 
                                                         float y,
854
 
                                                         float z);</pre>
 
722
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_scale                          (<span class="returnvalue">float</span> x,
 
723
                                                         <span class="returnvalue">float</span> y,
 
724
                                                         <span class="returnvalue">float</span> z);</pre>
855
725
<p>
856
726
Multiplies the current model-view matrix by one that scales the x,
857
727
y and z axes by the given values.</p>
858
 
<p>
859
 
</p>
860
728
<div class="variablelist"><table border="0">
861
729
<col align="left" valign="top">
862
730
<tbody>
881
749
<hr>
882
750
<div class="refsect2" title="cogl_translate ()">
883
751
<a name="cogl-translate"></a><h3>cogl_translate ()</h3>
884
 
<pre class="programlisting">void                cogl_translate                      (float x,
885
 
                                                         float y,
886
 
                                                         float z);</pre>
 
752
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_translate                      (<span class="returnvalue">float</span> x,
 
753
                                                         <span class="returnvalue">float</span> y,
 
754
                                                         <span class="returnvalue">float</span> z);</pre>
887
755
<p>
888
756
Multiplies the current model-view matrix by one that translates the
889
757
model along all three axes according to the given values.</p>
890
 
<p>
891
 
</p>
892
758
<div class="variablelist"><table border="0">
893
759
<col align="left" valign="top">
894
760
<tbody>
913
779
<hr>
914
780
<div class="refsect2" title="cogl_rotate ()">
915
781
<a name="cogl-rotate"></a><h3>cogl_rotate ()</h3>
916
 
<pre class="programlisting">void                cogl_rotate                         (float angle,
917
 
                                                         float x,
918
 
                                                         float y,
919
 
                                                         float z);</pre>
 
782
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_rotate                         (<span class="returnvalue">float</span> angle,
 
783
                                                         <span class="returnvalue">float</span> x,
 
784
                                                         <span class="returnvalue">float</span> y,
 
785
                                                         <span class="returnvalue">float</span> z);</pre>
920
786
<p>
921
787
Multiplies the current model-view matrix by one that rotates the
922
788
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
923
789
follows the right-hand thumb rule so for example rotating by 10
924
790
degrees about the vertex (0, 0, 1) causes a small counter-clockwise
925
791
rotation.</p>
926
 
<p>
927
 
</p>
928
792
<div class="variablelist"><table border="0">
929
793
<col align="left" valign="top">
930
794
<tbody>
954
818
<hr>
955
819
<div class="refsect2" title="cogl_frustum ()">
956
820
<a name="cogl-frustum"></a><h3>cogl_frustum ()</h3>
957
 
<pre class="programlisting">void                cogl_frustum                        (float left,
958
 
                                                         float right,
959
 
                                                         float bottom,
960
 
                                                         float top,
961
 
                                                         float z_near,
962
 
                                                         float z_far);</pre>
 
821
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_frustum                        (<span class="returnvalue">float</span> left,
 
822
                                                         <span class="returnvalue">float</span> right,
 
823
                                                         <span class="returnvalue">float</span> bottom,
 
824
                                                         <span class="returnvalue">float</span> top,
 
825
                                                         <span class="returnvalue">float</span> z_near,
 
826
                                                         <span class="returnvalue">float</span> z_far);</pre>
963
827
<p>
964
828
Replaces the current projection matrix with a perspective matrix
965
829
for the given viewing frustum.</p>
966
 
<p>
967
 
</p>
968
830
<div class="variablelist"><table border="0">
969
831
<col align="left" valign="top">
970
832
<tbody>
1005
867
<hr>
1006
868
<div class="refsect2" title="cogl_perspective ()">
1007
869
<a name="cogl-perspective"></a><h3>cogl_perspective ()</h3>
1008
 
<pre class="programlisting">void                cogl_perspective                    (float fovy,
1009
 
                                                         float aspect,
1010
 
                                                         float z_near,
1011
 
                                                         float z_far);</pre>
 
870
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_perspective                    (<span class="returnvalue">float</span> fovy,
 
871
                                                         <span class="returnvalue">float</span> aspect,
 
872
                                                         <span class="returnvalue">float</span> z_near,
 
873
                                                         <span class="returnvalue">float</span> z_far);</pre>
1012
874
<p>
1013
875
Replaces the current projection matrix with a perspective matrix
1014
876
based on the provided values.</p>
1015
 
<p>
1016
 
</p>
1017
877
<div class="variablelist"><table border="0">
1018
878
<col align="left" valign="top">
1019
879
<tbody>
1043
903
<hr>
1044
904
<div class="refsect2" title="cogl_ortho ()">
1045
905
<a name="cogl-ortho"></a><h3>cogl_ortho ()</h3>
1046
 
<pre class="programlisting">void                cogl_ortho                          (float left,
1047
 
                                                         float right,
1048
 
                                                         float bottom,
1049
 
                                                         float top,
1050
 
                                                         float near,
1051
 
                                                         float far);</pre>
 
906
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_ortho                          (<span class="returnvalue">float</span> left,
 
907
                                                         <span class="returnvalue">float</span> right,
 
908
                                                         <span class="returnvalue">float</span> bottom,
 
909
                                                         <span class="returnvalue">float</span> top,
 
910
                                                         <span class="returnvalue">float</span> near,
 
911
                                                         <span class="returnvalue">float</span> far);</pre>
1052
912
<p>
1053
913
Replaces the current projection matrix with a parallel projection
1054
914
matrix.</p>
1055
 
<p>
1056
 
</p>
1057
915
<div class="variablelist"><table border="0">
1058
916
<col align="left" valign="top">
1059
917
<tbody>
1096
954
<hr>
1097
955
<div class="refsect2" title="cogl_get_modelview_matrix ()">
1098
956
<a name="cogl-get-modelview-matrix"></a><h3>cogl_get_modelview_matrix ()</h3>
1099
 
<pre class="programlisting">void                cogl_get_modelview_matrix           (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix">CoglMatrix</a> *matrix);</pre>
 
957
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_get_modelview_matrix           (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="returnvalue">CoglMatrix</span></a> *matrix);</pre>
1100
958
<p>
1101
959
Stores the current model-view matrix in <em class="parameter"><code>matrix</code></em>.</p>
1102
 
<p>
1103
 
</p>
1104
960
<div class="variablelist"><table border="0">
1105
961
<col align="left" valign="top">
1106
962
<tbody><tr>
1107
963
<td><p><span class="term"><em class="parameter"><code>matrix</code></em>Ā :</span></p></td>
1108
 
<td> pointer to a CoglMatrix to recieve the matrix
1109
 
</td>
 
964
<td> return location for the model-view matrix. <a href="http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=out"><span class="acronym">out</span></a>. </td>
1110
965
</tr></tbody>
1111
966
</table></div>
1112
967
</div>
1113
968
<hr>
1114
969
<div class="refsect2" title="cogl_set_modelview_matrix ()">
1115
970
<a name="cogl-set-modelview-matrix"></a><h3>cogl_set_modelview_matrix ()</h3>
1116
 
<pre class="programlisting">void                cogl_set_modelview_matrix           (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix">CoglMatrix</a> *matrix);</pre>
1117
 
<p>
1118
 
Loads matrix as the new model-view matrix.</p>
1119
 
<p>
1120
 
</p>
 
971
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_set_modelview_matrix           (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="returnvalue">CoglMatrix</span></a> *matrix);</pre>
 
972
<p>
 
973
Loads <em class="parameter"><code>matrix</code></em> as the new model-view matrix.</p>
1121
974
<div class="variablelist"><table border="0">
1122
975
<col align="left" valign="top">
1123
976
<tbody><tr>
1124
977
<td><p><span class="term"><em class="parameter"><code>matrix</code></em>Ā :</span></p></td>
1125
 
<td> pointer to a CoglMatrix to set as the new model-view matrix
 
978
<td> the new model-view matrix
1126
979
</td>
1127
980
</tr></tbody>
1128
981
</table></div>
1130
983
<hr>
1131
984
<div class="refsect2" title="cogl_get_projection_matrix ()">
1132
985
<a name="cogl-get-projection-matrix"></a><h3>cogl_get_projection_matrix ()</h3>
1133
 
<pre class="programlisting">void                cogl_get_projection_matrix          (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix">CoglMatrix</a> *matrix);</pre>
 
986
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_get_projection_matrix          (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="returnvalue">CoglMatrix</span></a> *matrix);</pre>
1134
987
<p>
1135
988
Stores the current projection matrix in <em class="parameter"><code>matrix</code></em>.</p>
1136
 
<p>
1137
 
</p>
1138
989
<div class="variablelist"><table border="0">
1139
990
<col align="left" valign="top">
1140
991
<tbody><tr>
1141
992
<td><p><span class="term"><em class="parameter"><code>matrix</code></em>Ā :</span></p></td>
1142
 
<td> pointer to a CoglMatrix to recieve the matrix
1143
 
</td>
 
993
<td> return location for the projection matrix. <a href="http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=out"><span class="acronym">out</span></a>. </td>
1144
994
</tr></tbody>
1145
995
</table></div>
1146
996
</div>
1147
997
<hr>
1148
998
<div class="refsect2" title="cogl_set_projection_matrix ()">
1149
999
<a name="cogl-set-projection-matrix"></a><h3>cogl_set_projection_matrix ()</h3>
1150
 
<pre class="programlisting">void                cogl_set_projection_matrix          (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix">CoglMatrix</a> *matrix);</pre>
 
1000
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_set_projection_matrix          (<a class="link" href="cogl-Matrices.html#CoglMatrix" title="CoglMatrix"><span class="returnvalue">CoglMatrix</span></a> *matrix);</pre>
1151
1001
<p>
1152
1002
Loads matrix as the new projection matrix.</p>
1153
 
<p>
1154
 
</p>
1155
1003
<div class="variablelist"><table border="0">
1156
1004
<col align="left" valign="top">
1157
1005
<tbody><tr>
1158
1006
<td><p><span class="term"><em class="parameter"><code>matrix</code></em>Ā :</span></p></td>
1159
 
<td> pointer to a CoglMatrix to set as the new projection matrix
 
1007
<td> the new projection matrix
1160
1008
</td>
1161
1009
</tr></tbody>
1162
1010
</table></div>
1164
1012
<hr>
1165
1013
<div class="refsect2" title="cogl_viewport ()">
1166
1014
<a name="cogl-viewport"></a><h3>cogl_viewport ()</h3>
1167
 
<pre class="programlisting">void                cogl_viewport                       (<a
1168
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
1169
 
>guint</a> width,
1170
 
                                                         <a
1171
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
1172
 
>guint</a> height);</pre>
 
1015
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_viewport                       (unsigned <span class="returnvalue">int</span> width,
 
1016
                                                         unsigned <span class="returnvalue">int</span> height);</pre>
 
1017
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1018
<h3 class="title">Warning</h3>
 
1019
<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>
 
1020
</div>
1173
1021
<p>
1174
1022
Replace the current viewport with the given values.</p>
 
1023
<div class="variablelist"><table border="0">
 
1024
<col align="left" valign="top">
 
1025
<tbody>
 
1026
<tr>
 
1027
<td><p><span class="term"><em class="parameter"><code>width</code></em>Ā :</span></p></td>
 
1028
<td> Width of the viewport
 
1029
</td>
 
1030
</tr>
 
1031
<tr>
 
1032
<td><p><span class="term"><em class="parameter"><code>height</code></em>Ā :</span></p></td>
 
1033
<td> Height of the viewport
 
1034
</td>
 
1035
</tr>
 
1036
</tbody>
 
1037
</table></div>
 
1038
<p class="since">Since 0.8.2</p>
 
1039
</div>
 
1040
<hr>
 
1041
<div class="refsect2" title="cogl_set_viewport ()">
 
1042
<a name="cogl-set-viewport"></a><h3>cogl_set_viewport ()</h3>
 
1043
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_set_viewport                   (<span class="returnvalue">int</span> x,
 
1044
                                                         <span class="returnvalue">int</span> y,
 
1045
                                                         <span class="returnvalue">int</span> width,
 
1046
                                                         <span class="returnvalue">int</span> height);</pre>
1175
1047
<p>
1176
 
</p>
 
1048
Replaces the current viewport with the given values.</p>
1177
1049
<div class="variablelist"><table border="0">
1178
1050
<col align="left" valign="top">
1179
1051
<tbody>
1180
1052
<tr>
 
1053
<td><p><span class="term"><em class="parameter"><code>x</code></em>Ā :</span></p></td>
 
1054
<td> X offset of the viewport
 
1055
</td>
 
1056
</tr>
 
1057
<tr>
 
1058
<td><p><span class="term"><em class="parameter"><code>y</code></em>Ā :</span></p></td>
 
1059
<td> Y offset of the viewport
 
1060
</td>
 
1061
</tr>
 
1062
<tr>
1181
1063
<td><p><span class="term"><em class="parameter"><code>width</code></em>Ā :</span></p></td>
1182
1064
<td> Width of the viewport
1183
1065
</td>
1189
1071
</tr>
1190
1072
</tbody>
1191
1073
</table></div>
1192
 
<p class="since">Since 0.8.2</p>
 
1074
<p class="since">Since 1.2</p>
1193
1075
</div>
1194
1076
<hr>
1195
1077
<div class="refsect2" title="cogl_get_viewport ()">
1196
1078
<a name="cogl-get-viewport"></a><h3>cogl_get_viewport ()</h3>
1197
 
<pre class="programlisting">void                cogl_get_viewport                   (float v[4]);</pre>
 
1079
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_get_viewport                   (<span class="returnvalue">float</span> v[4]);</pre>
1198
1080
<p>
1199
1081
Stores the current viewport in <em class="parameter"><code>v</code></em>. <em class="parameter"><code>v</code></em>[0] and <em class="parameter"><code>v</code></em>[1] get the x and y
1200
1082
position of the viewport and <em class="parameter"><code>v</code></em>[2] and <em class="parameter"><code>v</code></em>[3] get the width and
1201
1083
height.</p>
1202
 
<p>
1203
 
</p>
1204
1084
<div class="variablelist"><table border="0">
1205
1085
<col align="left" valign="top">
1206
1086
<tbody><tr>
1207
1087
<td><p><span class="term"><em class="parameter"><code>v</code></em>Ā :</span></p></td>
1208
 
<td> pointer to a 4 element array of <span class="type">float</span>s to
1209
 
receive the viewport dimensions.
1210
 
</td>
 
1088
<td>out) (array fixed-size=4. <a href="http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=out"><span class="acronym">out</span></a>. <a href="http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=array"><span class="acronym">array</span></a> fixed-size=4. </td>
1211
1089
</tr></tbody>
1212
1090
</table></div>
1213
1091
</div>
1214
1092
<hr>
1215
1093
<div class="refsect2" title="cogl_clear ()">
1216
1094
<a name="cogl-clear"></a><h3>cogl_clear ()</h3>
1217
 
<pre class="programlisting">void                cogl_clear                          (const <a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor">CoglColor</a> *color,
1218
 
                                                         <a
1219
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
1220
 
>gulong</a> buffers);</pre>
 
1095
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_clear                          (const <a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor"><span class="returnvalue">CoglColor</span></a> *color,
 
1096
                                                         <span class="returnvalue">unsigned long </span> buffers);</pre>
1221
1097
<p>
1222
1098
Clears all the auxiliary buffers identified in the <em class="parameter"><code>buffers</code></em> mask, and if
1223
1099
that includes the color buffer then the specified <em class="parameter"><code>color</code></em> is used.</p>
1224
 
<p>
1225
 
</p>
1226
1100
<div class="variablelist"><table border="0">
1227
1101
<col align="left" valign="top">
1228
1102
<tbody>
1243
1117
<hr>
1244
1118
<div class="refsect2" title="cogl_get_bitmasks ()">
1245
1119
<a name="cogl-get-bitmasks"></a><h3>cogl_get_bitmasks ()</h3>
1246
 
<pre class="programlisting">void                cogl_get_bitmasks                   (<a
1247
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
1248
 
>gint</a> *red,
1249
 
                                                         <a
1250
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
1251
 
>gint</a> *green,
1252
 
                                                         <a
1253
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
1254
 
>gint</a> *blue,
1255
 
                                                         <a
1256
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
1257
 
>gint</a> *alpha);</pre>
 
1120
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_get_bitmasks                   (<span class="returnvalue">int</span> *red,
 
1121
                                                         <span class="returnvalue">int</span> *green,
 
1122
                                                         <span class="returnvalue">int</span> *blue,
 
1123
                                                         <span class="returnvalue">int</span> *alpha);</pre>
1258
1124
<p>
1259
1125
Gets the number of bitplanes used for each of the color components
1260
 
in the color buffer. Pass <a
1261
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1262
 
><code class="literal">NULL</code></a> for any of the arguments if the
 
1126
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
1263
1127
value is not required.</p>
1264
 
<p>
1265
 
</p>
1266
1128
<div class="variablelist"><table border="0">
1267
1129
<col align="left" valign="top">
1268
1130
<tbody>
1269
1131
<tr>
1270
1132
<td><p><span class="term"><em class="parameter"><code>red</code></em>Ā :</span></p></td>
1271
 
<td> Return location for the number of red bits or <a
1272
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1273
 
><code class="literal">NULL</code></a>
1274
 
</td>
 
1133
<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>. <a href="http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=out"><span class="acronym">out</span></a>. </td>
1275
1134
</tr>
1276
1135
<tr>
1277
1136
<td><p><span class="term"><em class="parameter"><code>green</code></em>Ā :</span></p></td>
1278
 
<td> Return location for the number of green bits or <a
1279
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1280
 
><code class="literal">NULL</code></a>
1281
 
</td>
 
1137
<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>. <a href="http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=out"><span class="acronym">out</span></a>. </td>
1282
1138
</tr>
1283
1139
<tr>
1284
1140
<td><p><span class="term"><em class="parameter"><code>blue</code></em>Ā :</span></p></td>
1285
 
<td> Return location for the number of blue bits or <a
1286
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1287
 
><code class="literal">NULL</code></a>
1288
 
</td>
 
1141
<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>. <a href="http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=out"><span class="acronym">out</span></a>. </td>
1289
1142
</tr>
1290
1143
<tr>
1291
1144
<td><p><span class="term"><em class="parameter"><code>alpha</code></em>Ā :</span></p></td>
1292
 
<td> Return location for the number of alpha bits or <a
1293
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1294
 
><code class="literal">NULL</code></a>
1295
 
</td>
 
1145
<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>. <a href="http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=out"><span class="acronym">out</span></a>. </td>
1296
1146
</tr>
1297
1147
</tbody>
1298
1148
</table></div>
1300
1150
<hr>
1301
1151
<div class="refsect2" title="cogl_set_depth_test_enabled ()">
1302
1152
<a name="cogl-set-depth-test-enabled"></a><h3>cogl_set_depth_test_enabled ()</h3>
1303
 
<pre class="programlisting">void                cogl_set_depth_test_enabled         (<a
1304
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
1305
 
>gboolean</a> setting);</pre>
 
1153
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_set_depth_test_enabled         (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> setting);</pre>
1306
1154
<p>
1307
1155
Sets whether depth testing is enabled. If it is disabled then the
1308
1156
order that actors are layered on the screen depends solely on the
1309
 
order specified using <a
1310
 
href="../clutter/ClutterActor.html#clutter-actor-raise"
1311
 
><code class="function">clutter_actor_raise()</code></a> and
1312
 
<a
1313
 
href="../clutter/ClutterActor.html#clutter-actor-lower"
1314
 
><code class="function">clutter_actor_lower()</code></a>, otherwise it will also take into account the
 
1157
order specified using <a href="../clutter/ClutterActor.html#clutter-actor-raise"><code class="function">clutter_actor_raise()</code></a> and
 
1158
<a href="../clutter/ClutterActor.html#clutter-actor-lower"><code class="function">clutter_actor_lower()</code></a>, otherwise it will also take into account the
1315
1159
actor's depth. Depth testing is disabled by default.</p>
1316
 
<p>
1317
 
</p>
1318
1160
<div class="variablelist"><table border="0">
1319
1161
<col align="left" valign="top">
1320
1162
<tbody><tr>
1321
1163
<td><p><span class="term"><em class="parameter"><code>setting</code></em>Ā :</span></p></td>
1322
 
<td> <a
1323
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
1324
 
><code class="literal">TRUE</code></a> to enable depth testing or <a
1325
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
1326
 
><code class="literal">FALSE</code></a> to disable.
 
1164
<td> <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.
1327
1165
</td>
1328
1166
</tr></tbody>
1329
1167
</table></div>
1331
1169
<hr>
1332
1170
<div class="refsect2" title="cogl_get_depth_test_enabled ()">
1333
1171
<a name="cogl-get-depth-test-enabled"></a><h3>cogl_get_depth_test_enabled ()</h3>
1334
 
<pre class="programlisting"><a
1335
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
1336
 
>gboolean</a>            cogl_get_depth_test_enabled         (void);</pre>
 
1172
<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         (void);</pre>
1337
1173
<p>
1338
1174
Queries if depth testing has been enabled via <code class="function">cogl_set_depth_test_enable()</code></p>
1339
 
<p>
1340
 
</p>
1341
1175
<div class="variablelist"><table border="0">
1342
1176
<col align="left" valign="top">
1343
1177
<tbody><tr>
1344
1178
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>Ā :</span></p></td>
1345
 
<td> <a
1346
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
1347
 
><code class="literal">TRUE</code></a> if depth testing is enabled, and <a
1348
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
1349
 
><code class="literal">FALSE</code></a> otherwise
 
1179
<td> <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
1350
1180
</td>
1351
1181
</tr></tbody>
1352
1182
</table></div>
1354
1184
<hr>
1355
1185
<div class="refsect2" title="cogl_set_backface_culling_enabled ()">
1356
1186
<a name="cogl-set-backface-culling-enabled"></a><h3>cogl_set_backface_culling_enabled ()</h3>
1357
 
<pre class="programlisting">void                cogl_set_backface_culling_enabled   (<a
1358
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
1359
 
>gboolean</a> setting);</pre>
 
1187
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_set_backface_culling_enabled   (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> setting);</pre>
1360
1188
<p>
1361
1189
Sets whether textures positioned so that their backface is showing
1362
1190
should be hidden. This can be used to efficiently draw two-sided
1363
1191
textures or fully closed cubes without enabling depth testing. This
1364
1192
only affects calls to the cogl_rectangle* family of functions and
1365
1193
cogl_vertex_buffer_draw*. Backface culling is disabled by default.</p>
1366
 
<p>
1367
 
</p>
1368
1194
<div class="variablelist"><table border="0">
1369
1195
<col align="left" valign="top">
1370
1196
<tbody><tr>
1371
1197
<td><p><span class="term"><em class="parameter"><code>setting</code></em>Ā :</span></p></td>
1372
 
<td> <a
1373
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
1374
 
><code class="literal">TRUE</code></a> to enable backface culling or <a
1375
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
1376
 
><code class="literal">FALSE</code></a> to disable.
 
1198
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to enable backface culling or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to disable.
1377
1199
</td>
1378
1200
</tr></tbody>
1379
1201
</table></div>
1381
1203
<hr>
1382
1204
<div class="refsect2" title="cogl_get_backface_culling_enabled ()">
1383
1205
<a name="cogl-get-backface-culling-enabled"></a><h3>cogl_get_backface_culling_enabled ()</h3>
1384
 
<pre class="programlisting"><a
1385
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
1386
 
>gboolean</a>            cogl_get_backface_culling_enabled   (void);</pre>
 
1206
<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_backface_culling_enabled   (void);</pre>
1387
1207
<p>
1388
1208
Queries if backface culling has been enabled via
1389
1209
<a class="link" href="cogl-General-API.html#cogl-set-backface-culling-enabled" title="cogl_set_backface_culling_enabled ()"><code class="function">cogl_set_backface_culling_enabled()</code></a></p>
1390
 
<p>
1391
 
</p>
1392
1210
<div class="variablelist"><table border="0">
1393
1211
<col align="left" valign="top">
1394
1212
<tbody><tr>
1395
1213
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>Ā :</span></p></td>
1396
 
<td> <a
1397
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
1398
 
><code class="literal">TRUE</code></a> if backface culling is enabled, and <a
1399
 
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
1400
 
><code class="literal">FALSE</code></a> otherwise
 
1214
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if backface culling 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
1401
1215
</td>
1402
1216
</tr></tbody>
1403
1217
</table></div>
1413
1227
</pre>
1414
1228
<p>
1415
1229
The fog mode determines the equation used to calculate the fogging blend
1416
 
factor while fogging is enabled. The simplest <a class="link" href="cogl-General-API.html#COGL-FOG-MODE-LINEAR--CAPS"><code class="literal">COGL_FOG_MODE_LINEAR</code></a> mode
 
1230
factor while fogging is enabled. The simplest <a class="link" href="cogl-General-API.html#COGL-FOG-MODE-LINEAR:CAPS"><code class="literal">COGL_FOG_MODE_LINEAR</code></a> mode
1417
1231
determines f as:
1418
1232
</p>
1419
1233
<p>
1426
1240
<p>
1427
1241
Where eye_distance is the distance of the current fragment in eye
1428
1242
coordinates from the origin.</p>
1429
 
<p>
1430
 
</p>
1431
1243
<div class="variablelist"><table border="0">
1432
1244
<col align="left" valign="top">
1433
1245
<tbody>
1434
1246
<tr>
1435
 
<td><p><a name="COGL-FOG-MODE-LINEAR--CAPS"></a><span class="term"><code class="literal">COGL_FOG_MODE_LINEAR</code></span></p></td>
 
1247
<td><p><a name="COGL-FOG-MODE-LINEAR:CAPS"></a><span class="term"><code class="literal">COGL_FOG_MODE_LINEAR</code></span></p></td>
1436
1248
<td> Calculates the fog blend factor as:
1437
1249
<div class="informalexample"><pre class="programlisting">
1438
1250
  f = end - eye_distance / end - start
1440
1252
</td>
1441
1253
</tr>
1442
1254
<tr>
1443
 
<td><p><a name="COGL-FOG-MODE-EXPONENTIAL--CAPS"></a><span class="term"><code class="literal">COGL_FOG_MODE_EXPONENTIAL</code></span></p></td>
 
1255
<td><p><a name="COGL-FOG-MODE-EXPONENTIAL:CAPS"></a><span class="term"><code class="literal">COGL_FOG_MODE_EXPONENTIAL</code></span></p></td>
1444
1256
<td> Calculates the fog blend factor as:
1445
1257
<div class="informalexample"><pre class="programlisting">
1446
1258
  f = e ^ -(density * eye_distance)
1448
1260
</td>
1449
1261
</tr>
1450
1262
<tr>
1451
 
<td><p><a name="COGL-FOG-MODE-EXPONENTIAL-SQUARED--CAPS"></a><span class="term"><code class="literal">COGL_FOG_MODE_EXPONENTIAL_SQUARED</code></span></p></td>
 
1263
<td><p><a name="COGL-FOG-MODE-EXPONENTIAL-SQUARED:CAPS"></a><span class="term"><code class="literal">COGL_FOG_MODE_EXPONENTIAL_SQUARED</code></span></p></td>
1452
1264
<td> Calculates the fog blend factor as:
1453
1265
<div class="informalexample"><pre class="programlisting">
1454
1266
  f = e ^ -(density * eye_distance)^2
1462
1274
<hr>
1463
1275
<div class="refsect2" title="cogl_set_fog ()">
1464
1276
<a name="cogl-set-fog"></a><h3>cogl_set_fog ()</h3>
1465
 
<pre class="programlisting">void                cogl_set_fog                        (const <a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor">CoglColor</a> *fog_color,
1466
 
                                                         <a class="link" href="cogl-General-API.html#CoglFogMode" title="enum CoglFogMode">CoglFogMode</a> mode,
1467
 
                                                         float density,
1468
 
                                                         float z_near,
1469
 
                                                         float z_far);</pre>
 
1277
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_set_fog                        (const <a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor"><span class="returnvalue">CoglColor</span></a> *fog_color,
 
1278
                                                         <a class="link" href="cogl-General-API.html#CoglFogMode" title="enum CoglFogMode"><span class="returnvalue">CoglFogMode</span></a> mode,
 
1279
                                                         <span class="returnvalue">float</span> density,
 
1280
                                                         <span class="returnvalue">float</span> z_near,
 
1281
                                                         <span class="returnvalue">float</span> z_far);</pre>
1470
1282
<p>
1471
1283
Enables fogging. Fogging causes vertices that are further away from the eye
1472
1284
to be rendered with a different color. The color is determined according to
1485
1297
and use <a class="link" href="cogl-Materials.html#cogl-material-set-color" title="cogl_material_set_color ()"><code class="function">cogl_material_set_color()</code></a> you can only use fogging with fully
1486
1298
opaque primitives. This might improve in the future when we can depend
1487
1299
on fragment shaders.</div>
1488
 
<p>
1489
 
</p>
1490
1300
<div class="variablelist"><table border="0">
1491
1301
<col align="left" valign="top">
1492
1302
<tbody>
1497
1307
</tr>
1498
1308
<tr>
1499
1309
<td><p><span class="term"><em class="parameter"><code>mode</code></em>Ā :</span></p></td>
1500
 
<td> A CoglFogMode that determines the equation used to calculate the
1501
 
       fogging blend factor.
 
1310
<td> A <a class="link" href="cogl-General-API.html#CoglFogMode" title="enum CoglFogMode"><span class="type">CoglFogMode</span></a> that determines the equation used to calculate the
 
1311
  fogging blend factor.
1502
1312
</td>
1503
1313
</tr>
1504
1314
<tr>
1505
1315
<td><p><span class="term"><em class="parameter"><code>density</code></em>Ā :</span></p></td>
1506
 
<td> Used by the EXPONENTIAL and EXPONENTIAL_SQUARED CoglFogMode
1507
 
          equations.
 
1316
<td> Used by <a class="link" href="cogl-General-API.html#COGL-FOG-MODE-EXPONENTIAL:CAPS"><code class="literal">COGL_FOG_MODE_EXPONENTIAL</code></a> and by
 
1317
  <a class="link" href="cogl-General-API.html#COGL-FOG-MODE-EXPONENTIAL-SQUARED:CAPS"><code class="literal">COGL_FOG_MODE_EXPONENTIAL_SQUARED</code></a> equations.
1508
1318
</td>
1509
1319
</tr>
1510
1320
<tr>
1511
1321
<td><p><span class="term"><em class="parameter"><code>z_near</code></em>Ā :</span></p></td>
1512
 
<td> Position along z-axis where no fogging should be applied
 
1322
<td> Position along Z axis where no fogging should be applied
1513
1323
</td>
1514
1324
</tr>
1515
1325
<tr>
1516
1326
<td><p><span class="term"><em class="parameter"><code>z_far</code></em>Ā :</span></p></td>
1517
 
<td> Position along z-axes where full fogging should be applied
 
1327
<td> Position along Z axis where full fogging should be applied
1518
1328
</td>
1519
1329
</tr>
1520
1330
</tbody>
1523
1333
<hr>
1524
1334
<div class="refsect2" title="cogl_disable_fog ()">
1525
1335
<a name="cogl-disable-fog"></a><h3>cogl_disable_fog ()</h3>
1526
 
<pre class="programlisting">void                cogl_disable_fog                    (void);</pre>
 
1336
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_disable_fog                    (void);</pre>
1527
1337
<p>
1528
1338
This function disables fogging, so primitives drawn afterwards will not be
1529
1339
blended with any previously set fog color.</p>
1530
 
<p>
1531
 
</p>
1532
1340
</div>
1533
1341
<hr>
1534
1342
<div class="refsect2" title="cogl_set_source ()">
1535
1343
<a name="cogl-set-source"></a><h3>cogl_set_source ()</h3>
1536
 
<pre class="programlisting">void                cogl_set_source                     (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> material);</pre>
 
1344
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_set_source                     (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> material);</pre>
1537
1345
<p>
1538
1346
This function sets the source material that will be used to fill subsequent
1539
1347
geometry emitted via the cogl API.
1540
1348
</p>
1541
1349
<p>
1542
 
Note: in the future we may add the ability to set a front facing material,
 
1350
</p>
 
1351
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1352
<h3 class="title">Note</h3>In the future we may add the ability to set a front facing material,
1543
1353
and a back facing material, in which case this function will set both to the
1544
 
same.
1545
 
</p>
1546
 
<p>
1547
 
Since 1.0</p>
1548
 
<p>
1549
 
</p>
 
1354
same.</div>
1550
1355
<div class="variablelist"><table border="0">
1551
1356
<col align="left" valign="top">
1552
1357
<tbody><tr>
1553
1358
<td><p><span class="term"><em class="parameter"><code>material</code></em>Ā :</span></p></td>
1554
 
<td> A CoglMaterial object
 
1359
<td> A <a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="type">CoglHandle</span></a> for a material
1555
1360
</td>
1556
1361
</tr></tbody>
1557
1362
</table></div>
 
1363
<p class="since">Since 1.0</p>
1558
1364
</div>
1559
1365
<hr>
1560
1366
<div class="refsect2" title="cogl_set_source_color ()">
1561
1367
<a name="cogl-set-source-color"></a><h3>cogl_set_source_color ()</h3>
1562
 
<pre class="programlisting">void                cogl_set_source_color               (const <a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor">CoglColor</a> *color);</pre>
 
1368
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_set_source_color               (const <a class="link" href="cogl-Color-Type.html#CoglColor" title="CoglColor"><span class="returnvalue">CoglColor</span></a> *color);</pre>
1563
1369
<p>
1564
1370
This is a convenience function for creating a solid fill source material
1565
1371
from the given color. This color will be used for any subsequent drawing
1573
1379
<p>
1574
1380
See also <a class="link" href="cogl-General-API.html#cogl-set-source-color4ub" title="cogl_set_source_color4ub ()"><code class="function">cogl_set_source_color4ub()</code></a> and <a class="link" href="cogl-General-API.html#cogl-set-source-color4f" title="cogl_set_source_color4f ()"><code class="function">cogl_set_source_color4f()</code></a>
1575
1381
if you already have the color components.</p>
1576
 
<p>
1577
 
</p>
1578
1382
<div class="variablelist"><table border="0">
1579
1383
<col align="left" valign="top">
1580
1384
<tbody><tr>
1588
1392
<hr>
1589
1393
<div class="refsect2" title="cogl_set_source_color4ub ()">
1590
1394
<a name="cogl-set-source-color4ub"></a><h3>cogl_set_source_color4ub ()</h3>
1591
 
<pre class="programlisting">void                cogl_set_source_color4ub            (<a
1592
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
1593
 
>guint8</a> red,
1594
 
                                                         <a
1595
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
1596
 
>guint8</a> green,
1597
 
                                                         <a
1598
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
1599
 
>guint8</a> blue,
1600
 
                                                         <a
1601
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
1602
 
>guint8</a> alpha);</pre>
 
1395
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_set_source_color4ub            (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> red,
 
1396
                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> green,
 
1397
                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> blue,
 
1398
                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> alpha);</pre>
1603
1399
<p>
1604
1400
This is a convenience function for creating a solid fill source material
1605
1401
from the given color using unsigned bytes for each component. This
1608
1404
<p>
1609
1405
The value for each component is an unsigned byte in the range
1610
1406
between 0 and 255.</p>
1611
 
<p>
1612
 
</p>
1613
1407
<div class="variablelist"><table border="0">
1614
1408
<col align="left" valign="top">
1615
1409
<tbody>
1640
1434
<hr>
1641
1435
<div class="refsect2" title="cogl_set_source_color4f ()">
1642
1436
<a name="cogl-set-source-color4f"></a><h3>cogl_set_source_color4f ()</h3>
1643
 
<pre class="programlisting">void                cogl_set_source_color4f             (float red,
1644
 
                                                         float green,
1645
 
                                                         float blue,
1646
 
                                                         float alpha);</pre>
 
1437
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_set_source_color4f             (<span class="returnvalue">float</span> red,
 
1438
                                                         <span class="returnvalue">float</span> green,
 
1439
                                                         <span class="returnvalue">float</span> blue,
 
1440
                                                         <span class="returnvalue">float</span> alpha);</pre>
1647
1441
<p>
1648
1442
This is a convenience function for creating a solid fill source material
1649
1443
from the given color using normalized values for each component. This color
1653
1447
The value for each component is a fixed point number in the range
1654
1448
between 0 and <code class="literal">1</code>.0. If the values passed in are outside that
1655
1449
range, they will be clamped.</p>
1656
 
<p>
1657
 
</p>
1658
1450
<div class="variablelist"><table border="0">
1659
1451
<col align="left" valign="top">
1660
1452
<tbody>
1685
1477
<hr>
1686
1478
<div class="refsect2" title="cogl_set_source_texture ()">
1687
1479
<a name="cogl-set-source-texture"></a><h3>cogl_set_source_texture ()</h3>
1688
 
<pre class="programlisting">void                cogl_set_source_texture             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle">CoglHandle</a> texture_handle);</pre>
 
1480
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_set_source_texture             (<a class="link" href="cogl-General-API.html#CoglHandle" title="CoglHandle"><span class="returnvalue">CoglHandle</span></a> texture_handle);</pre>
1689
1481
<p>
1690
1482
This is a convenience function for creating a material with the first
1691
1483
layer set to <span class="type">texture_handle</span> and setting that material as the source with
1702
1494
cogl_material_set_layer (material, 0, tex_handle);
1703
1495
cogl_set_source (material);
1704
1496
</pre>
1705
 
<p>
1706
 
</p>
1707
 
<p>
1708
 
Since 1.0</p>
1709
 
<p>
1710
 
</p>
1711
1497
<div class="variablelist"><table border="0">
1712
1498
<col align="left" valign="top">
1713
1499
<tbody><tr>
1716
1502
</td>
1717
1503
</tr></tbody>
1718
1504
</table></div>
 
1505
<p class="since">Since 1.0</p>
1719
1506
</div>
1720
1507
<hr>
1721
1508
<div class="refsect2" title="enum CoglReadPixelsFlags">
1726
1513
</pre>
1727
1514
<p>
1728
1515
Flags for <a class="link" href="cogl-General-API.html#cogl-read-pixels" title="cogl_read_pixels ()"><code class="function">cogl_read_pixels()</code></a></p>
1729
 
<p>
1730
 
</p>
1731
1516
<div class="variablelist"><table border="0">
1732
1517
<col align="left" valign="top">
1733
1518
<tbody><tr>
1734
 
<td><p><a name="COGL-READ-PIXELS-COLOR-BUFFER--CAPS"></a><span class="term"><code class="literal">COGL_READ_PIXELS_COLOR_BUFFER</code></span></p></td>
 
1519
<td><p><a name="COGL-READ-PIXELS-COLOR-BUFFER:CAPS"></a><span class="term"><code class="literal">COGL_READ_PIXELS_COLOR_BUFFER</code></span></p></td>
1735
1520
<td> Read from the color buffer
1736
1521
</td>
1737
1522
</tr></tbody>
1741
1526
<hr>
1742
1527
<div class="refsect2" title="cogl_read_pixels ()">
1743
1528
<a name="cogl-read-pixels"></a><h3>cogl_read_pixels ()</h3>
1744
 
<pre class="programlisting">void                cogl_read_pixels                    (int x,
1745
 
                                                         int y,
1746
 
                                                         int width,
1747
 
                                                         int height,
1748
 
                                                         <a class="link" href="cogl-General-API.html#CoglReadPixelsFlags" title="enum CoglReadPixelsFlags">CoglReadPixelsFlags</a> source,
1749
 
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat">CoglPixelFormat</a> format,
1750
 
                                                         <a
1751
 
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
1752
 
>guint8</a> *pixels);</pre>
 
1529
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_read_pixels                    (<span class="returnvalue">int</span> x,
 
1530
                                                         <span class="returnvalue">int</span> y,
 
1531
                                                         <span class="returnvalue">int</span> width,
 
1532
                                                         <span class="returnvalue">int</span> height,
 
1533
                                                         <a class="link" href="cogl-General-API.html#CoglReadPixelsFlags" title="enum CoglReadPixelsFlags"><span class="returnvalue">CoglReadPixelsFlags</span></a> source,
 
1534
                                                         <a class="link" href="cogl-General-API.html#CoglPixelFormat" title="enum CoglPixelFormat"><span class="returnvalue">CoglPixelFormat</span></a> format,
 
1535
                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"><span class="returnvalue">guint8</span></a> *pixels);</pre>
1753
1536
<p>
1754
 
This reads a rectangle of pixels from the current draw buffer where
 
1537
This reads a rectangle of pixels from the current framebuffer where
1755
1538
position (0, 0) is the top left. The pixel at (x, y) is the first
1756
 
read, and the data is returned with a rowstride of (width * 4)</p>
 
1539
read, and the data is returned with a rowstride of (width * 4).
 
1540
</p>
1757
1541
<p>
1758
 
</p>
 
1542
Currently Cogl assumes that the framebuffer is in a premultiplied
 
1543
format so if <em class="parameter"><code>format</code></em> is non-premultiplied it will convert it. To
 
1544
read the pixel values without any conversion you should either
 
1545
specify a format that doesn't use an alpha channel or use one of
 
1546
the formats ending in PRE.</p>
1759
1547
<div class="variablelist"><table border="0">
1760
1548
<col align="left" valign="top">
1761
1549
<tbody>
1802
1590
<hr>
1803
1591
<div class="refsect2" title="cogl_flush ()">
1804
1592
<a name="cogl-flush"></a><h3>cogl_flush ()</h3>
1805
 
<pre class="programlisting">void                cogl_flush                          (void);</pre>
 
1593
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_flush                          (void);</pre>
1806
1594
<p>
1807
1595
This function should only need to be called in exceptional circumstances.
1808
1596
</p>
1828
1616
conflicting with Cogl internals. For example clutter-gst which currently
1829
1617
uses direct GL calls to bind ARBfp programs will very likely break when Cogl
1830
1618
starts to use ARBfb programs itself for the material API.</p>
1831
 
<p>
1832
 
</p>
1833
1619
<p class="since">Since 1.0</p>
1834
1620
</div>
1835
1621
<hr>
1836
1622
<div class="refsect2" title="cogl_begin_gl ()">
1837
1623
<a name="cogl-begin-gl"></a><h3>cogl_begin_gl ()</h3>
1838
 
<pre class="programlisting">void                cogl_begin_gl                       (void);</pre>
 
1624
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_begin_gl                       (void);</pre>
1839
1625
<p>
1840
1626
We do not advise nor reliably support the interleaving of raw GL drawing and
1841
1627
Cogl drawing functions, but if you insist, <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()"><code class="function">cogl_begin_gl()</code></a> and <a class="link" href="cogl-General-API.html#cogl-end-gl" title="cogl_end_gl ()"><code class="function">cogl_end_gl()</code></a>
1847
1633
through the modification of GL state; that will never be reliably supported,
1848
1634
but if you are trying to do something like:
1849
1635
</p>
1850
 
<pre class="programlisting">
 
1636
<p>
 
1637
</p>
 
1638
<div class="informalexample"><pre class="programlisting">
1851
1639
{
1852
1640
   - setup some OpenGL state.
1853
1641
   - draw using OpenGL (e.g. glDrawArrays() )
1854
1642
   - reset modified OpenGL state.
1855
1643
   - continue using Cogl to draw
1856
1644
}
1857
 
</pre>
 
1645
</pre></div>
 
1646
<p>
 
1647
</p>
1858
1648
<p>
1859
1649
You should surround blocks of drawing using raw GL with <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()"><code class="function">cogl_begin_gl()</code></a>
1860
1650
and <a class="link" href="cogl-General-API.html#cogl-end-gl" title="cogl_end_gl ()"><code class="function">cogl_end_gl()</code></a>:
1861
1651
</p>
1862
 
<pre class="programlisting">
 
1652
<p>
 
1653
</p>
 
1654
<div class="informalexample"><pre class="programlisting">
1863
1655
{
1864
1656
   cogl_begin_gl ();
1865
1657
   - setup some OpenGL state.
1868
1660
   cogl_end_gl ();
1869
1661
   - continue using Cogl to draw
1870
1662
}
1871
 
</pre>
 
1663
</pre></div>
1872
1664
<p>
1873
1665
</p>
1874
1666
<p>
1875
1667
Don't ever try and do:
1876
1668
</p>
1877
 
<pre class="programlisting">
 
1669
<p>
 
1670
</p>
 
1671
<div class="informalexample"><pre class="programlisting">
1878
1672
{
1879
1673
   - setup some OpenGL state.
1880
1674
   - use Cogl to draw
1881
1675
   - reset modified OpenGL state.
1882
1676
}
1883
 
</pre>
 
1677
</pre></div>
 
1678
<p>
 
1679
</p>
1884
1680
<p>
1885
1681
When the internals of Cogl evolves, this is very liable to break.
1886
1682
</p>
1896
1692
to OpenGL.
1897
1693
</p>
1898
1694
<p>
1899
 
Note: no special material state is flushed, so if you want Cogl to setup a
 
1695
</p>
 
1696
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1697
<h3 class="title">Note</h3>No special material state is flushed, so if you want Cogl to setup a
1900
1698
simplified material state it is your responsibility to set a simple source
1901
 
material before calling cogl_begin_gl. E.g. by calling
1902
 
<a class="link" href="cogl-General-API.html#cogl-set-source-color4ub" title="cogl_set_source_color4ub ()"><code class="function">cogl_set_source_color4ub()</code></a>.
1903
 
</p>
1904
 
<p>
1905
 
Note: It is your responsibility to restore any OpenGL state that you modify
 
1699
material before calling <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()"><code class="function">cogl_begin_gl()</code></a>. E.g. by calling
 
1700
<a class="link" href="cogl-General-API.html#cogl-set-source-color4ub" title="cogl_set_source_color4ub ()"><code class="function">cogl_set_source_color4ub()</code></a>.</div>
 
1701
<p>
 
1702
</p>
 
1703
<p>
 
1704
</p>
 
1705
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1706
<h3 class="title">Note</h3>It is your responsibility to restore any OpenGL state that you modify
1906
1707
to how it was after calling <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()"><code class="function">cogl_begin_gl()</code></a> if you don't do this then the
1907
 
result of further Cogl calls is undefined.
1908
 
</p>
1909
 
<p>
1910
 
Note: You can not nest begin/end blocks.
 
1708
result of further Cogl calls is undefined.</div>
 
1709
<p>
 
1710
</p>
 
1711
<p>
 
1712
</p>
 
1713
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1714
<h3 class="title">Note</h3>You can not nest begin/end blocks.</div>
 
1715
<p>
1911
1716
</p>
1912
1717
<p>
1913
1718
Again we would like to stress, we do not advise the use of this API and if
1914
1719
possible we would prefer to improve Cogl than have developers require raw
1915
1720
OpenGL.</p>
1916
 
<p>
1917
 
</p>
1918
1721
<p class="since">Since 1.0</p>
1919
1722
</div>
1920
1723
<hr>
1921
1724
<div class="refsect2" title="cogl_end_gl ()">
1922
1725
<a name="cogl-end-gl"></a><h3>cogl_end_gl ()</h3>
1923
 
<pre class="programlisting">void                cogl_end_gl                         (void);</pre>
 
1726
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_end_gl                         (void);</pre>
1924
1727
<p>
1925
1728
This is the counterpart to <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()"><code class="function">cogl_begin_gl()</code></a> used to delimit blocks of drawing
1926
1729
code using raw OpenGL. Please refer to <a class="link" href="cogl-General-API.html#cogl-begin-gl" title="cogl_begin_gl ()"><code class="function">cogl_begin_gl()</code></a> for full details.</p>
1927
 
<p>
1928
 
</p>
1929
1730
<p class="since">Since 1.0</p>
1930
1731
</div>
1931
1732
</div>
1932
1733
</div>
1933
1734
<div class="footer">
1934
1735
<hr>
1935
 
          Generated by GTK-Doc V1.11</div>
 
1736
          Generated by GTK-Doc V1.13</div>
1936
1737
</body>
1937
 
</html>
 
1738
</html>
 
 
b'\\ No newline at end of file'