diff options
author | Kenneth Russel <[email protected]> | 2007-01-07 18:15:52 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-01-07 18:15:52 +0000 |
commit | b7244795d44ab06ea32d68136cdb1408804514cc (patch) | |
tree | 69aec31745365cb17d5eaf07e79bf45ed5f5b147 /src/classes/javax/media/opengl/GLContext.java | |
parent | a38af8cf1605adaf23ab43fb93feaf7d8bbce98e (diff) |
Fixed Issue 259: need a copy context
Added and specified GLContext.copy() and supplied implementations on
Windows, X11 and Mac OS X platforms. New code is untested at this
time. May need to make subsequent changes on X11 and Mac platforms
where new code has not been compiled yet.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1075 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/javax/media/opengl/GLContext.java')
-rw-r--r-- | src/classes/javax/media/opengl/GLContext.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/classes/javax/media/opengl/GLContext.java b/src/classes/javax/media/opengl/GLContext.java index b6bc7c66d..a70e131c8 100644 --- a/src/classes/javax/media/opengl/GLContext.java +++ b/src/classes/javax/media/opengl/GLContext.java @@ -112,6 +112,36 @@ public abstract class GLContext { public abstract void release() throws GLException; /** + * Copies selected groups of OpenGL state variables from the + * supplied source context into this one. The <code>mask</code> + * parameter indicates which groups of state variables are to be + * copied. <code>mask</code> contains the bitwise OR of the same + * symbolic names that are passed to the GL command {@link + * GL#glPushAttrib glPushAttrib}. The single symbolic constant + * {@link GL#GL_ALL_ATTRIB_BITS GL_ALL_ATTRIB_BITS} can be used to + * copy the maximum possible portion of rendering state. <P> + * + * Not all values for GL state can be copied. For example, pixel + * pack and unpack state, render mode state, and select and feedback + * state are not copied. The state that can be copied is exactly the + * state that is manipulated by the GL command {@link + * GL#glPushAttrib glPushAttrib}. <P> + * + * On most platforms, this context may not be current to any thread, + * including the calling thread, when this method is called. Some + * platforms have additional requirements such as whether this + * context or the source context must occasionally be made current + * in order for the results of the copy to be seen; these + * requirements are beyond the scope of this specification. + * + * @param source the source OpenGL context from which to copy state + * @param mask a mask of symbolic names indicating which groups of state to copy + + * @throws GLException if an OpenGL-related error occurred + */ + public abstract void copy(GLContext source, int mask) throws GLException; + + /** * Returns the context which is current on the current thread. If no * context is current, returns null. * |