cleanup changes

This commit is contained in:
codeanticode
2015-09-07 23:37:37 -04:00
parent 78626a598b
commit cdffca3e5c
4 changed files with 109 additions and 50 deletions

View File

@@ -1,3 +1,29 @@
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
Processing OpenGL (c) 2011-2015 Andres Colubri
Part of the Processing project - http://processing.org
Copyright (c) 2001-04 Massachusetts Institute of Technology
Copyright (c) 2004-12 Ben Fry and Casey Reas
Copyright (c) 2012-15 The Processing Foundation
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
*/
package processing.opengl;
import java.awt.Component;
@@ -695,8 +721,10 @@ public class PSurfaceJOGL implements PSurface {
int pframeCount = sketch.frameCount;
sketch.handleDraw();
if (pframeCount == sketch.frameCount) {
pgl.beginDraw(false);
pgl.endDraw(false, sketch.sketchWindowColor());
// This hack allows the FBO layer to be swapped normally even if
// the sketch is no looping, otherwise background artifacts will occur.
pgl.beginRender(false);
pgl.endRender(false, sketch.sketchWindowColor());
}
if (sketch.frameCount == 1) {