Revised clear-buffer logic

This commit is contained in:
codeanticode
2012-03-22 17:56:22 +00:00
parent f1338a4472
commit e0c085413d
3 changed files with 26 additions and 25 deletions
@@ -1754,6 +1754,8 @@ public class PGraphicsOpenGL extends PGraphics {
manipulatingCamera = false;
clearColorBuffer = false;
if (fbStack == null) {
fbStack = new Stack<PFramebuffer>();
@@ -4358,7 +4360,9 @@ public class PGraphicsOpenGL extends PGraphics {
protected void backgroundImpl(PImage image) {
backgroundImpl();
set(0, 0, image);
clearColorBuffer = true;
if (0 < parent.frameCount) {
clearColorBuffer = true;
}
}
@@ -4377,7 +4381,9 @@ public class PGraphicsOpenGL extends PGraphics {
pgl.glClearColor(backgroundR, backgroundG, backgroundB, 1);
pgl.glClear(PGL.GL_COLOR_BUFFER_BIT);
clearColorBuffer = true;
if (0 < parent.frameCount) {
clearColorBuffer = true;
}
}