1GLXCOPYCONTEXT() GLXCOPYCONTEXT()
2
3
4
6 glXCopyContext - copy state from one rendering context to another
7
8
10 void glXCopyContext( Display *dpy,
11 GLXContext src,
12 GLXContext dst,
13 unsigned long mask )
14
15 delim $$
16
18 dpy Specifies the connection to the X server.
19
20 src Specifies the source context.
21
22 dst Specifies the destination context.
23
24 mask Specifies which portions of src state are to be copied to dst.
25
27 glXCopyContext copies selected groups of state variables from src to
28 dst. mask indicates which groups of state variables are to be copied.
29 mask contains the bitwise OR of the same symbolic names that are passed
30 to the GL command glPushAttrib. The single symbolic constant
31 GL_ALL_ATTRIB_BITS can be used to copy the maximum possible portion of
32 rendering state.
33
34 The copy can be done only if the renderers named by src and dst share
35 an address space. Two rendering contexts share an address space if
36 both are nondirect using the same server, or if both are direct and
37 owned by a single process. Note that in the nondirect case it is not
38 necessary for the calling threads to share an address space, only for
39 their related rendering contexts to share an address space.
40
41 Not all values for GL state can be copied. For example, pixel pack and
42 unpack state, render mode state, and select and feedback state are not
43 copied. The state that can be copied is exactly the state that is
44 manipulated by the GL command
45 glPushAttrib.
46
47 An implicit glFlush is done by glXCopyContext if src is the current
48 context for the calling thread.
49
51 A process is a single execution environment, implemented in a single
52 address space, consisting of one or more threads.
53
54 A thread is one of a set of subprocesses that share a single address
55 space, but maintain separate program counters, stack spaces, and other
56 related global data. A thread that is the only member of its subpro‐
57 cess group is equivalent to a process.
58
60 BadMatch is generated if rendering contexts src and dst do not share an
61 address space or were not created with respect to the same screen.
62
63 BadAccess is generated if dst is current to any thread (including the
64 calling thread) at the time glXCopyContext is called.
65
66 GLXBadCurrentWindow is generated if src is the current context and the
67 current drawable is a window that is no longer valid.
68
69 GLXBadContext is generated if either src or dst is not a valid GLX con‐
70 text.
71
73 glPushAttrib, glXCreateContext, glXIsDirect
74
75
76
77 GLXCOPYCONTEXT()