diff options
author | Kenneth Russel <[email protected]> | 2005-01-31 09:37:22 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-01-31 09:37:22 +0000 |
commit | df6b1b78a80fbf95e6c6e8c946bc899b75312153 (patch) | |
tree | d529decce1655f2729bcbc53333bd97b041007a5 /src/net/java/games/jogl/GLCapabilities.java | |
parent | 58cb43c6e0140be2f89e99743fe28a021ada9074 (diff) |
Fixed Issue 41: WindowsOffscreenGLContext failed to create with "Unable to set pixel format"
This is probably due to JOGL trying to request a double-buffered pixel
format for the offscreen surface. To prevent applications from having
to explicitly set the DoubleBuffered property of the GLCapabilities to
false, the GLCanvas now clones the incoming GLCapabilities and
disables double-buffering before requesting the underlying GLContext.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@200 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/GLCapabilities.java')
-rw-r--r-- | src/net/java/games/jogl/GLCapabilities.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/java/games/jogl/GLCapabilities.java b/src/net/java/games/jogl/GLCapabilities.java index 5095c802a..794f152f6 100644 --- a/src/net/java/games/jogl/GLCapabilities.java +++ b/src/net/java/games/jogl/GLCapabilities.java @@ -75,8 +75,12 @@ public class GLCapabilities implements Cloneable { */ public GLCapabilities() {} - public Object clone() throws CloneNotSupportedException { - return super.clone(); + public Object clone() { + try { + return super.clone(); + } catch (CloneNotSupportedException e) { + throw new GLException(e); + } } /** Indicates whether double-buffering is enabled. */ |