From 2f986f2052144764d698da05a178d22c4754b563 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Tue, 6 Jan 2009 08:13:09 +0000 Subject: Added GLCapabilities.setBackgroundOpaque() and isBackgroundOpaque() for shaped window support on Mac OS X, and modified MacOSXCGLContext to pay attention to this bit. Changed Mac OS X port of Newt to make window non-opaque if borderless, and still allow it to receive the keyboard focus. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1841 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java') diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java index 13629945e..5c1a05e6b 100644 --- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java +++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java @@ -158,6 +158,11 @@ public abstract class MacOSXCGLContext extends GLContextImpl throw new GLException("Error creating NSOpenGLContext with requested pixel format"); } + if (!pbuffer && !capabilities.isBackgroundOpaque()) { + // Set the context opacity + CGL.setContextOpacity(nsContext, 0); + } + // On this platform the pixel format is associated with the // context and not the drawable. However it's a reasonable // approximation to just store the chosen pixel format up in the -- cgit v1.2.3