WriteImageDesc

sg_write_image_desc

Describes a write operation into a single mipmap from CPU memory into an image object. Parameter of the sg_write_image_*() functions.

.src Defines the location and layout of the source data in CPU memory. See documentation of the struct sg_write_image_source for details. .dst Defines the destination image object and the location of the destination region to write the data to. See documentation of the struct sg_image_location for details. .size Defines the size of the destination region. See the documentation of the struct sg_image_extent for details.

Note the following rules for zero-initialized default values:

.src.bytes_per_row Default-zero indicates that the source data is layed out as a tightly packed complete mip-map (e.g. when writing data into miplevel 0 of a 256x256 RGBA8 image, .src.bytes_per_row will be 1024. .src.bytes_per_slice Same as above, default-zero indicates that the source data is layed out as a tightly packed complete mip-map (e.g. when writing data into miplevel 0 of a 256x256 image, .src.bytes_per_slice will be 256*256*4). .size.width, .size.height, .size.num_slices Default-zero means 'the remaining width, height and num_slices' taking .dst.x/y/slice into account. E.g. when .dst.x/y/num_slices are all zero, .size.width/height/num_slices for instance for a 256x256 cubemap the default sizes are: .width=256, .height=256, .num_slices=6

Members

Variables

dst
ImageLocation dst;
Undocumented in source.
size
ImageExtent size;
Undocumented in source.
src
WriteImageSource src;
Undocumented in source.

Meta