Like this ? ...
Graphics3D 640,480,16,1
plane = CreatePlane()
DebugLog "Created Plane: " + plane
tex = CreateTexture( 16,16 )
SetBuffer TextureBuffer( tex )
For y = 0 To 15
For x = 0 To 15
Color Rand(128)+127, Rand(128)+127, Rand(128)+127
Plot x, y
Next
Next
SetBuffer BackBuffer()
EntityTexture plane,tex
FreeTexture tex
cam = CreatePivot()
camera = CreateCamera(cam)
PositionEntity cam, 0,5,-10
PointEntity camera,plane
While Not exitGame = 1
TurnEntity cam , 0 , -MouseXSpeed() , 0
TurnEntity camera , MouseYSpeed(), 0, 0
MoveMouse 320,240
MoveEntity cam , KeyDown(205) - KeyDown( 203 ) , 0 , KeyDown(200) - KeyDown( 208 )
If KeyHit(1) Then exitGame = 1
RenderWorld
Flip
Wend
Stevie
|