hers the code
Rem Project: 3D Editor
Rem Created: Friday, August 06, 2010
Rem ***** Main Source File *****
rem new displaymode flags
vsync=1 : antialias=0 : multimon=0
rem stereoscopic mode
rem 1 - anaglyphmode (only outputs back, i.e texture 3 only)
rem 2 - polarization (double width) (outputs front/back, i.e. texture 3 and 4)
stereoscopicmode=1 : if stereoscopicmode>1 then multimon=1
rem setup double width backbuffer in window mode
desktopwidth=desktop width()
desktopheight=desktop height()
desktopdepth=32
if check display mode(desktopwidth,desktopheight,desktopdepth,vsync,antialias,multimon)=1
doublewidth=desktopwidth
if stereoscopicmode>1 then doublewidth=desktopwidth*2
set display mode desktopwidth,desktopheight,desktopdepth,vsync,antialias,multimon
set window layout 0,0,0 : set window size doublewidth,desktopheight
set camera view 0,0,0,doublewidth,desktopheight
endif
rem create left/right cameras
make camera 1 : set camera to image 1,1,desktopwidth,desktopheight : color backdrop 1,0 : set camera fov 1,50
make camera 2 : set camera to image 2,2,desktopwidth,desktopheight : color backdrop 2,0 : set camera fov 2,50
rem convert left/right views to back/front images
set cameras to stereoscopic stereoscopicmode,1,2,3,4
rem make back/front quads (sprites) for double wide backbuffer
set sprite 1,0,0
sprite 1,-20000,0,3
sprite 2,-20000,0,4
rem object to control camera (invisible eyes and focal points to set cameras by)
make object sphere 12,1 : make mesh from object 12,12
add limb 12,1,12 : offset limb 12,1,-12,0,0
add limb 12,2,12 : offset limb 12,2, 12,0,0
add limb 12,3,12 : offset limb 12,3,-12,0,50
add limb 12,4,12 : offset limb 12,4, 12,0,50
move object 12,50 : hide object 12
rem Cloned camera object for smoothing
clone object 13,12 : hide object 13
rem 3D viewing vars
eyeswide#=0.2 : focalpoint#=2000 : focaldepth#=20.0
load image "media\storagec.bmp",1
autocam off
position camera 0, 0,10,0
make object cube 1,25
rotate camera 0,90,0,0
position object 1,0,0,0
scale object 1,250,0,250
make light 1
position light 1,0,10,0
load object "media\storage_c.X", 2
storagec#=9000
scale object 2,5,5,5
load image "media\storage_c_D2.jpg",2
texture object 2,2
load image "media\concrete_T.bmp",3
texture object 1,3
zoom#=1
edit#=1
scale object texture 1,25,25
load object "media\arrow.X",99
position object 99,0,0,5
scale object 99,5,5,5
rotate object 99,0,90,0
do
rem control stereoscopics
if inkey$()="1" and eyeswide#>-10.0 then dec eyeswide#,0.01
if inkey$()="2" and eyeswide#<100.0 then inc eyeswide#,0.01
if inkey$()="3" and focalpoint#>50.0 then dec focalpoint#,1
if inkey$()="4" and focalpoint#<2000.0 then inc focalpoint#,1
if inkey$()="5" and focaldepth#>-100.0 then dec focaldepth#,0.1
if inkey$()="6" and focaldepth#<100.0 then inc focaldepth#,0.1
`
rem adjust camera object limbs (eyes and focal points
offset limb 12,1,eyeswide#*-1,0,0
offset limb 12,2,eyeswide#,0,0
offset limb 12,3,focaldepth#,0,focalpoint#
offset limb 12,4,focaldepth#*-1,0,focalpoint#
rem place left/right camera eyes using camera object limbs
cxl#=limb position x(12,1)
cyl#=limb position y(12,1)
czl#=limb position z(12,1)
cxr#=limb position x(12,2)
cyr#=limb position y(12,2)
czr#=limb position z(12,2)
cfxl#=limb position x(12,3)
cfyl#=limb position y(12,3)
cfzl#=limb position z(12,3)
cfxr#=limb position x(12,4)
cfyr#=limb position y(12,4)
cfzr#=limb position z(12,4)
position camera 1,cxl#,cyl#,czl#
position camera 2,cxr#,cyr#,czr#
point camera 1,cfxl#,cfyl#,cfzl#
point camera 2,cfxr#,cfyr#,cfzr#
`
rem 1. Render left/right cameras
sync mask %110 : fastsync
`
rem 2. Render main backbuffer
paste sprite 1,0,0
if stereoscopicmode>1 then paste sprite 2,desktopwidth,0
set cursor 0,0
print "STEREOSCOPICS IN DBPRO - ESCAPE TO QUIT"
print "[1][2] EYES APART = ";eyeswide#
print "[3][4] FOCAL DISTANCE = ";focalpoint#
print "[5][6] FOCAL DEPTH = ";focaldepth#
if edit#=1 then set current camera 0
camx# = camera position x(0)
camz# = camera position z(0)
camzoom# = camera position y(0)
camspeed# = camzoom#/180
remstart if KEYSTATE(2)=1
clone object storagec#,2
position object storagec# ,mousex ,0 ,mousez
storagec#=storagec - 1
endif
remend
paste image 1,5,5
if keystate(17)=1 and edit#=1 then camz#=camz# + camspeed#
if keystate(30)=1 and edit#=1 then camx#=camx# - camspeed#
if keystate(32)=1 and edit#=1 then camx#=camx# + camspeed#
if keystate(31)=1 and edit#=1 then camz#=camz# - camspeed#
if KEYSTATE(12)=1 and edit#=1 then camzoom#=camzoom# + .05
if KEYSTATE(13)=1 and edit#=1 and camzoom#=>1.1 then camzoom#=camzoom# - .05
position camera 0,camx#,camzoom#,camz#
sync
loop
worked fine until i added in stereoscopic features
goes to that(see pic), but it says its still running.
first person to figure out the problem will get the finished editor for free!