From bee7e4acd087a2de8369c47149c9b2c35e9f3a68 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Thu, 30 Jun 2005 19:30:24 +0000 Subject: Fixed Issue 168: Add support for transparency in GLJPanel Obey setOpaque() when selecting buffered image type. User must still request alpha bits in the GLCapabilities. Not supported on all back-end renderers; for example, Microsoft GDI renderer does not implement alpha bits when rendering to DIB sections. Added examples of use in JGears and JRefract demos. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@314 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/net/java/games/jogl/impl/windows/WindowsGLContext.java | 2 -- .../java/games/jogl/impl/windows/WindowsOffscreenGLContext.java | 8 -------- .../java/games/jogl/impl/windows/WindowsOnscreenGLContext.java | 4 ---- src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java | 4 ---- 4 files changed, 18 deletions(-) (limited to 'src/net/java/games/jogl/impl/windows') diff --git a/src/net/java/games/jogl/impl/windows/WindowsGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsGLContext.java index f597d56b7..e838c68aa 100644 --- a/src/net/java/games/jogl/impl/windows/WindowsGLContext.java +++ b/src/net/java/games/jogl/impl/windows/WindowsGLContext.java @@ -106,8 +106,6 @@ public abstract class WindowsGLContext extends GLContext { protected abstract boolean isOffscreen(); - public abstract int getOffscreenContextBufferedImageType(); - public int getOffscreenContextWidth() { throw new GLException("Should not call this"); } diff --git a/src/net/java/games/jogl/impl/windows/WindowsOffscreenGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsOffscreenGLContext.java index dbb6fc69c..c70607da7 100644 --- a/src/net/java/games/jogl/impl/windows/WindowsOffscreenGLContext.java +++ b/src/net/java/games/jogl/impl/windows/WindowsOffscreenGLContext.java @@ -65,14 +65,6 @@ public class WindowsOffscreenGLContext extends WindowsGLContext { return true; } - public int getOffscreenContextBufferedImageType() { - if (capabilities.getAlphaBits() > 0) { - return BufferedImage.TYPE_INT_ARGB; - } else { - return BufferedImage.TYPE_INT_RGB; - } - } - public int getOffscreenContextWidth() { return width; } diff --git a/src/net/java/games/jogl/impl/windows/WindowsOnscreenGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsOnscreenGLContext.java index d66412e74..0dc1818fb 100644 --- a/src/net/java/games/jogl/impl/windows/WindowsOnscreenGLContext.java +++ b/src/net/java/games/jogl/impl/windows/WindowsOnscreenGLContext.java @@ -89,10 +89,6 @@ public class WindowsOnscreenGLContext extends WindowsGLContext { return false; } - public int getOffscreenContextBufferedImageType() { - throw new GLException("Should not call this"); - } - public int getOffscreenContextReadBuffer() { throw new GLException("Should not call this"); } diff --git a/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java index 077a852c9..1d5d78296 100644 --- a/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java +++ b/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java @@ -455,10 +455,6 @@ public class WindowsPbufferGLContext extends WindowsGLContext { return false; } - public int getOffscreenContextBufferedImageType() { - throw new GLException("Should not call this"); - } - public int getOffscreenContextReadBuffer() { throw new GLException("Should not call this"); } -- cgit v1.2.3