CreateCamera()

Blitz3D Forums/Blitz3D Programming/CreateCamera()

Neochrome(Posted 2005) [#1]
is there a limit on creating Cameras()


Beaker(Posted 2005) [#2]
I don't think so. But you might want to consider creating one and moving it (adjusting etc) each time you want a new one.


WendellM(Posted 2005) [#3]
Let's find out:
Graphics3D 800, 600

GridSize = 10
CameraLimit = GridSize * GridSize
Width = 800 / GridSize
Height = 600 / GridSize
Dim Cam( CameraLimit )
For X = 0 To GridSize - 1
	For Y = 0 To GridSize - 1
		C = C + 1
		Cam( C ) = CreateCamera()
		CameraViewport Cam( C ), Width * X, Height * Y, Width, Height
	Next
Next

Light = CreateLight()

Cube = CreateCube()
PositionEntity Cube, 0, 0, 4

Repeat
	TurnEntity Cube, 1, 1, 1
	UpdateWorld
	RenderWorld
	Flip
Until KeyHit( 1 )
With a GridSize of 10 producing 100 cameras, this runs fine. With a GridSize of 100 producing 10,000 cameras, it still runs (though quite slowly) and the cubes are understandably rather hard to see <g>.

How many cameras do you need?


BlitzSupport(Posted 2005) [#4]
Ha, very nice.


Neochrome(Posted 2005) [#5]
only 3, i realy never considered to have 500 cams!! i thought the cam was a hardware thing!

Thanks for the help guys
nice example WendelIM