bmap_to_format(BMAP* bmap,var format)
Converts a bmap to a given color format.
Parameters:
bmap - bitmap to be converted.
format - the target format (see
bmap_lock).
Returns:
0 if the conversion failed, bmap otherwise
Speed:
Slow
Edition:
C
P
Remarks:
- When a target format is not available on the 3D hardware (like 888),
the function converts the bmap to the next-best format (8888 in
that case).
Use bmap_lock to retrieve the final format.
- This function can also be used to convert a render target or compressed
image bmap to a standard format that can
be
accessed
through pixel functions.
- A7
Floating point textures can be used as render targets for special purposes
in shaders. For instance, the 14 format is normally used to render
the scene depth into a bitmap in order to create soft-edged shadows. Please
note that only newer 3D cards support floating point textures for render
targets
See also:
bmap_lock, view.bmap
► latest
version online