From e552d800ee9df3761108c044342612c8bda1f304 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Fri, 21 Jul 2006 22:34:00 +0000 Subject: Added support for sharing of textures, etc. between GLPbuffers and GLJPanels when the Java2D/JOGL bridge is active on Mac OS X. This required adding an alternate implementation for pbuffer drawables and contexts on OS X which uses CGL rather than the NextStep OpenGL APIs. Tested with advance Mustang bits on Mac OS X; Water and HWShadowmapsSimple demos (which use pbuffers) are now working within the JRefract harness when the Java2D/JOGL bridge is active. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@855 232f8b59-042b-4e1e-8c03-345bb8c30851 --- .../sun/opengl/impl/macosx/MacOSXOnscreenGLDrawable.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLDrawable.java') diff --git a/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLDrawable.java b/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLDrawable.java index c9e993237..2cb501020 100644 --- a/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLDrawable.java @@ -53,6 +53,7 @@ public class MacOSXOnscreenGLDrawable extends MacOSXGLDrawable { public static final int LOCK_SUCCESS = 3; protected Component component; + protected long nsView; // NSView private List/*>*/ createdContexts = new ArrayList(); @@ -126,6 +127,10 @@ public class MacOSXOnscreenGLDrawable extends MacOSXGLDrawable { } } + public long getView() { + return nsView; + } + public int lockSurface() throws GLException { if (!realized) { return LOCK_SURFACE_NOT_READY; @@ -205,4 +210,13 @@ public class MacOSXOnscreenGLDrawable extends MacOSXGLDrawable { macosxdsi = null; nsView = 0; } + + public void setOpenGLMode(int mode) { + if (mode != NSOPENGL_MODE) + throw new GLException("OpenGL mode switching not supported for on-screen GLDrawables"); + } + + public int getOpenGLMode() { + return NSOPENGL_MODE; + } } -- cgit v1.2.3