summaryrefslogtreecommitdiffstats
path: root/src/net/java/games
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/games')
-rw-r--r--src/net/java/games/jogl/GLCapabilities.java8
-rw-r--r--src/net/java/games/jogl/GLJPanel.java6
2 files changed, 11 insertions, 3 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. */
diff --git a/src/net/java/games/jogl/GLJPanel.java b/src/net/java/games/jogl/GLJPanel.java
index 3ac5c984c..9ebec3079 100644
--- a/src/net/java/games/jogl/GLJPanel.java
+++ b/src/net/java/games/jogl/GLJPanel.java
@@ -86,7 +86,11 @@ public final class GLJPanel extends JPanel implements GLDrawable {
GLJPanel(GLCapabilities capabilities, GLCapabilitiesChooser chooser, GLDrawable shareWith) {
super();
- context = GLContextFactory.getFactory().createGLContext(null, capabilities, chooser,
+ // Works around problems on many vendors' cards; we don't need a
+ // back buffer for the offscreen surface anyway
+ GLCapabilities myCaps = (GLCapabilities) capabilities.clone();
+ myCaps.setDoubleBuffered(false);
+ context = GLContextFactory.getFactory().createGLContext(null, myCaps, chooser,
GLContextHelper.getContext(shareWith));
}