sdlCopyGpuTextureToTexture function

void sdlCopyGpuTextureToTexture(
  1. Pointer<SdlGpuCopyPass> copyPass,
  2. Pointer<SdlGpuTextureLocation> source,
  3. Pointer<SdlGpuTextureLocation> destination,
  4. int w,
  5. int h,
  6. int d,
  7. bool cycle,
)

Performs a texture-to-texture copy.

This copy occurs on the GPU timeline. You may assume the copy has finished in subsequent commands.

\param copy_pass a copy pass handle. \param source a source texture region. \param destination a destination texture region. \param w the width of the region to copy. \param h the height of the region to copy. \param d the depth of the region to copy. \param cycle if true, cycles the destination texture if the destination texture is bound, otherwise overwrites the data.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC void SDLCALL SDL_CopyGPUTextureToTexture( SDL_GPUCopyPass *copy_pass, const SDL_GPUTextureLocation *source, const SDL_GPUTextureLocation *destination, Uint32 w, Uint32 h, Uint32 d, bool cycle)

Implementation

void sdlCopyGpuTextureToTexture(
    Pointer<SdlGpuCopyPass> copyPass,
    Pointer<SdlGpuTextureLocation> source,
    Pointer<SdlGpuTextureLocation> destination,
    int w,
    int h,
    int d,
    bool cycle) {
  final sdlCopyGpuTextureToTextureLookupFunction = libSdl3.lookupFunction<
      Void Function(
          Pointer<SdlGpuCopyPass> copyPass,
          Pointer<SdlGpuTextureLocation> source,
          Pointer<SdlGpuTextureLocation> destination,
          Uint32 w,
          Uint32 h,
          Uint32 d,
          Uint8 cycle),
      void Function(
          Pointer<SdlGpuCopyPass> copyPass,
          Pointer<SdlGpuTextureLocation> source,
          Pointer<SdlGpuTextureLocation> destination,
          int w,
          int h,
          int d,
          int cycle)>('SDL_CopyGPUTextureToTexture');
  return sdlCopyGpuTextureToTextureLookupFunction(
      copyPass, source, destination, w, h, d, cycle ? 1 : 0);
}