
Graphics3D 640,480,32,2
For i = 1 To 100
c = CreateCube()
PositionEntity c,Rnd(-100,100),Rnd(-100,100),Rnd(0,200)
EntityColor c,Rnd(0,255),Rnd(0,255),Rnd(0,255)
RotateEntity c,Rnd(0,360),Rnd(0,360),Rnd(0,360)
ScaleEntity c,Rnd(1,10),Rnd(1,10),Rnd(1,10)
Next
For i = 1 To 100
c = CreateSphere()
PositionEntity c,Rnd(-100,100),Rnd(-100,100),Rnd(0,200)
EntityColor c,Rnd(0,255),Rnd(0,255),Rnd(0,255)
RotateEntity c,Rnd(0,360),Rnd(0,360),Rnd(0,360)
ScaleEntity c,Rnd(1,10),Rnd(1,10),Rnd(1,10)
Next
cam = CreateCamera()
l = CreateLight()
tex = CreateTexture(1024,512,1+256+512)
TextureBlend tex,4
ScaleTexture tex, 1024.0/GraphicsWidth(),512.0/GraphicsHeight()
spr = CreateSprite(cam)
PositionEntity spr, 0,0,1.3333333333333333
ScaleSprite spr, GraphicsWidth()/Float(GraphicsHeight()),1
EntityTexture spr,tex
HideEntity spr
While Not KeyDown(1)
If KeyDown(203) Then TurnEntity cam,0,-1,0
If KeyDown(205) Then TurnEntity cam,0,1,0
If KeyDown(208) Then TurnEntity cam,-1,0,0
If KeyDown(200) Then TurnEntity cam,1,0,0
RenderWorld
If KeyDown(25)
paused = 1
; Viewport(0,0,256,256)
CopyRect(0,0,640,480,0,0,BackBuffer(),TextureBuffer(tex))
ShowEntity spr
; Viewport(0,0,640,480)
EndIf
While KeyDown(25) : Delay(1) : Wend
While paused
RenderWorld
Flip
If KeyDown(25)
HideEntity spr
paused = 0
While KeyDown(25) : Delay(1) : Wend
EndIf
Wend
Flip
Wend