aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-jogl
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2014-02-15 14:48:24 +0100
committerJulien Gouesse <[email protected]>2014-02-15 14:48:24 +0100
commit82ccd850d23b6d615d2641671b11bc34e4d44217 (patch)
tree2819eab07ba0e28c4d7a50bc7a6a1d5826ca9280 /ardor3d-jogl
parentb08521c6f47e698d87b919c24d2c37b934970862 (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.java8
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) {