Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1452 | chris | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" |
||
| 3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> |
||
| 4 | <refentry id="glXCopyContext"> |
||
| 5 | <refmeta> |
||
| 6 | <refmetainfo> |
||
| 7 | <copyright> |
||
| 8 | <year>1991-2006</year> |
||
| 9 | <holder>Silicon Graphics, Inc.</holder> |
||
| 10 | </copyright> |
||
| 11 | </refmetainfo> |
||
| 12 | <refentrytitle>glXCopyContext</refentrytitle> |
||
| 13 | <manvolnum>3G</manvolnum> |
||
| 14 | </refmeta> |
||
| 15 | <refnamediv> |
||
| 16 | <refname>glXCopyContext</refname> |
||
| 17 | <refpurpose>copy state from one rendering context to another</refpurpose> |
||
| 18 | </refnamediv> |
||
| 19 | <refsynopsisdiv><title>C Specification</title> |
||
| 20 | <funcsynopsis> |
||
| 21 | <funcprototype> |
||
| 22 | <funcdef>void <function>glXCopyContext</function></funcdef> |
||
| 23 | <paramdef>Display * <parameter>dpy</parameter></paramdef> |
||
| 24 | <paramdef>GLXContext <parameter>src</parameter></paramdef> |
||
| 25 | <paramdef>GLXContext <parameter>dst</parameter></paramdef> |
||
| 26 | <paramdef>unsigned long <parameter>mask</parameter></paramdef> |
||
| 27 | </funcprototype> |
||
| 28 | </funcsynopsis> |
||
| 29 | </refsynopsisdiv> |
||
| 30 | <!-- eqn: ignoring delim $$ --> |
||
| 31 | <refsect1 id="parameters"><title>Parameters</title> |
||
| 32 | <variablelist> |
||
| 33 | <varlistentry> |
||
| 34 | <term><parameter>dpy</parameter></term> |
||
| 35 | <listitem> |
||
| 36 | <para> |
||
| 37 | Specifies the connection to the X server. |
||
| 38 | </para> |
||
| 39 | </listitem> |
||
| 40 | </varlistentry> |
||
| 41 | <varlistentry> |
||
| 42 | <term><parameter>src</parameter></term> |
||
| 43 | <listitem> |
||
| 44 | <para> |
||
| 45 | Specifies the source context. |
||
| 46 | </para> |
||
| 47 | </listitem> |
||
| 48 | </varlistentry> |
||
| 49 | <varlistentry> |
||
| 50 | <term><parameter>dst</parameter></term> |
||
| 51 | <listitem> |
||
| 52 | <para> |
||
| 53 | Specifies the destination context. |
||
| 54 | </para> |
||
| 55 | </listitem> |
||
| 56 | </varlistentry> |
||
| 57 | <varlistentry> |
||
| 58 | <term><parameter>mask</parameter></term> |
||
| 59 | <listitem> |
||
| 60 | <para> |
||
| 61 | Specifies which portions of <parameter>src</parameter> state are to be copied to <parameter>dst</parameter>. |
||
| 62 | </para> |
||
| 63 | </listitem> |
||
| 64 | </varlistentry> |
||
| 65 | </variablelist> |
||
| 66 | </refsect1> |
||
| 67 | <refsect1 id="description"><title>Description</title> |
||
| 68 | <para> |
||
| 69 | <function>glXCopyContext</function> copies selected groups of state variables from <parameter>src</parameter> to <parameter>dst</parameter>. |
||
| 70 | <parameter>mask</parameter> indicates which groups of state variables are to be copied. |
||
| 71 | <parameter>mask</parameter> contains the bitwise OR of the same symbolic names that are |
||
| 72 | passed to the GL command <citerefentry><refentrytitle>glPushAttrib</refentrytitle></citerefentry>. |
||
| 73 | The single symbolic constant <constant>GLX_ALL_ATTRIB_BITS</constant> can be used to |
||
| 74 | copy the maximum possible portion of rendering state. |
||
| 75 | </para> |
||
| 76 | <para> |
||
| 77 | The copy can be done only if the renderers named by <parameter>src</parameter> and <parameter>dst</parameter> |
||
| 78 | share an address space. |
||
| 79 | Two rendering contexts share an address space if both are nondirect |
||
| 80 | using the same server, |
||
| 81 | or if both are direct and owned by a single process. |
||
| 82 | Note that in the nondirect case it is not necessary for the calling |
||
| 83 | threads to share an address space, |
||
| 84 | only for their related rendering contexts to share an address space. |
||
| 85 | </para> |
||
| 86 | <para> |
||
| 87 | Not all values for GL state can be copied. |
||
| 88 | For example, |
||
| 89 | pixel pack and unpack state, |
||
| 90 | render mode state, |
||
| 91 | and select and feedback state are not copied. |
||
| 92 | The state that can be copied is exactly the state that is manipulated |
||
| 93 | by the GL command |
||
| 94 | <citerefentry><refentrytitle>glPushAttrib</refentrytitle></citerefentry>. |
||
| 95 | </para> |
||
| 96 | <para> |
||
| 97 | An implicit <citerefentry><refentrytitle>glFlush</refentrytitle></citerefentry> is done by <function>glXCopyContext</function> if <parameter>src</parameter> is the current |
||
| 98 | context for the calling thread. |
||
| 99 | </para> |
||
| 100 | </refsect1> |
||
| 101 | <refsect1 id="notes"><title>Notes</title> |
||
| 102 | <para> |
||
| 103 | </para> |
||
| 104 | <para> |
||
| 105 | A <emphasis>process</emphasis> is a single execution environment, |
||
| 106 | implemented in a single address space, |
||
| 107 | consisting of one or more threads. |
||
| 108 | </para> |
||
| 109 | <para> |
||
| 110 | A <emphasis>thread</emphasis> is one of a set of subprocesses that share |
||
| 111 | a single address space, |
||
| 112 | but maintain separate program counters, |
||
| 113 | stack spaces, |
||
| 114 | and other related global data. |
||
| 115 | A <emphasis>thread</emphasis> that is the only member of its subprocess group |
||
| 116 | is equivalent to a <emphasis>process</emphasis>. |
||
| 117 | </para> |
||
| 118 | </refsect1> |
||
| 119 | <refsect1 id="errors"><title>Errors</title> |
||
| 120 | <para> |
||
| 121 | <constant>BadMatch</constant> is generated if rendering contexts <parameter>src</parameter> and <parameter>dst</parameter> |
||
| 122 | do not share an address space |
||
| 123 | or were not created with respect to the same screen. |
||
| 124 | </para> |
||
| 125 | <para> |
||
| 126 | <constant>BadAccess</constant> is generated if <parameter>dst</parameter> is current to any thread |
||
| 127 | (including the calling thread) at the time <function>glXCopyContext</function> is called. |
||
| 128 | </para> |
||
| 129 | <para> |
||
| 130 | <constant>GLXBadCurrentWindow</constant> is generated if <parameter>src</parameter> is the current |
||
| 131 | context and the current drawable is a window that is no longer valid. |
||
| 132 | </para> |
||
| 133 | <para> |
||
| 134 | <constant>GLXBadContext</constant> is generated if either <parameter>src</parameter> or <parameter>dst</parameter> is not |
||
| 135 | a valid GLX context. |
||
| 136 | </para> |
||
| 137 | </refsect1> |
||
| 138 | <refsect1 id="seealso"><title>See Also</title> |
||
| 139 | <para> |
||
| 140 | <citerefentry><refentrytitle>glPushAttrib</refentrytitle></citerefentry>, |
||
| 141 | <citerefentry><refentrytitle>glXCreateContext</refentrytitle></citerefentry>, |
||
| 142 | <citerefentry><refentrytitle>glXIsDirect</refentrytitle></citerefentry> |
||
| 143 | </para> |
||
| 144 | </refsect1> |
||
| 145 | <refsect1 id="Copyright"><title>Copyright</title> |
||
| 146 | <para> |
||
| 147 | Copyright <trademark class="copyright"></trademark> 1991-2006 |
||
| 148 | Silicon Graphics, Inc. This document is licensed under the SGI |
||
| 149 | Free Software B License. For details, see |
||
| 150 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. |
||
| 151 | </para> |
||
| 152 | </refsect1> |
||
| 153 | </refentry> |