Recreate FBOs when offscreen PGraphicsOpenGL is resized

Otherwise FBOs keep the old size and things understandably break.
This commit is contained in:
Jakub Valtar
2018-11-07 22:47:38 +01:00
parent db5cff7128
commit d77543a3c9
@@ -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).