mirror of
https://github.com/processing/processing4.git
synced 2026-02-23 15:25:51 +01:00
don't draw the back texture onto the front texture when background is used
This commit is contained in:
@@ -859,10 +859,10 @@ public class PGL {
|
||||
|
||||
|
||||
protected void endOnscreenDraw(boolean clear0) {
|
||||
if (isFBOBacked() && capabilities.getNumSamples() == 0) {
|
||||
if (!clear0 && isFBOBacked() && capabilities.getNumSamples() == 0) {
|
||||
// Draw the back texture into the front texture, which will be used as
|
||||
// front texture in the next frame. Otherwise flickering will occur if
|
||||
// the sketch uses "incremental drawing" (no background()).
|
||||
// the sketch uses "incremental drawing" (background() not called).
|
||||
frontFBO.bind(gl);
|
||||
gl.glDisable(GL.GL_BLEND);
|
||||
drawTexture(GL.GL_TEXTURE_2D, backTex.getName(),
|
||||
|
||||
Reference in New Issue
Block a user