summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLDrawableFactory.java19
-rw-r--r--src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java23
2 files changed, 34 insertions, 8 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,
diff --git a/src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java b/src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java
index 873e4cd9f..78dd693cb 100644
--- a/src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java
+++ b/src/jogl/classes/javax/media/opengl/GLSharedContextSetter.java
@@ -39,6 +39,10 @@ package javax.media.opengl;
* shared {@link GLContext} w/ this master are referred as slave {@link GLContext}
* and controls the shared object's lifecycle, i.e. their construction and destruction.
* </p>
+ * <p>
+ * Using the nearest or same {@link GLCapabilitiesImmutable#getVisualID(javax.media.nativewindow.VisualIDHolder.VIDType) visual ID}
+ * or {@link GLCapabilitiesImmutable caps} across the shared {@link GLDrawable}s will yield best compatibility.
+ * </p>
* <h5><a name="lifecycle">Lifecycle Considerations</a></h5>
* <p>
* After shared objects are created on the <i>master</i>, the OpenGL pipeline
@@ -56,7 +60,7 @@ package javax.media.opengl;
* <i>or</i> the <i>slaves</i> validate whether the resources are still valid.
* </p>
* <p>
- * To simplify above lifecycle issues, one may use a {@link GLDrawableFactory#createDummyDrawable(javax.media.nativewindow.AbstractGraphicsDevice, boolean, GLProfile) dummy}
+ * To simplify above lifecycle issues, one may use a {@link GLDrawableFactory#createDummyDrawable(javax.media.nativewindow.AbstractGraphicsDevice, boolean, GLCapabilitiesImmutable, GLCapabilitiesChooser) dummy}
* {@link GLDrawable} and it's {@link GLContext} as the <i>master</i> of all shared <i>slave</i> {@link GLContext}.
* Since this <i>dummy instance</i> does not depend on any native windowing system, it can be controlled easily w/o being <i>in sight</i>.<br>
* Below code creates a {@link GLAutoDrawable} based on a <i>dummy GLDrawable</i>:
@@ -66,7 +70,7 @@ package javax.media.opengl;
final GLProfile glp = caps.getGLProfile();
..
final boolean createNewDevice = true; // use 'own' display device!
- final GLAutoDrawable sharedDrawable = GLDrawableFactory.getFactory(glp).createDummyAutoDrawable(null, createNewDevice, glp);
+ final GLAutoDrawable sharedDrawable = GLDrawableFactory.getFactory(glp).createDummyAutoDrawable(null, createNewDevice, caps, null);
sharedDrawable.display(); // triggers GLContext object creation and native realization.
...
// Later a shared 'slave' can be created e.g.:
@@ -76,6 +80,21 @@ package javax.media.opengl;
glad.setVisible(true); // GLWindow creation ..
* </pre>
* </p>
+ * <h5><a name="driverissues">Known Driver Issues</a></h5>
+ * <h7><a name="intelmesa">Intel's Mesa >= 9.1.2 Backend for [Sandybridge/Ivybridge] on GNU/Linux</a></h7>
+ * <p>
+ * <pre>
+ * Error: 'intel_do_flush_locked: No such file or directory'
+ * JogAmp: <https://jogamp.org/bugzilla/show_bug.cgi?id=873>
+ * freedesktop.org: <https://bugs.freedesktop.org/show_bug.cgi?id=41736#c8>
+ * </pre>
+ * Shared context seems not to be supported w/ lock-free bound X11 display connections
+ * per OpenGL drawable/context. The error message above is thrown in this case.
+ * Hence the driver bug renders shared context use w/ JOGL impossible.
+ * </p>
+ * <h7><a name="hisilicon">Hisilicon's Immersion.16</a></h7>
+ * <p>
+ * </p>
*/
public interface GLSharedContextSetter extends GLAutoDrawable {
/**