1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>OpenGL Window</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><meta name="generator" content="GTK-Doc V1.1 (XML mode)"><style type="text/css">
2
.synopsis, .classsynopsis {
4
border: solid 1px #aaaaaa;
9
border: solid 1px #aaaaff;
18
border: solid 1px #ffaaaa;
25
.navigation a:visited {
31
</style><link rel="home" href="index.html" title="GtkGLExt Reference Manual"><link rel="up" href="GdkGLExt-API.html" title="Part�II.�GdkGLExt API Reference"><link rel="previous" href="gtkglext-gdkglpixmap.html" title="OpenGL Pixmap"><link rel="next" href="gtkglext-gdkglfont.html" title="Font Rendering"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="gtkglext-gdkglpixmap.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="GdkGLExt-API.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GtkGLExt Reference Manual</th><td><a accesskey="n" href="gtkglext-gdkglfont.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="gtkglext-gdkglwindow"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">OpenGL Window</span></h2><p>OpenGL Window — OpenGL window which is located on-screen</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a name="GdkGLWindow"></a><pre class="synopsis">
33
#include <gdk/gdkgl.h>
36
struct <a href="gtkglext-gdkglwindow.html#GdkGLWindow-struct">GdkGLWindow</a>;
37
<a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a>* <a href="gtkglext-gdkglwindow.html#gdk-gl-window-new">gdk_gl_window_new</a> (<a href="gtkglext-gdkglconfig.html#GdkGLConfig">GdkGLConfig</a> *glconfig,
39
const int *attrib_list);
40
void <a href="gtkglext-gdkglwindow.html#gdk-gl-window-destroy">gdk_gl_window_destroy</a> (<a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a> *glwindow);
41
GdkWindow* <a href="gtkglext-gdkglwindow.html#gdk-gl-window-get-window">gdk_gl_window_get_window</a> (<a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a> *glwindow);
42
<a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a>* <a href="gtkglext-gdkglwindow.html#gdk-window-set-gl-capability">gdk_window_set_gl_capability</a> (GdkWindow *window,
43
<a href="gtkglext-gdkglconfig.html#GdkGLConfig">GdkGLConfig</a> *glconfig,
44
const int *attrib_list);
45
void <a href="gtkglext-gdkglwindow.html#gdk-window-unset-gl-capability">gdk_window_unset_gl_capability</a> (GdkWindow *window);
46
gboolean <a href="gtkglext-gdkglwindow.html#gdk-window-is-gl-capable">gdk_window_is_gl_capable</a> (GdkWindow *window);
47
<a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a>* <a href="gtkglext-gdkglwindow.html#gdk-window-get-gl-window">gdk_window_get_gl_window</a> (GdkWindow *window);
48
#define <a href="gtkglext-gdkglwindow.html#gdk-window-get-gl-drawable">gdk_window_get_gl_drawable</a> (window)
51
</pre></div><div class="refsect1" lang="en"><h2>Object Hierarchy</h2><pre class="synopsis">
56
</pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
58
</p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="GdkGLWindow-struct"></a>struct GdkGLWindow</h3><pre class="programlisting">struct GdkGLWindow;</pre><p>
60
</p></div><hr><div class="refsect2" lang="en"><h3><a name="gdk-gl-window-new"></a>gdk_gl_window_new ()</h3><pre class="programlisting"><a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a>* gdk_gl_window_new (<a href="gtkglext-gdkglconfig.html#GdkGLConfig">GdkGLConfig</a> *glconfig,
62
const int *attrib_list);</pre><p>
63
Creates an on-screen rendering area.
64
attrib_list is currently unused. This must be set to NULL or empty
65
(first attribute of None). See GLX 1.3 spec.</p><p>
67
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>glconfig</tt></i>�:</span></td><td> a <a href="gtkglext-gdkglconfig.html#GdkGLConfig">GdkGLConfig</a>.
68
</td></tr><tr><td><span class="term"><i class="parameter"><tt>window</tt></i>�:</span></td><td> the GdkWindow to be used as the rendering area.
69
</td></tr><tr><td><span class="term"><i class="parameter"><tt>attrib_list</tt></i>�:</span></td><td> this must be set to NULL or empty (first attribute of None).
70
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the new <a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a>.
71
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gdk-gl-window-destroy"></a>gdk_gl_window_destroy ()</h3><pre class="programlisting">void gdk_gl_window_destroy (<a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a> *glwindow);</pre><p>
72
Destroys the OpenGL resources associated with <i class="parameter"><tt>glwindow</tt></i> and
73
decrements <i class="parameter"><tt>glwindow</tt></i>'s reference count.</p><p>
75
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>glwindow</tt></i>�:</span></td><td> a <a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a>.
76
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gdk-gl-window-get-window"></a>gdk_gl_window_get_window ()</h3><pre class="programlisting">GdkWindow* gdk_gl_window_get_window (<a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a> *glwindow);</pre><p>
77
Returns the GdkWindow associated with <i class="parameter"><tt>glwindow</tt></i>.
79
Notice that <a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a> is not GdkWindow, but another
80
GdkDrawable which have an associated GdkWindow.</p><p>
82
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>glwindow</tt></i>�:</span></td><td> a <a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a>.
83
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the GdkWindow associated with <i class="parameter"><tt>glwindow</tt></i>.
84
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gdk-window-set-gl-capability"></a>gdk_window_set_gl_capability ()</h3><pre class="programlisting"><a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a>* gdk_window_set_gl_capability (GdkWindow *window,
85
<a href="gtkglext-gdkglconfig.html#GdkGLConfig">GdkGLConfig</a> *glconfig,
86
const int *attrib_list);</pre><p>
87
Set the OpenGL-capability to the <i class="parameter"><tt>window</tt></i>.
88
This function creates a new <a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a> held by the <i class="parameter"><tt>window</tt></i>.
89
attrib_list is currently unused. This must be set to NULL or empty
90
(first attribute of None).</p><p>
92
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>window</tt></i>�:</span></td><td> the GdkWindow to be used as the rendering area.
93
</td></tr><tr><td><span class="term"><i class="parameter"><tt>glconfig</tt></i>�:</span></td><td> a <a href="gtkglext-gdkglconfig.html#GdkGLConfig">GdkGLConfig</a>.
94
</td></tr><tr><td><span class="term"><i class="parameter"><tt>attrib_list</tt></i>�:</span></td><td> this must be set to NULL or empty (first attribute of None).
95
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the <a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a> used by the <i class="parameter"><tt>window</tt></i> if it is successful,
97
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gdk-window-unset-gl-capability"></a>gdk_window_unset_gl_capability ()</h3><pre class="programlisting">void gdk_window_unset_gl_capability (GdkWindow *window);</pre><p>
98
Unset the OpenGL-capability of the <i class="parameter"><tt>window</tt></i>.
99
This function destroys the <a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a> held by the <i class="parameter"><tt>window</tt></i>.</p><p>
101
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>window</tt></i>�:</span></td><td> a GdkWindow.
102
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gdk-window-is-gl-capable"></a>gdk_window_is_gl_capable ()</h3><pre class="programlisting">gboolean gdk_window_is_gl_capable (GdkWindow *window);</pre><p>
103
Returns whether the <i class="parameter"><tt>window</tt></i> is OpenGL-capable.</p><p>
105
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>window</tt></i>�:</span></td><td> a GdkWindow.
106
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE if the <i class="parameter"><tt>window</tt></i> is OpenGL-capable, FALSE otherwise.
107
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gdk-window-get-gl-window"></a>gdk_window_get_gl_window ()</h3><pre class="programlisting"><a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a>* gdk_window_get_gl_window (GdkWindow *window);</pre><p>
108
Returns the <a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a> held by the <i class="parameter"><tt>window</tt></i>.</p><p>
110
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>window</tt></i>�:</span></td><td> a GdkWindow.
111
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the <a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a>.
112
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gdk-window-get-gl-drawable"></a>gdk_window_get_gl_drawable()</h3><pre class="programlisting">#define gdk_window_get_gl_drawable(window)</pre><p>
113
Returns the <a href="gtkglext-gdkgldrawable.html#GdkGLDrawable">GdkGLDrawable</a> held by the <i class="parameter"><tt>window</tt></i>. In fact, this is macro
114
that casts the result of <a href="gtkglext-gdkglwindow.html#gdk-window-get-gl-window">gdk_window_get_gl_window</a> to <a href="gtkglext-gdkgldrawable.html#GdkGLDrawable">GdkGLDrawable</a>.
115
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>window</tt></i>�:</span></td><td>a <a href="gtkglext-gdkglwindow.html#GdkGLWindow">GdkGLWindow</a>.
116
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the <a href="gtkglext-gdkgldrawable.html#GdkGLDrawable">GdkGLDrawable</a>.
119
</td></tr></tbody></table></div></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="gtkglext-gdkglpixmap.html"><b><<�OpenGL Pixmap</b></a></td><td align="right"><a accesskey="n" href="gtkglext-gdkglfont.html"><b>Font Rendering�>></b></a></td></tr></table></body></html>