Put a picture on the walls of a box

hello,
I would like to put a picture on the floor and walls of my box but I can’t do it with vertex.

pushMatrix();
translate(0, 0, total/2);
box(400, 200, total);

PImage img = loadImage(“lol.jpg”);
noStroke();
beginShape();
texture(img);
// “laDefense.jpg” is 100x100 pixels in size so
// the values 0 and 100 are used for the
// parameters “u” and “v” to map it directly
// to the vertex points
vertex(520, 260, 200, total);
vertex(520+total, 260,200, total);
vertex(520, 460, 200, total);
vertex(520+total, 460, 200, total);
endShape();
//image(image,0,0);
//rotateY(PI/2);
popMatrix();
pop();

Hello and welcome!

The (relatively) simple method is to construct the box yourself.
Take a look at the TextureCube example under Topics > Textures included with the Processing IDE.

From your code, you are creating 2D vertecies. While it is possible to paint an image over the area where the box is rendered, it is not simple.