From 254052b54cebdb957d83e46e377534ef263d6029 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 28 Feb 2011 05:22:24 +0100 Subject: JOGL GLDrawableFactory: Expose experimental method createProxySurface(..) for new windowing system ad-hoc development. WARNING: This method may change ro be removed over time! --- .../classes/javax/media/opengl/GLDrawableFactory.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/jogl/classes/javax/media/opengl') diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java index 395ee3704..c433e8b68 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java @@ -52,6 +52,7 @@ import com.jogamp.common.util.ReflectionUtil; import javax.media.nativewindow.AbstractGraphicsDevice; import javax.media.nativewindow.NativeSurface; import javax.media.nativewindow.NativeWindowFactory; +import javax.media.nativewindow.ProxySurface; /**

Provides a virtual machine- and operating system-independent mechanism for creating {@link GLDrawable}s.

@@ -424,6 +425,23 @@ public abstract class GLDrawableFactory { GLCapabilitiesChooser chooser, int width, int height); + /** + * Highly experimental API entry, allowing developer of new windowing system bindings + * to leverage the native window handle to produce a NativeSurface implementation (ProxySurface), having the required GLCapabilities.
+ * Such surface can be used to instantiate a GLDrawable and hence test your new binding w/o the + * costs of providing a full set of abstraction like the AWT GLCanvas or even the native NEWT bindings. + * + * @param device the platform's target device, shall not be null + * @param windowHandle the native window handle + * @param caps the requested GLCapabilties + * @param chooser the custom chooser, may be null for default + * @return The proxy surface wrapping the windowHandle on the device + */ + public abstract ProxySurface createProxySurface(AbstractGraphicsDevice device, + long windowHandle, + GLCapabilitiesImmutable caps, + GLCapabilitiesChooser chooser); + /** * Returns true if it is possible to create a GLPbuffer. Some older * graphics cards do not have this capability. -- cgit v1.2.3