From d77543a3c9548d9777ee8f33bfcec1d85284755f Mon Sep 17 00:00:00 2001 From: Jakub Valtar Date: Wed, 7 Nov 2018 22:47:38 +0100 Subject: [PATCH] Recreate FBOs when offscreen PGraphicsOpenGL is resized Otherwise FBOs keep the old size and things understandably break. --- core/src/processing/opengl/PGraphicsOpenGL.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index 6b0f42c63..30afe6d13 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -6797,6 +6797,9 @@ public class PGraphicsOpenGL extends PGraphics { } else { // offscreen surfaces are transparent by default. background(0x00 << 24 | (backgroundColor & 0xFFFFFF)); + + // Recreate offscreen FBOs + restartPGL(); } // Sets the default projection and camera (initializes modelview).