P2D/P3D causes image flickering and disappearing from draw() loop?!

void setup(){
  PImage flower = loadImage("bloom.jpg");
  size(897, 565, P2D); //Line in Question
  image(flower, 472+26,86, 189,189);
}

causes flickering but the second does not, however my main project uses createGraphics() which requires P2D or P3D

void setup(){
  PImage flower = loadImage("bloom.jpg");
  size(897, 565); //Fixed line version that doesnt work in main project I have
  image(flower, 472+26,86, 189,189);
}

ezgif-3-c7f02668a1

An even bigger problem is that if I add a draw loop to this the image just disappears

PImage flower;
void setup(){
  flower = loadImage("bloom.jpg");
  size(897, 565, P2D);
  image(flower, 472+26,86, 189,189);
}
void draw(){
  rect(10,10,10,10);
}

I don’t think it is recommended to do any drawing in setup(). It is meant to, you know set things up for action in draw() cycles. And size() function should be the very first thing in setup()

Hello,

This works fine on Windows 10.

Try updatding to the latest version Processing 4.0 beta 8.

Try adding frameRate(30) to setup().

Please report what happens after trying above.

Reference:

:)