From 64b3c9d95736c77bf63b76c70c2c848c466d9942 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 10 Aug 2013 08:41:08 +0200 Subject: GLDrawableFactory: Expose createDummyDrawable(..) / GLDrawableFactoryImpl: Make impl. methods final. createDummyDrawable(..) is useful for efficient shared context w/o actually rendering to this dummy drawable's framebuffer --- .../classes/javax/media/opengl/GLDrawableFactory.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/javax/media') diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java index 580d3a50b..c2e7e0829 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java @@ -545,6 +545,20 @@ public abstract class GLDrawableFactory { GLCapabilitiesChooser chooser, int width, int height) throws GLException; + /** + * Creates an {@link GLDrawable#isRealized() unrealized} dummy {@link GLDrawable}. + * A dummy drawable is not visible on screen and will not be used to render directly to, it maybe on- or offscreen. + *

+ * It is used to allow the creation of a {@link GLContext} to query information. + * It also allows creation of framebuffer objects which are used for rendering or creating a shared GLContext w/o actually rendering to this dummy drawable's framebuffer. + *

+ * @param deviceReq which {@link javax.media.nativewindow.AbstractGraphicsDevice#getConnection() connection} denotes the shared device to be used, may be null for the platform's default device. + * @param createNewDevice if true a new independent device instance is created from the deviceReq, otherwise deviceReq is used as-is and must be valid! + * @param glp the desired {@link GLProfile} + * @return the created dummy {@link GLDrawable} + */ + public abstract GLDrawable createDummyDrawable(AbstractGraphicsDevice deviceReq, boolean createNewDevice, GLProfile glp); + /** * Creates a proxy {@link NativeSurface} w/ defined surface handle, i.e. a {@link WrappedSurface} or {@link GDISurface} instance. *

@@ -573,7 +587,7 @@ public abstract class GLDrawableFactory { int screenIdx, long windowHandle, GLCapabilitiesImmutable caps, GLCapabilitiesChooser chooser, UpstreamSurfaceHook upstream); - + /** * Returns true if it is possible to create an framebuffer object (FBO). *

-- cgit v1.2.3