sdlxDownloadToGpuTexture function gpu

void sdlxDownloadToGpuTexture(
  1. Pointer<SdlGpuCopyPass> copyPass,
  2. SdlxGpuTextureRegion source,
  3. SdlxGpuTextureTransferInfo destination,
  4. bool cycle,
)

Copies data from a texture to a transfer buffer on the GPU timeline.

This data is not guaranteed to be copied until the command buffer fence is signaled.

\param copy_pass a copy pass handle. \param source the source texture region. \param destination the destination transfer buffer with image layout information.

\since This function is available since SDL 3.2.0.

extern SDL_DECLSPEC void SDLCALL SDL_DownloadFromGPUTexture( SDL_GPUCopyPass *copy_pass, const SDL_GPUTextureRegion *source, const SDL_GPUTextureTransferInfo *destination)

Implementation

//void sdlDownloadFromGpuTexture(Pointer<SdlGpuCopyPass> copyPass, Pointer<SdlGpuTextureRegion> source, Pointer<SdlGpuTextureTransferInfo> destination) {
void sdlxDownloadToGpuTexture(
  Pointer<SdlGpuCopyPass> copyPass,
  SdlxGpuTextureRegion source,
  SdlxGpuTextureTransferInfo destination,
  bool cycle,
) {
  final sourcePointer = source.calloc();
  final destinationPointer = destination.calloc();
  sdlDownloadFromGpuTexture(copyPass, sourcePointer, destinationPointer);
  sourcePointer.callocFree();
  destinationPointer.callocFree();
}