aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2006-11-29 14:06:50 +0000
committerCarsten Weisse <[email protected]>2006-11-29 14:06:50 +0000
commit705a61be1c39933d98d216d6d654f6f91c58402b (patch)
treec09b26418fc11da13e1dda015a42b94d46873448 /src
parentdb02db30cd56d810d1646d4ad2ef4d667eef6652 (diff)
hope this solves the pixel flicker problem on some Win32 systems
Diffstat (limited to 'src')
-rw-r--r--src/jake2/render/opengl/Jsr231Driver.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/jake2/render/opengl/Jsr231Driver.java b/src/jake2/render/opengl/Jsr231Driver.java
index 45578b3..4e29f4b 100644
--- a/src/jake2/render/opengl/Jsr231Driver.java
+++ b/src/jake2/render/opengl/Jsr231Driver.java
@@ -2,7 +2,7 @@
* JoglCommon.java
* Copyright (C) 2004
*
- * $Id: Jsr231Driver.java,v 1.8 2006-11-29 13:17:48 cawe Exp $
+ * $Id: Jsr231Driver.java,v 1.9 2006-11-29 14:06:50 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -222,6 +222,7 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver {
// let the sound and input subsystems know about the new window
VID.NewWindow(newDim.width, newDim.height);
setGL(display.getGL());
+ init(0, 0);
return Base.rserr_ok;
}
@@ -246,10 +247,15 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver {
* @return true
*/
public boolean init(int xpos, int ypos) {
- // set window position
- window_xpos = xpos;
- window_ypos = ypos;
- return true;
+ // set window position
+ window_xpos = xpos;
+ window_ypos = ypos;
+ // clear the screen
+ beginFrame(0.0f);
+ glClearColor(0, 0, 0, 0);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ endFrame();
+ return true;
}
public void beginFrame(float camera_separation) {