mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Revised clear-buffer logic
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user