diff options
author | Julien Gouesse <[email protected]> | 2014-02-15 14:48:24 +0100 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2014-02-15 14:48:24 +0100 |
commit | 82ccd850d23b6d615d2641671b11bc34e4d44217 (patch) | |
tree | 2819eab07ba0e28c4d7a50bc7a6a1d5826ca9280 /ardor3d-jogl | |
parent | b08521c6f47e698d87b919c24d2c37b934970862 (diff) |
glFlush() shouldn't be called just before swapBuffers() in the JOGL renderer
Diffstat (limited to 'ardor3d-jogl')
-rw-r--r-- | ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglRenderer.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglRenderer.java b/ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglRenderer.java index 1e15e65..e11ce4e 100644 --- a/ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglRenderer.java +++ b/ardor3d-jogl/src/main/java/com/ardor3d/renderer/jogl/JoglRenderer.java @@ -223,11 +223,8 @@ public class JoglRenderer extends AbstractRenderer { @Override public void flushFrame(final boolean doSwap) { - final GL gl = GLContext.getCurrentGL(); - renderBuckets(); - gl.glFlush(); if (doSwap) { doApplyState(defaultStateList.get(RenderState.StateType.ColorMask)); @@ -241,6 +238,11 @@ public class JoglRenderer extends AbstractRenderer { if (Constants.stats) { StatCollector.endStat(StatType.STAT_DISPLAYSWAP_TIMER); } + } else { + // this call is not necessary just before swapBuffers(), see: + // http://www.opengl.org/wiki/Common_Mistakes#glFinish_and_glFlush + final GL gl = GLContext.getCurrentGL(); + gl.glFlush(); } if (Constants.stats) { |