so i have been fooling around with rendertoimage and have sorta got 2 cameras simulated.
the only problem is the camera aspect ratios are terrible and need to be adjusted.
any ideas how this can be done without the introduction of new commands.
example code here:
SetVirtualResolution(1280,720)
deletelightdirectional(1)
createlightdirectional(1,0,-0.5,-1,255,255,255)
setcamerarange(1,1,6000)
setcamerafov(1,45)
createobjectbox(10,100,100,100)
setobjectlightmode(10,1)
setobjectcolor(10,255,0,0,255)
createobjectbox(11,30,30,30)
setobjectposition(11,0,0,200)
CreateRenderImage( 1, 1280, 360, 0, 0)
CreateRenderImage( 2, 1280, 360, 0, 0 )
createsprite(1,1)
createsprite(2,2)
setspriteposition(2,0,360)
setspriteposition(1,0,0)
//setspritescale(1,0.70,1)
//setspritescale(2,0.70,1)
setspritetransparency(1,0)
setspritetransparency(2,0)
//if the sprite transparency is 1 then you will see the last camera behind the 2 sprites.
dir=0
move=1
do
if dir=0 then move=move+5
if dir=1 then move=move-5
if move>200 then dir=1
if move<-200 then dir=0
//adjust 3d scene
setobjectrotation(10,0,getobjectangley(10)+1,getobjectanglez(10)+1)
setobjectrotation(11,0,getobjectangley(11)+2,getobjectanglez(11)+5)
update(0) //call sync manualy
//setup camera 1 view
setcameraposition(1,0,200,0)
setcamerarotation(1,0,getobjectangley(10),0)
movecameralocalz(1,-500)
setcameralookat(1,0,0,0,0)
// render to image 1
SetRenderToImage( 1, 1 ) //write directly to image 1
setclearcolor(0,200,0) //change background color of this camera
ClearScreen()
Render3d()
//setup for camera 2 view
setcameraposition(1,0,500+move,100)
setcameralookat(1,0,0,100,0)
SetRenderToImage( 2, 2 ) //write directly to image 2
setclearcolor(0,0,200) //change background of camera color
clearscreen()
Render3d()
// render both images
SetRenderToScreen()
render2dfront()
Print( ScreenFPS() )
//Sync()
Render()
Swap()
loop
this showcases 2 cameras but are stretched bad. anyideas what i could do to thin them out but keeping it widescreen?