diff options
author | Carsten Weisse <[email protected]> | 2006-11-29 12:56:20 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2006-11-29 12:56:20 +0000 |
commit | edafc0f4d2b10f629db546f12315dea9e17f05e8 (patch) | |
tree | 94c2321bdf0fe42e3fc5923f2847b74df37152d8 /src | |
parent | 00fdb498ccee151368fabdab30e291ea1e2d305d (diff) |
hope this solves the pixel flicker problem on some Win32 systems
Diffstat (limited to 'src')
-rw-r--r-- | src/jake2/render/opengl/Jsr231Driver.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/jake2/render/opengl/Jsr231Driver.java b/src/jake2/render/opengl/Jsr231Driver.java index 7a9021f..acb7a4b 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.6 2006-11-23 22:50:18 cawe Exp $ + * $Id: Jsr231Driver.java,v 1.7 2006-11-29 12:56:20 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -256,9 +256,9 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver { display.activate(); } - public void endFrame() { - glFlush(); - display.update(); + public void endFrame() { + glFlush(); + display.update(); } public void appActivate(boolean activate) { @@ -302,9 +302,19 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver { activate(); return context.getGL(); } + + /** <B>Overrides:</B> + <DL><DD><CODE>update</CODE> in class <CODE>java.awt.Component</CODE></DD></DL> */ + // Overridden from Canvas to prevent the AWT's clearing of the + // canvas from interfering with the OpenGL rendering. + public void update(Graphics g) { + // do nothing + //paint(g); + } public void addNotify() { super.addNotify(); + super.setBackground(Color.BLACK); drawable.setRealized(true); } |