aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-12-03 21:47:49 +0100
committerSven Gothel <[email protected]>2010-12-03 21:47:49 +0100
commitde2a30104098216963132ed02b3dd66acd799d9e (patch)
tree408407cbb3a3c6b57544bfcc481f47581e410556 /src/jogl/classes/javax
parentfd0d3f15d41d32b3987f4b88862619ef1a31b999 (diff)
GLCanvas: Adding convenient constructor for GLCapabilties and Shared Context (with unit test)
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLCanvas.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index b230a2b6a..8b20b9ed1 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -135,11 +135,24 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable {
/** Creates a new GLCanvas component with the requested set of
OpenGL capabilities, using the default OpenGL capabilities
- selection mechanism, on the default screen device. */
+ selection mechanism, on the default screen device.
+ * @see GLCanvas#GLCanvas(javax.media.opengl.GLCapabilitiesImmutable, javax.media.opengl.GLCapabilitiesChooser, javax.media.opengl.GLContext, java.awt.GraphicsDevice)
+ */
public GLCanvas(GLCapabilitiesImmutable capsReqUser) {
this(capsReqUser, null, null, null);
}
+ /** Creates a new GLCanvas component with the requested set of
+ OpenGL capabilities, using the default OpenGL capabilities
+ selection mechanism, on the default screen device.
+ * This constructor variant also supports using a shared GLContext.
+ *
+ * @see GLCanvas#GLCanvas(javax.media.opengl.GLCapabilitiesImmutable, javax.media.opengl.GLCapabilitiesChooser, javax.media.opengl.GLContext, java.awt.GraphicsDevice)
+ */
+ public GLCanvas(GLCapabilitiesImmutable capsReqUser, GLContext shareWith) {
+ this(capsReqUser, null, shareWith, null);
+ }
+
/** Creates a new GLCanvas component. The passed GLCapabilities
specifies the OpenGL capabilities for the component; if null, a
default set of capabilities is used. The GLCapabilitiesChooser