target_map
Render target for panels and texts. If this parameter is set to a bitmap, the
object renders into the bitmap instead of on the screen.
Type:
BMAP* (or file name in definition)
Remarks:
- In the text/panel definition, a previously defined BMAP, or the file
name
of
an
image
file
can
be given. A mere BMAP* pointer can not be used within a definition.
- The
panel or text position determines the render
position within the target_map.
-
The same bitmap can be render target of several texts or panels. The rendering order is determined by their layer parameters.
-
The original image content of the target_map is preserved as a background.
-
The render target can be used as texture in the level, or copied into another bitmap using bmap_blit. The engine renders only once per frame, so use wait(1) between setting the target_map and copying the content.
-
The text/panel render target must not be bigger than the resolution of the screen or of the camera render target.
Edition:
C LC
Example:
PANEL* compass_pan =
{
bmap = "compass.pcx"; // compass_map as panel background
flags = SHOW;
digits(2,2,3,*,1,aircraft.pan);
}
...
compass_pan.target_map = bmap_for_entity(cockpit_sprite,0);
...
See also:
PANEL, TEXT, BMAP, layer, pos, size,
bmap_rendertarget
► latest
version online