I am developing a project that will use two screens. I didn't find anything too useful on the forums about this (the thread I found while searching seemed to have ended in failure), so after making a dual screen program that works, I decided to share it. I hope someone will find this useful!
`set the display mode of one screen
set display mode 1280,1024,32,0,0,1
set window on
`remove the window border
set window layout 0,0,10
`stretch the window over both screens
set window size screen width()*2,screen height()
sync on
sync rate 0
`make and designate screen areas for the cameras
`use of camera 0 will result in distortions, so make a new camera for each screen
Left = 1
Right = 2
make camera Left
make camera Right
set camera view Left,0,0,screen width(),screen height()
set camera view Right,screen width()+1,0,screen width()*2,screen height()
`point right screen at a plane
position camera Right,-100,-100,-100
make object plane 1,10,10
color object 1,rgb(100,100,220)
position object 1,-100,-100,-105
point camera Right,-100,-100,-105
`make a field of objects
for P = 2 to 20
make object cube P,10
color object P,rgb(rnd(255),rnd(255),rnd(255))
position object P,-100+rnd(200),-100+rnd(200),50*P
next P
`point left screen down the field of cubes
point camera Left,0,0,1000
do
`wiggle camera 1
rotate camera Left,wrapvalue(camera angle x(Left)+mousemovey()*.04),wrapvalue(camera angle y(Left)+mousemovex()*.04),0
sync
loop
The screens in the example are of identical resolution. You can change the width you stretch the screen and set the camera views if you need varying screen widths, but I'm not sure what you can do about varying screen heights. The program window can extend beyond the screen border, so you can solve that problem by clever cropping of the content on the second screen.