#[repr(C)]pub struct SDL_GPUTextureTransferInfo {
pub transfer_buffer: *mut SDL_GPUTransferBuffer,
pub offset: Uint32,
pub pixels_per_row: Uint32,
pub rows_per_layer: Uint32,
}Expand description
A structure specifying parameters related to transferring data to or from a texture.
If either of pixels_per_row or rows_per_layer is zero, then width and
height of passed SDL_GPUTextureRegion to SDL_UploadToGPUTexture or
SDL_DownloadFromGPUTexture are used as default values respectively and data
is considered to be tightly packed.
WARNING: Direct3D 12 requires texture data row pitch to be 256 byte aligned, and offsets to be aligned to 512 bytes. If they are not, SDL will make a temporary copy of the data that is properly aligned, but this adds overhead to the transfer process. Apps can avoid this by aligning their data appropriately, or using a different GPU backend than Direct3D 12.
§Availability
This struct is available since SDL 3.2.0.
§See also
Fields§
§transfer_buffer: *mut SDL_GPUTransferBufferThe transfer buffer used in the transfer operation.
offset: Uint32The starting byte of the image data in the transfer buffer.
pixels_per_row: Uint32The number of pixels from one row to the next.
rows_per_layer: Uint32The number of rows from one layer/depth-slice to the next.
Trait Implementations§
Source§impl Clone for SDL_GPUTextureTransferInfo
impl Clone for SDL_GPUTextureTransferInfo
Source§fn clone(&self) -> SDL_GPUTextureTransferInfo
fn clone(&self) -> SDL_GPUTextureTransferInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more