From ebe980ad6ac40148bc84913d1ba1f7adf6200490 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 6 Jun 2014 12:51:45 +0200 Subject: Bug 741 HiDPI: Add new NativeSurfaceHolder interface to GLDrawable and NativeWindow; [AWT|SWT]NewtEventFactory use NativeSurfaceHolder as source, fixes pixel unit conversion - Add new NativeSurfaceHolder interface to GLDrawable and NativeWindow, allowing NativeSurface access (pixel unit conversion) A NativeSurfaceHolder is e.g.: - NativeWindow (is-a) - NEWT [GL]Window - GLDrawable (has-a) - [AWT|SWT]GLCanvas - [AWT|SWT]NewtEventFactory use NativeSurfaceHolder as source, fixes pixel unit conversion --- src/jogl/classes/javax/media/opengl/GLDrawable.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/GLDrawable.java') diff --git a/src/jogl/classes/javax/media/opengl/GLDrawable.java b/src/jogl/classes/javax/media/opengl/GLDrawable.java index e93d1c3ad..57883c8ac 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawable.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawable.java @@ -42,6 +42,7 @@ package javax.media.opengl; import javax.media.nativewindow.AbstractGraphicsConfiguration; import javax.media.nativewindow.NativeSurface; +import javax.media.nativewindow.NativeSurfaceHolder; /** An abstraction for an OpenGL rendering target. A GLDrawable's @@ -50,7 +51,7 @@ import javax.media.nativewindow.NativeSurface; create an OpenGL context, but all implementations of {@link GLAutoDrawable} do so upon creation. */ -public interface GLDrawable { +public interface GLDrawable extends NativeSurfaceHolder { /** * Creates a new context for drawing to this drawable that will * optionally share buffer objects, textures and other server-side OpenGL @@ -190,11 +191,15 @@ public interface GLDrawable { public GLProfile getGLProfile(); /** - * Returns the underlying native surface which surface handle + * {@inheritDoc} + *

+ * Returns the underlying {@link NativeSurface} which {@link NativeSurface#getSurfaceHandle() native handle} * represents this OpenGL drawable's native resource. + *

* * @see #getHandle() */ + @Override public NativeSurface getNativeSurface(); /** -- cgit v1.2.3