lib.res.graphics
Typedef RowPtr
in tex_codec.h
allocate an array of row pointers that point into the given texture data.
for texture decoders that support output via row pointers (e.g. PNG),
this allows flipping the image vertically (useful when matching bottom-up
textures to a global orientation) directly, which is much more
efficient than transforming later via copying all pixels.
- Parameters:
data
- the texture data into which row pointers will point.
note: we don't allocate it here because this function is
needed for encoding, too (where data is already present).
h
- height [pixels] of texture.
pitch
- size [bytes] of one texture row, i.e. width*bytes_per_pixel.
src_flags
- TexFlags of source texture. used to extract its
orientation.
dst_orientation
- desired orientation of the output data.
can be one of TEX_BOTTOM_UP, TEX_TOP_DOWN, or 0 for the
"global orientation".
depending on src and dst, the row array is flipped if necessary.
rows
- (out) array of row pointers; caller must free() it when done.
- Returns:
- LibError
RowPtr
public typedef const u8* RowPtr;