From de2a30104098216963132ed02b3dd66acd799d9e Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 3 Dec 2010 21:47:49 +0100 Subject: GLCanvas: Adding convenient constructor for GLCapabilties and Shared Context (with unit test) --- src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/javax') 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 -- cgit v1.2.3