glFlush() before endOnscreenDraw() call

This commit is contained in:
codeanticode
2012-02-14 19:06:14 +00:00
parent 50061e5c0d
commit 7d8ecca2d6
2 changed files with 2 additions and 10 deletions
@@ -1502,12 +1502,8 @@ public class PGraphicsOpenGL extends PGraphics {
pgl.glViewport(savedViewport[0], savedViewport[1], savedViewport[2], savedViewport[3]);
if (primarySurface) {
// glFlush should be called only once, since it is an expensive
// operation. Thus, only the main renderer (the primary surface)
// should call it at the end of draw, and none of the offscreen
// renderers...
pgl.glFlush();
pgl.endOnscreenDraw(clearColorBuffer0);
pgl.glFlush();
pgl.releaseContext();
} else {
if (offscreenMultisample) {