DarkBASIC Professional Help File

DX11 SET CAMERA ENABLE DRAWABLES

Sets whether the specified camera will draw any 2D drawables.
A drawable is anything drawn using the DX11 DRAW XXX functions (lines, boxes, circles, text) as well as pasted images and sprites.
By default drawables will only be drawn to the main (screen) camera, but by using this function you can draw them to other cameras (and thus render targets) as well.
Take note that drawables are only drawn in the immediate next render pass and then cleared!
This means that you have to call all your desired DX11 DRAW XXX functions prior to rendering the specific camera that is supposed to draw them.
For example, if you call DX11 DRAW TEXT 0, 0, "Hello World!", this will draw "Hello World!" to the next camera being rendered following that
draw function call. If you render another camera after that, it will not be drawn to that one as well. This is important to keep in mind when using the
DX11 SYNC function with a sync mask of more than one camera, since it will render all cameras in order with no opportunity to draw drawables in-between.
If you want such behaviour you should therefore use the DX11 RENDER CAMERA function instead. Keep in mind that you can call DX11 SYNC with
a camera mask of zero, meaning that it will only update various engine per-frame data such as input and timers but not render any cameras.

Syntax

    DX11 SET CAMERA ENABLE DRAWABLES camera, enable

Parameters

    camera

> Dword
> The camera to set whether it should draw 2D drawables or not.

    enable

> Boolean
> Set to true to enable 2D drawable drawing for the specified camera, or false to disable it.

Returns

This function does not return a value.

See also

CAMERA Functions Menu
DX11 Function Categories