Copies state variables from one rendering context to another.
OpenGL C bindings library: libGL.a
void glXCopyContext(Display *dpy
GLXContext Source
GLXContext Destination
GLuint Mask)
The glXCopyContext subroutine copies selected groups of state variables from the specified Source to the specified Destination. The Mask parameter identifies the state variable groups to be copied. The Mask parameter contains the bitwise OR of the same symbolic names that are passed to the glPushAttrib subroutine. The GL_ALL_ATTRIB_BITS single symbolic constant can be used to copy the maximum possible portion of the rendering state.
This subroutine is successful only if the renderers named by the Source and Destination parameters share an address space.
If both rendering contexts are nondirect, it is not necessary for the calling threads to share an address space; however, their related rendering contexts must share an address space.
If Source is not the current context for the thread issuing the request, the state of the Source is undefined.
Not all values for OpenGL state can be copied. For example, pixel pack and unpack state, render mode state, and select and feedback state cannot be copied using this subroutine. The state that is manipulated by the glPushAttrib subroutine is the only one that can be copied.
Two rendering contexts share an address space if both are nondirect and use the same server, or if both are direct but owned by a single process.
A process is a single execution environment, implemented in a single address space, consisting of one or more threads.
A thread is one of a set of subprocesses that share a single address space, but maintain separate program counters, stack spaces, and other related global data. A thread is the only member of its subprocess group that is equivalent to a process.
The glPushAttrib or glPopAttrib subroutine, glXCreateContext subroutine, glXIsDirect subroutine.
OpenGL in the AIXwindows (GLX) Environment.