aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2
diff options
context:
space:
mode:
authorHolger Zickner <[email protected]>2004-10-31 19:55:07 +0000
committerHolger Zickner <[email protected]>2004-10-31 19:55:07 +0000
commit24284e5926af9dd90414ac57fe7c764128ffe13c (patch)
treedbb0461b5c8ab3c80c3568be886b20247b19889e /src/jake2
parent3b7d1bc0b4c5c49401b517a266b1c6d48d476000 (diff)
manually swap buffer with jogl version 1.1
Diffstat (limited to 'src/jake2')
-rw-r--r--src/jake2/render/JoglBase.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/jake2/render/JoglBase.java b/src/jake2/render/JoglBase.java
index e4dcc1d..e489a74 100644
--- a/src/jake2/render/JoglBase.java
+++ b/src/jake2/render/JoglBase.java
@@ -2,7 +2,7 @@
* JoglCommon.java
* Copyright (C) 2004
*
- * $Id: JoglBase.java,v 1.10 2004-10-28 00:38:29 cawe Exp $
+ * $Id: JoglBase.java,v 1.11 2004-10-31 19:55:07 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -95,6 +95,8 @@ public abstract class JoglBase implements GLEventListener {
protected static final int rserr_invalid_mode = 2;
protected static final int rserr_unknown = 3;
+ private boolean swap = false;
+
public DisplayMode[] getModeList() {
DisplayMode[] modes = device.getDisplayModes();
LinkedList l = new LinkedList();
@@ -206,9 +208,12 @@ public abstract class JoglBase implements GLEventListener {
//canvas.setGL(new DebugGL(canvas.getGL()));
canvas.setNoAutoRedrawMode(true);
-// TODO this and a new JOGL-release solves the flickering bug (Loading)
-// change also GLimp_EndFrame()
-// canvas.setAutoSwapBufferMode(false);
+
+ if (net.java.games.jogl.Version.getVersion().startsWith("1.1")) {
+ swap=true;
+ canvas.setAutoSwapBufferMode(false);
+ }
+
canvas.addGLEventListener(this);
window.getContentPane().add(canvas);
@@ -307,9 +312,9 @@ public abstract class JoglBase implements GLEventListener {
protected void GLimp_EndFrame() {
gl.glFlush();
+
// swap buffer
-// TODO this and a new JOGL-release solves the flickering bug (Loading)
-// canvas.swapBuffers();
+ if (swap) canvas.swapBuffers();
}
protected void GLimp_BeginFrame(float camera_separation) {
// do nothing