Show image in setup

Dear all,
I wrote a processing sketch that has a very long setup function. During setup I have to read many files and I have to initialize a large number of varabiles.
Unfortunately during setup the screen is complitely black and it is not so good.
Can I display an image in the setup function ?

Thank you very much for your help and cooperation

Unfortunately, the screen only started rendering after void draw starts.

Luckily, you can easily put your setup code in a function, and run it during the start of draw. Eg.

String scene = "setup";

void setup() {

void draw() {
  switch(scene) {
  case "setup":
    ...Display stuff here...
    scene = "loaded";
  case "loaded":
    ...Your code here...

void setupSketch() {
  ...Your setup code here...

1 Like

Thank you! :star_struck: