Displaying a Single Image Across Multiple Fullscreen Displays

Hi @MickaelLafontaine777,

Following up from your comment on GitHub and prior message, I took a look at your example.

The issue is that each fullscreen window currently draws the image independently, so every screen starts drawing from the same image origin within its own sketch window. As a result, the image gets duplicated instead of spanning across displays.

One way to approach this is to treat all displays as one continuous virtual desktop, compute the bounds of that virtual desktop, and then adjust the image rendering in each child window based on that window’s position within the virtual space.

So instead of drawing the image at the same position in every window:

image(img, width/2, 0);

each window offsets the image to account for its location:

image(img, -offsetX, -offsetY, drawW, drawH);

Where drawW and drawH are the image dimensions after scaling, and offsetX and offsetY represent the target monitor’s position within the virtual desktop.

I put together a full sketch demonstrating this approach here:

Disclosure: the sketch linked above was generated with help from GPT 5.5.

One additional thing that may help clarify the behavior here: Even though the windows visually sit next to each other on the desktop, each ChildApplet is effectively its own independent sketch with its own renderer, coordinate system, and drawing surface.

So drawing something wider than the window like you did in that sketch:

rect(0, 0, 1920, height);
image(img, width/2, 0);

doesn’t continue onto the neighboring display. Anything outside the bounds of that window is clipped.

If you want content to appear continuous across displays, each child window needs to intentionally render the portion of the scene that corresponds to its position in the larger virtual desktop, rather than relying on overlap between windows.