splitting screen across multiple displays
in
Programming Questions
•
11 months ago
i have a large application that i'd like to display across 3 displays. each display is 900x1600, for a total sketch size of 2700x1600.
i'm having trouble with the hardware routes i've tried, so i'm falling back to a software route, but my framerate is suffering. my strategy currently is to draw into a PGraphics buffer, then PImage.copy three rectangles from the buffer into areas that correspond to the three-monitor layout within a PImage. and then draw that PImage to the screen.
like so:
- PGraphics fbo;
- PImage tex;
- // setup etc...
- fbo = createGraphics(w, h);
- tex = createImage(width, height, RGB);
- // draw into fbo...
- tex.copy(fbo, 0, 0, 900, 1600, 0, 0, 900, 1600);
- tex.copy(fbo, 900, 0, 900, 1600, 0, 1600, 900, 1600);
- tex.copy(fbo, 1800, 0, 900, 1600, 0, 3200, 900, 1600);
- p.image(tex, 0, 0);
the specific numbers here are probably irrelevant, they're artifacts of the way i have my three screens setup (for reasons i won't go into now, i'm working with a screen setup that wants a 900x4800 (3x 900x1600) application). the tex.copy() lines are the real fps killers; if i just draw fbo straight to the screen, my framerate jumps from the ~6-7fps i'm getting now up to ~24fps.
i'm mostly interested in hearing if there are better / more performant ways to split a large buffer into three smaller sections. i'm also interested in hearing if anyone else has gone across three displays and if so, how. i can fill in more details on hardware if the thread moves in that direction.
1