aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java1
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java1
-rw-r--r--src/jogl/native/macosx/MacOSXWindowSystemInterface.m5
4 files changed, 8 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
index ed5b88455..14e67a2c1 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
@@ -75,6 +75,7 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
GLProfile glp = capsRequested.getGLProfile();
long cfg = EGLConfigId2EGLConfig(glp, dpy, cfgID);
EGLGLCapabilities caps = EGLConfig2Capabilities(glp, dpy, cfg, false, capsRequested.isOnscreen(), capsRequested.isPBuffer());
+ caps = (EGLGLCapabilities) GLGraphicsConfigurationUtil.fixOpaqueGLCapabilities(caps, capsRequested.isBackgroundOpaque()); // FIXME: valid to override EGL transparency ?
return new EGLGraphicsConfiguration(absScreen, caps, capsRequested, new DefaultGLCapabilitiesChooser());
}
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
index 150a5e105..6d6b79b42 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
@@ -143,6 +143,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
contextHandle = CGL.createContext(share,
drawable.getHandle(),
pixelFormat,
+ capabilities.isBackgroundOpaque(),
viewNotReady, 0);
if (contextHandle == 0) {
if (viewNotReady[0] == 1) {
@@ -161,6 +162,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
}
GLCapabilitiesImmutable caps = MacOSXCGLGraphicsConfiguration.NSPixelFormat2GLCapabilities(glProfile, pixelFormat);
+ caps = GLGraphicsConfigurationUtil.fixOpaqueGLCapabilities(caps, capabilities.isBackgroundOpaque());
config.setChosenCapabilities(caps);
} finally {
CGL.deletePixelFormat(pixelFormat);
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
index 178f2777c..a485f8ce8 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
@@ -42,7 +42,6 @@ import javax.media.nativewindow.GraphicsConfigurationFactory;
import javax.media.nativewindow.CapabilitiesImmutable;
import javax.media.nativewindow.NativeSurface;
import javax.media.nativewindow.NativeWindowFactory;
-import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLCapabilitiesImmutable;
import javax.media.opengl.GLCapabilitiesChooser;
import javax.media.opengl.GLContext;
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
index 9a7356b7c..5973ca45b 100644
--- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
+++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
@@ -470,6 +470,7 @@ void deletePixelFormat(void* pixelFormat) {
void* createContext(void* shareContext,
void* view,
void* pixelFormat,
+ Bool opaque,
int* viewNotReady)
{
getRendererInfo();
@@ -520,6 +521,10 @@ void* createContext(void* shareContext,
if (nsContext != nil) {
if (nsView != nil) {
+ if(!opaque) {
+ long zeroOpacity = 0;
+ [nsContext setValues:&zeroOpacity forParameter:NSOpenGLCPSurfaceOpacity];
+ }
[nsContext setView:nsView];
[nsView unlockFocus];
}