aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-jogl
diff options
context:
space:
mode:
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) {