From: Carsten W. <ca...@us...> - 2006-11-29 12:56:24
|
Update of /cvsroot/jake2/jake2/src/jake2/render/opengl In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12777/src/jake2/render/opengl Modified Files: Jsr231Driver.java Log Message: hope this solves the pixel flicker problem on some Win32 systems Index: Jsr231Driver.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/opengl/Jsr231Driver.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Jsr231Driver.java 23 Nov 2006 22:50:18 -0000 1.6 --- Jsr231Driver.java 29 Nov 2006 12:56:20 -0000 1.7 *************** *** 257,263 **** } ! public void endFrame() { ! glFlush(); ! display.update(); } --- 257,263 ---- } ! public void endFrame() { ! glFlush(); ! display.update(); } *************** *** 303,309 **** --- 303,319 ---- 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); } |