DarkBASIC Professional Help Wiki
Advertisement


This command will clear the viewport of the camera.

Syntax
CLEAR CAMERA VIEW Color Value
CLEAR CAMERA VIEW Camera Number, Color Value
Parameters
Camera Number

Integer
The camera number Color Value Dword
The colour value to use

Returns

This command does not return a value.

Description

The viewport is the actual area on screen where all 3D is drawn. The default viewport area is the entire screen. You can specify that only the camera viewport be cleared using this command. This area can be changed using the Set Camera View command. You must specify the colour value using an integer value.

Example Code
autocam on

make matrix 1,4000,4000,100,100

set matrix height 1,50,50,500

update matrix 1

while mouseclick()<>1

set cursor 0,0

print "USE ARROW KEYS TO ROTATE / A+Z Roll Camera"

if upkey()=1 then pitch camera up  0,1

if downkey()=1 then pitch camera down  0,1

if leftkey()=1 then turn camera left  0,1

if rightkey()=1 then turn camera right  0,1

if inkey$()="a" then roll camera left  0,1

if inkey$()="z" then roll camera right  0,1

if spacekey()=1 then clear camera view 0,rgb(255,0,0)

endwhile

while mouseclick()=1 : endwhile

delete matrix 1:autocam off

end
Advertisement