diff options
author | Sven Gothel <[email protected]> | 2014-06-06 12:51:45 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-06-06 12:51:45 +0200 |
commit | ebe980ad6ac40148bc84913d1ba1f7adf6200490 (patch) | |
tree | 75227f5cbfd131ddb4dd2c9e0d3a8b4318a0cde9 /src/jogl/classes/javax/media/opengl | |
parent | 026cade97eab6fbd04e8bc902f24a2b61723acb8 (diff) |
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
Diffstat (limited to 'src/jogl/classes/javax/media/opengl')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLDrawable.java | 9 |
1 files changed, 7 insertions, 2 deletions
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} + * <p> + * Returns the underlying {@link NativeSurface} which {@link NativeSurface#getSurfaceHandle() native handle} * represents this OpenGL drawable's native resource. + * </p> * * @see #getHandle() */ + @Override public NativeSurface getNativeSurface(); /** |