include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man2 / xhtml / glXCopyContext.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>glXCopyContext</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glXCopyContext"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glXCopyContext — copy state from one rendering context to another</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">void <b class="fsfunc">glXCopyContext</b>(</code></td><td>Display *  </td><td><var class="pdparam">dpy</var>, </td></tr><tr><td> </td><td>GLXContext  </td><td><var class="pdparam">src</var>, </td></tr><tr><td> </td><td>GLXContext  </td><td><var class="pdparam">dst</var>, </td></tr><tr><td> </td><td>unsigned long  </td><td><var class="pdparam">mask</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>src</code></em></span></dt><dd><p>
6 Specifies the source context.
7 </p></dd><dt><span class="term"><em class="parameter"><code>dst</code></em></span></dt><dd><p>
8 Specifies the destination context.
9 </p></dd><dt><span class="term"><em class="parameter"><code>mask</code></em></span></dt><dd><p>
10 Specifies which portions of <em class="parameter"><code>src</code></em> state are to be copied to <em class="parameter"><code>dst</code></em>.
11 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
12 <code class="function">glXCopyContext</code> copies selected groups of state variables from <em class="parameter"><code>src</code></em> to <em class="parameter"><code>dst</code></em>.
13 <em class="parameter"><code>mask</code></em> indicates which groups of state variables are to be copied.
14 <em class="parameter"><code>mask</code></em> contains the bitwise OR of the same symbolic names that are
15 passed to the GL command <a class="citerefentry" href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a>.
16 The single symbolic constant <code class="constant">GLX_ALL_ATTRIB_BITS</code> can be used to
17 copy the maximum possible portion of rendering state.
18 </p><p>
19 The copy can be done only if the renderers named by <em class="parameter"><code>src</code></em> and <em class="parameter"><code>dst</code></em>
20 share an address space.
21 Two rendering contexts share an address space if both are nondirect
22 using the same server,
23 or if both are direct and owned by a single process.
24 Note that in the nondirect case it is not necessary for the calling
25 threads to share an address space,
26 only for their related rendering contexts to share an address space.
27 </p><p>
28 Not all values for GL state can be copied.
29 For example,
30 pixel pack and unpack state,
31 render mode state,
32 and select and feedback state are not copied.
33 The state that can be copied is exactly the state that is manipulated
34 by the GL command
35 <a class="citerefentry" href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a>.
36 </p><p>
37 An implicit <a class="citerefentry" href="glFlush.xml"><span class="citerefentry"><span class="refentrytitle">glFlush</span></span></a> is done by <code class="function">glXCopyContext</code> if <em class="parameter"><code>src</code></em> is the current
38 context for the calling thread.
39 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
40 </p><p>
41 A <span class="emphasis"><em>process</em></span> is a single execution environment,
42 implemented in a single address space,
43 consisting of one or more threads.
44 </p><p>
45 A <span class="emphasis"><em>thread</em></span> is one of a set of subprocesses that share
46 a single address space,
47 but maintain separate program counters,
48 stack spaces,
49 and other related global data.
50 A <span class="emphasis"><em>thread</em></span> that is the only member of its subprocess group
51 is equivalent to a <span class="emphasis"><em>process</em></span>.
52 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
53 <code class="constant">BadMatch</code> is generated if rendering contexts <em class="parameter"><code>src</code></em> and <em class="parameter"><code>dst</code></em>
54 do not share an address space
55 or were not created with respect to the same screen.
56 </p><p>
57 <code class="constant">BadAccess</code> is generated if <em class="parameter"><code>dst</code></em> is current to any thread
58 (including the calling thread) at the time <code class="function">glXCopyContext</code> is called.
59 </p><p>
60 <code class="constant">GLXBadCurrentWindow</code> is generated if <em class="parameter"><code>src</code></em> is the current
61 context and the current drawable is a window that is no longer valid.
62 </p><p>
63 <code class="constant">GLXBadContext</code> is generated if either <em class="parameter"><code>src</code></em> or <em class="parameter"><code>dst</code></em> is not
64 a valid GLX context.
65 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
66 <a class="citerefentry" href="glPushAttrib.xml"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a>,
67 <a class="citerefentry" href="glXCreateContext.xml"><span class="citerefentry"><span class="refentrytitle">glXCreateContext</span></span></a>,
68 <a class="citerefentry" href="glXIsDirect.xml"><span class="citerefentry"><span class="refentrytitle">glXIsDirect</span></span></a>
69 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
70 Copyright <span class="trademark"></span>© 1991-2006
71 Silicon Graphics, Inc. This document is licensed under the SGI
72 Free Software B License. For details, see
73 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
74 </p></div></div></body></html>