WriteImageSource

sg_write_image_source

Describes the data to be written from CPU memory into an image:

.data Pointer to and size (in bytes) of the data in CPU memory .offset Optional offset that's added to data.ptr .bytes_per_row Optional number of bytes between rows of image data, can be left zero-initialized when the image data is tighly packed (e.g. no gaps between rows). For uncompressed pixel formats, .bytes_per_row must be a multiple of the pixel size in bytes (e.g. for RGBA4 a multiple of 4), for compressed pixel formats, .bytes_per_row must be a multiple of the compression block size in bytes .bytes_per_slice Optional number of bytes of between the start of array/cubemap/volume slices, can be left zero-initialized when the image data is tightly packed (e.g. no gaps between slices). Must be a multiple of .bytes_per_row

NOTE: use the helper functions sg_query_row_pitch() and sg_query_surface_pitch() to compute values compatible with the .bytes_per_row and .bytes_per_slice restrictions.

Members

Variables

bytes_per_row
int bytes_per_row;
Undocumented in source.
bytes_per_slice
int bytes_per_slice;
Undocumented in source.
data
Range data;
Undocumented in source.
offset
size_t offset;
Undocumented in source.

Meta