aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-10-31 13:12:10 +0100
committerSven Gothel <[email protected]>2013-10-31 13:12:10 +0100
commitbde835213c584393d4be4ec7da62e7efd49430b7 (patch)
tree8c7226c2b56519b8f1064c22e7d9b071103e4887 /src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
parent93ec063abaf2d1ff7a4947a4f9732635e0a99316 (diff)
GLDrawableFactory: createDummy*(..) Pass GLCapabilitiesImmutable + GLCapabilitiesChooser instead of GLProfile, allowing using same or similar caps - important for sharing ctx
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLDrawableFactory.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLDrawableFactory.java19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 3e53a1819..2af4ba306 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -561,7 +561,7 @@ public abstract class GLDrawableFactory {
/**
* Creates a {@link GLDrawable#isRealized() realized} <i>dummy</i> {@link GLAutoDrawable}
* incl it's <i>dummy, invisible</i> {@link NativeSurface}
- * as created with {@link #createDummyDrawable(AbstractGraphicsDevice, boolean, GLProfile)}.
+ * as created with {@link #createDummyDrawable(AbstractGraphicsDevice, boolean, GLCapabilitiesImmutable, GLCapabilitiesChooser)}.
* <p>
* The <i>dummy</i> {@link GLAutoDrawable}'s {@link GLDrawable} is {@link GLDrawable#isRealized() realized}
* <i>without</i> an assigned {@link GLContext}, hence not initialized completely.<br>
@@ -574,12 +574,15 @@ public abstract class GLDrawableFactory {
*
* @param deviceReq which {@link AbstractGraphicsDevice#getConnection() connection} denotes the shared device to be used, may be <code>null</code> for the platform's default device.
* @param createNewDevice if <code>true</code> a new independent device instance is created from the <code>deviceReq</code>, otherwise <code>deviceReq</code> is used as-is and must be valid!
- * @param glp the desired {@link GLProfile}
+ * @param capsRequested the desired {@link GLCapabilitiesImmutable}, incl. it's {@link GLProfile}.
+ * For shared context, same {@link GLCapabilitiesImmutable#getVisualID(javax.media.nativewindow.VisualIDHolder.VIDType)}
+ * across shared drawables will yield best compatibility.
+ * @param chooser the custom chooser, may be null for default
* @return the created and realized <i>dummy</i> {@link GLAutoDrawable} instance
*
- * @see #createDummyDrawable(AbstractGraphicsDevice, boolean, GLProfile)
+ * @see #createDummyDrawable(AbstractGraphicsDevice, boolean, GLCapabilitiesImmutable, GLCapabilitiesChooser)
*/
- public abstract GLAutoDrawable createDummyAutoDrawable(AbstractGraphicsDevice deviceReq, boolean createNewDevice, GLProfile glp);
+ public abstract GLAutoDrawable createDummyAutoDrawable(AbstractGraphicsDevice deviceReq, boolean createNewDevice, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser);
/**
* Creates an {@link GLDrawable#isRealized() unrealized} offscreen {@link GLDrawable}
@@ -629,10 +632,14 @@ public abstract class GLDrawableFactory {
* </p>
* @param deviceReq which {@link AbstractGraphicsDevice#getConnection() connection} denotes the shared device to be used, may be <code>null</code> for the platform's default device.
* @param createNewDevice if <code>true</code> a new independent device instance is created from the <code>deviceReq</code>, otherwise <code>deviceReq</code> is used as-is and must be valid!
- * @param glp the desired {@link GLProfile}
+ * @param capsRequested the desired {@link GLCapabilitiesImmutable}, incl. it's {@link GLProfile}.
+ * For shared context, same {@link GLCapabilitiesImmutable#getVisualID(javax.media.nativewindow.VisualIDHolder.VIDType) visual ID}
+ * or {@link GLCapabilitiesImmutable caps}
+ * across shared drawables will yield best compatibility.
+ * @param chooser the custom chooser, may be null for default
* @return the created unrealized dummy {@link GLDrawable}
*/
- public abstract GLDrawable createDummyDrawable(AbstractGraphicsDevice deviceReq, boolean createNewDevice, GLProfile glp);
+ public abstract GLDrawable createDummyDrawable(AbstractGraphicsDevice deviceReq, boolean createNewDevice, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser);
/**
* Creates a proxy {@link NativeSurface} w/ defined surface handle,