28eb8845f4d9914d68d5cb7870821860b60f4781
[clinton/guile-figl.git] / upstream-man-pages / man2 / xhtml / glXCreatePbuffer.xml
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
2 <!-- saved from url=(0013)about:internet -->
3 <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glXCreatePbuffer</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glXCreatePbuffer"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glXCreatePbuffer — create an off-screen rendering area</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">GLXPbuffer <b class="fsfunc">glXCreatePbuffer</b>(</code></td><td>Display *  </td><td><var class="pdparam">dpy</var>, </td></tr><tr><td> </td><td>GLXFBConfig  </td><td><var class="pdparam">config</var>, </td></tr><tr><td> </td><td>const int *  </td><td><var class="pdparam">attrib_list</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>dpy</code></em></span></dt><dd><p>
4 Specifies the connection to the X server.
5 </p></dd><dt><span class="term"><em class="parameter"><code>config</code></em></span></dt><dd><p>
6 Specifies a GLXFBConfig structure with the desired attributes for the
7 window.
8 </p></dd><dt><span class="term"><em class="parameter"><code>attrib_list</code></em></span></dt><dd><p>
9 Specifies a list of attribute value pairs, which must be terminated with
10 <code class="constant">None</code> or <code class="constant">NULL</code>. Accepted attributes are
11 <code class="constant">GLX_PBUFFER_WIDTH</code>, <code class="constant">GLX_PBUFFER_HEIGHT</code>,
12 <code class="constant">GLX_PRESERVED_CONTENTS</code>, and <code class="constant">GLX_LARGEST_PBUFFER</code>.
13 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
14 <code class="function">glXCreatePbuffer</code> creates an off-screen rendering area and returns its XID.
15 Any GLX rendering context that was created with respect to <em class="parameter"><code>config</code></em>
16 can be used to render into this window.
17 Use <a class="citerefentry" href="glXMakeContextCurrent.xml"><span class="citerefentry"><span class="refentrytitle">glXMakeContextCurrent</span></span></a> to associate the rendering area with a GLX
18 rendering context.
19 </p><p>
20 The accepted attributes for a GLXPbuffer are:
21 </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GLX_PBUFFER_WIDTH</code></span></dt><dd><p>
22 Specify the pixel width of the requested GLXPbuffer. The default value
23 is 0.
24 </p></dd><dt><span class="term"><code class="constant">GLX_PBUFFER_HEIGHT</code></span></dt><dd><p>
25 Specify the pixel height of the requested GLXPbuffer. The default value
26 is 0.
27 </p></dd><dt><span class="term"><code class="constant">GLX_LARGEST_PBUFFER</code></span></dt><dd><p>
28 Specify to obtain the largest available pixel buffer, if the requested
29 allocation would have failed. The width and height of the allocated
30 pixel buffer will never exceed the specified <code class="constant">GLX_PBUFFER_WIDTH</code> or
31 <code class="constant">GLX_PBUFFER_HEIGHT</code>, respectively. Use <a class="citerefentry" href="glXQueryDrawable.xml"><span class="citerefentry"><span class="refentrytitle">glXQueryDrawable</span></span></a> to
32 retrieve the dimensions of the allocated pixel buffer. The default value is
33 <code class="constant">False</code>.
34 </p></dd><dt><span class="term"><code class="constant">GLX_PRESERVED_CONTENTS</code></span></dt><dd><p>
35 Specify if the contents of the pixel buffer should be preserved when a
36 resource conflict occurs. If set to <code class="constant">False</code>, the contents of the
37 pixel buffer may be lost at any time. If set to <code class="constant">True</code>, or not
38 specified in <em class="parameter"><code>attrib_list</code></em>, then the contents of the pixel buffer will be preserved
39 (most likely by copying the contents into main system memory from the
40 frame buffer). In either case, the client can register (using
41 <a class="citerefentry" href="glXSelectEvent.xml"><span class="citerefentry"><span class="refentrytitle">glXSelectEvent</span></span></a>, to receive
42 pixel buffer clobber events that are generated when the pbuffer contents have
43 been preserved or damaged.
44 </p></dd></dl></div><p>
45 GLXPbuffers contain the color and ancillary buffers specified by
46 <em class="parameter"><code>config</code></em>. It is possible to create a pixel buffer with back buffers and
47 to swap those buffers using <a class="citerefentry" href="glXSwapBuffers.xml"><span class="citerefentry"><span class="refentrytitle">glXSwapBuffers</span></span></a>.
48 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
49 <code class="function">glXCreatePbuffer</code> is available only if the GLX version is 1.3 or greater.
50 </p><p>
51 If the GLX version is 1.1 or 1.0, the GL version must be 1.0.
52 If the GLX version is 1.2, then the GL version must be 1.1.
53 If the GLX version is 1.3, then the GL version must be 1.2.
54 </p><p>
55 GLXPbuffers are allocated from frame buffer resources; applications
56 should consider deallocating them when they are not in use.
57 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
58 <code class="constant">BadAlloc</code> is generated if there are insufficient resources to
59 allocate the requested GLXPbuffer.
60 </p><p>
61 <code class="constant">GLXBadFBConfig</code> is generated if <em class="parameter"><code>config</code></em> is not a valid
62 GLXFBConfig.
63 </p><p>
64 <code class="constant">BadMatch</code> is generated if <em class="parameter"><code>config</code></em> does not support rendering to
65 pixel buffers (e.g., <code class="constant">GLX_DRAWABLE_TYPE</code> does not contain
66 <code class="constant">GLX_PBUFFER_BIT</code>).
67 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
68 <a class="citerefentry" href="glXChooseFBConfig.xml"><span class="citerefentry"><span class="refentrytitle">glXChooseFBConfig</span></span></a>,
69 <code class="function">glXCreatePbuffer</code>,
70 <a class="citerefentry" href="glXMakeContextCurrent.xml"><span class="citerefentry"><span class="refentrytitle">glXMakeContextCurrent</span></span></a>,
71 <a class="citerefentry" href="glXSelectEvent.xml"><span class="citerefentry"><span class="refentrytitle">glXSelectEvent</span></span></a>
72 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
73 Copyright <span class="trademark"></span>© 1991-2006
74 Silicon Graphics, Inc. This document is licensed under the SGI
75 Free Software B License. For details, see
76 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
77 </p></div></div></body></html>