1GLXCOPYCONTEXT(3G)               OpenGL Manual              GLXCOPYCONTEXT(3G)
2
3
4

NAME

6       glXCopyContext - copy state from one rendering context to another
7

C SPECIFICATION

9       void glXCopyContext(Display * dpy, GLXContext src, GLXContext dst,
10                           unsigned long mask);
11

PARAMETERS

13       dpy
14           Specifies the connection to the X server.
15
16       src
17           Specifies the source context.
18
19       dst
20           Specifies the destination context.
21
22       mask
23           Specifies which portions of src state are to be copied to dst.
24

DESCRIPTION

26       glXCopyContext copies selected groups of state variables from src to
27       dst.  mask indicates which groups of state variables are to be copied.
28       mask contains the bitwise OR of the same symbolic names that are passed
29       to the GL command glPushAttrib(). The single symbolic constant
30       GLX_ALL_ATTRIB_BITS can be used to copy the maximum possible portion of
31       rendering state.
32
33       The copy can be done only if the renderers named by src and dst share
34       an address space. Two rendering contexts share an address space if both
35       are nondirect using the same server, or if both are direct and owned by
36       a single process. Note that in the nondirect case it is not necessary
37       for the calling threads to share an address space, only for their
38       related rendering contexts to share an address space.
39
40       Not all values for GL state can be copied. For example, pixel pack and
41       unpack state, render mode state, and select and feedback state are not
42       copied. The state that can be copied is exactly the state that is
43       manipulated by the GL command glPushAttrib().
44
45       An implicit glFlush() is done by glXCopyContext if src is the current
46       context for the calling thread.
47

NOTES

49       A process is a single execution environment, implemented in a single
50       address space, consisting of one or more threads.
51
52       A thread is one of a set of subprocesses that share a single address
53       space, but maintain separate program counters, stack spaces, and other
54       related global data. A thread that is the only member of its subprocess
55       group is equivalent to a process.
56

ERRORS

58       BadMatch is generated if rendering contexts src and dst do not share an
59       address space or were not created with respect to the same screen.
60
61       BadAccess is generated if dst is current to any thread (including the
62       calling thread) at the time glXCopyContext is called.
63
64       GLXBadCurrentWindow is generated if src is the current context and the
65       current drawable is a window that is no longer valid.
66
67       GLXBadContext is generated if either src or dst is not a valid GLX
68       context.
69

SEE ALSO

71       glPushAttrib(), glXCreateContext(), glXIsDirect()
72
74       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
75       under the SGI Free Software B License. For details, see
76       http://oss.sgi.com/projects/FreeB/.
77

AUTHORS

79       opengl.org
80
81
82
83opengl.org                        07/13/2018                GLXCOPYCONTEXT(3G)
Impressum