diff options
author | Sven Gothel <[email protected]> | 2011-11-09 00:31:34 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-11-09 00:31:34 +0100 |
commit | 7bc4c218b47033cb66f4eb5e707a86a0a4e60cff (patch) | |
tree | 1421a42878680a4a1e1772fa05114c50ac70edfb /src/jogl/classes/javax/media | |
parent | 1055ce051fd7bd3c88724888cf8f46c75535a249 (diff) |
NativeWindow: Add accessor interfaces NativeSurfaceHolder and NativeWindowHolder
- NativeSurfaceHolder interface allows access to it's implementation's NativeSurface reference.
- NativeWindowHolder interface allows access to it's implementation's NativeWindow reference.
Implement or extend interface w/ these accessors whereever it seems fit:
- NEWT Window
- GLDrawable
These accessors allow lower layers to retrieve the NativeSurface/Window instance
w/o knowledge of the 'upper' frameworks, ie. NativeWindow/JOGL or JOGL/NEWT.
Commited in followups (due to mixed semantical changes in those files):
- JAWTWindow
- NewtCanvasAWT
- Some NEWT impl.
Diffstat (limited to 'src/jogl/classes/javax/media')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLDrawable.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawable.java b/src/jogl/classes/javax/media/opengl/GLDrawable.java index f4cd77059..e2048b288 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 display lists and other server-side OpenGL @@ -158,8 +159,6 @@ public interface GLDrawable { */ public GLProfile getGLProfile(); - public NativeSurface getNativeSurface(); - /** * This is the GL/Windowing drawable handle.<br> * It is usually the {@link javax.media.nativewindow.NativeSurface#getSurfaceHandle()}, |