DarkBASIC Professional Help File

DX11:CAMERA

Contains camera functionality.
One interesting thing that differs from the standard DBPro cameras is that you can set each camera to render to up to 8 different render targets in the same render pass.
You can also obtain the depth stencil buffer of a camera and use that as a texture for use in a shader.

    DX11 CREATE CAMERA : Return Dword = DX11 CREATE CAMERA([near], [far], [fov], [aspectRatio])

    DX11 CREATE ORTHO CAMERA : Return Dword = DX11 CREATE ORTHO CAMERA(left, right, top, bottom, near, far)

    DX11 GET MAIN CAMERA : Return Dword = DX11 GET MAIN CAMERA()

    DX11 DELETE CAMERA : DX11 DELETE CAMERA camera

    DX11 CAMERA EXISTS : Return Boolean = DX11 CAMERA EXISTS(camera)

    DX11 SET CAMERA FOV : DX11 SET CAMERA FOV camera, fov

    DX11 GET CAMERA FOV : Return Float = DX11 GET CAMERA FOV(camera)

    DX11 SET CAMERA ASPECT RATIO : DX11 SET CAMERA ASPECT RATIO camera, aspect

    DX11 GET CAMERA ASPECT RATIO : Return Float = DX11 GET CAMERA ASPECT RATIO(camera)

    DX11 SET CAMERA RANGE : DX11 SET CAMERA RANGE camera, near, far

    DX11 GET CAMERA NEAR RANGE : Return Float = DX11 GET CAMERA NEAR RANGE(camera)

    DX11 GET CAMERA FAR RANGE : Return Float = DX11 GET CAMERA FAR RANGE(camera)

    DX11 SET CAMERA ENABLE SPRITES : DX11 SET CAMERA ENABLE SPRITES camera, enable

    DX11 SET CAMERA ENABLE DRAWABLES : DX11 SET CAMERA ENABLE DRAWABLES camera, enable

    DX11 SET CAMERA ENABLE 3DLINES : DX11 SET CAMERA ENABLE 3DLINES camera, enable

    DX11 SET CAMERA RENDER TARGET : DX11 SET CAMERA RENDER TARGET camera, rtImage, [arrayIndex], [stage]

    DX11 SET NEW CAMERA RENDER TARGET : Return Dword rtimage  = DX11 SET NEW CAMERA RENDER TARGET(camera, width, height, [id], [format])

    DX11 GET CAMERA RENDER TARGET : Return Dword = DX11 GET CAMERA RENDER TARGET(camera, [id])

    DX11 RELEASE CAMERA RENDER TARGET : DX11 RELEASE CAMERA RENDER TARGET camera, [id]

    DX11 SET CAMERA DEPTH STENCIL BUFFER : DX11 SET CAMERA DEPTH STENCIL BUFFER camera, depthStencilBuf, [arrayIndex]

    DX11 GET CAMERA DEPTH STENCIL BUFFER : Return Dword = DX11 GET CAMERA DEPTH STENCIL BUFFER(camera)

    DX11 SET CAMERA BACKDROP : DX11 SET CAMERA BACKDROP camera, colour, [id]

    DX11 SET CAMERA RWIMAGE : DX11 SET CAMERA RWIMAGE camera, image, [stage]

    DX11 SET CAMERA RWBUFFER : DX11 SET CAMERA RWBUFFER camera, buffer, [stage]

    DX11 SET CAMERA APPEND CONSUME BUFFER : DX11 SET CAMERA APPEND CONSUME BUFFER camera, buffer, [stage]

    DX11 GET CAMERA ID : Return Dword = DX11 GET CAMERA ID(camera)

    DX11 RENDER CAMERA : DX11 RENDER CAMERA camera

    DX11 GET CAMERA BY ID : Return Dword = DX11 GET CAMERA BY ID(id)

    DX11 GET CAMERA POSITION X : Return Float = DX11 GET CAMERA POSITION X(camera)

    DX11 GET CAMERA POSITION Y : Return Float = DX11 GET CAMERA POSITION Y(camera)

    DX11 GET CAMERA POSITION Z : Return Float = DX11 GET CAMERA POSITION Z(camera)

    DX11 GET CAMERA ANGLE X : Return Float = DX11 GET CAMERA ANGLE X(camera)

    DX11 GET CAMERA ANGLE Y : Return Float = DX11 GET CAMERA ANGLE Y(camera)

    DX11 GET CAMERA ANGLE Z : Return Float = DX11 GET CAMERA ANGLE Z(camera)

    DX11 SET CAMERA POSITION : DX11 SET CAMERA POSITION camera, x, y, z

    DX11 APPLY CAMERA POSITION : DX11 APPLY CAMERA POSITION camera, x, y, z

    DX11 SET CAMERA ANGLE : DX11 SET CAMERA ANGLE camera, x, y, z

    DX11 APPLY CAMERA ANGLE : DX11 APPLY CAMERA ANGLE camera, x, y, z

    DX11 SET CAMERA LOOKAT : DX11 SET CAMERA LOOKAT camera, x, y, z

    DX11 MOVE CAMERA : DX11 MOVE CAMERA camera, distance

    DX11 MOVE CAMERA UP : DX11 MOVE CAMERA UP camera, distance

    DX11 MOVE CAMERA DOWN : DX11 MOVE CAMERA DOWN camera, distance

    DX11 MOVE CAMERA LEFT : DX11 MOVE CAMERA LEFT camera, distance

    DX11 MOVE CAMERA RIGHT : DX11 MOVE CAMERA RIGHT camera, distance

    DX11 TURN CAMERA LEFT : DX11 TURN CAMERA LEFT camera, angle

    DX11 TURN CAMERA RIGHT : DX11 TURN CAMERA RIGHT camera, angle

    DX11 PITCH CAMERA UP : DX11 PITCH CAMERA UP camera, angle

    DX11 PITCH CAMERA DOWN : DX11 PITCH CAMERA DOWN camera, angle

    DX11 ROLL CAMERA LEFT : DX11 ROLL CAMERA LEFT camera, angle

    DX11 ROLL CAMERA RIGHT : DX11 ROLL CAMERA RIGHT camera, angle

    DX11 SET CAMERA TO OBJECT ORIENTATION : DX11 SET CAMERA TO OBJECT ORIENTATION camera, object

    DX11 SET CAMERA TO LIMB ORIENTATION : DX11 SET CAMERA TO LIMB ORIENTATION camera, limb

    DX11 SET CAMERA TO CAMERA ORIENTATION : DX11 SET CAMERA TO CAMERA ORIENTATION target, source

    DX11 GET CAMERA FORWARD VECTOR : Return Dword = DX11 GET CAMERA FORWARD VECTOR(camera, [resultVector])

    DX11 GET CAMERA FORWARD VECTOR X : Return Float = DX11 GET CAMERA FORWARD VECTOR X(camera)

    DX11 GET CAMERA FORWARD VECTOR Y : Return Float = DX11 GET CAMERA FORWARD VECTOR Y(camera)

    DX11 GET CAMERA FORWARD VECTOR Z : Return Float = DX11 GET CAMERA FORWARD VECTOR Z(camera)

    DX11 GET CAMERA UP VECTOR : Return Dword = DX11 GET CAMERA UP VECTOR(camera, [resultVector])

    DX11 GET CAMERA RIGHT VECTOR : Return Dword = DX11 GET CAMERA RIGHT VECTOR(camera, [resultVector])

    DX11 FIX CAMERA PIVOT : DX11 FIX CAMERA PIVOT camera, [flags]

    DX11 GLUE CAMERA TO CAMERA : DX11 GLUE CAMERA TO CAMERA source, target

    DX11 GLUE CAMERA TO OBJECT : DX11 GLUE CAMERA TO OBJECT source, target

    DX11 GLUE CAMERA TO LIMB : DX11 GLUE CAMERA TO LIMB source, target

    DX11 UNGLUE CAMERA : DX11 UNGLUE CAMERA camera

    DX11 FRUSTUM CULL BB : Return Boolean = DX11 FRUSTUM CULL BB(camera, x1, y1, z1, x2, y2, z2)

    DX11 GET CAMERA VIEWPORT WIDTH : Return Float = DX11 GET CAMERA VIEWPORT WIDTH([camera])

    DX11 GET CAMERA VIEWPORT HEIGHT : Return Float = DX11 GET CAMERA VIEWPORT HEIGHT([camera])

    DX11 GET CAMERA VIEWPORT X : Return Float = DX11 GET CAMERA VIEWPORT X([camera])

    DX11 GET CAMERA VIEWPORT Y : Return Float = DX11 GET CAMERA VIEWPORT Y([camera])

    DX11 SET CAMERA VIEWPORT : DX11 SET CAMERA VIEWPORT camera, x, y, width, height

    DX11 SET VIEW MATRIX : DX11 SET VIEW MATRIX camera, matrix

    DX11 SET PROJECTION MATRIX : DX11 SET PROJECTION MATRIX camera, matrix

    DX11 GET VIEW MATRIX : Return Dword = DX11 GET VIEW MATRIX(camera, [matrixResult])

    DX11 GET PROJECTION MATRIX : Return Dword = DX11 GET PROJECTION MATRIX(camera, [matrixResult])