sdlUploadToGpuTexture function
void
sdlUploadToGpuTexture(
- Pointer<
SdlGpuCopyPass> copyPass, - Pointer<
SdlGpuTextureTransferInfo> source, - Pointer<
SdlGpuTextureRegion> destination, - bool cycle,
Uploads data from a transfer buffer to a texture.
The upload occurs on the GPU timeline. You may assume that the upload has finished in subsequent commands.
You must align the data in the transfer buffer to a multiple of the texel size of the texture format.
\param copy_pass a copy pass handle. \param source the source transfer buffer with image layout information. \param destination the destination texture region. \param cycle if true, cycles the texture if the texture is bound, otherwise overwrites the data.
\since This function is available since SDL 3.1.3.
extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUTexture( SDL_GPUCopyPass *copy_pass, const SDL_GPUTextureTransferInfo *source, const SDL_GPUTextureRegion *destination, bool cycle)
Implementation
void sdlUploadToGpuTexture(
Pointer<SdlGpuCopyPass> copyPass,
Pointer<SdlGpuTextureTransferInfo> source,
Pointer<SdlGpuTextureRegion> destination,
bool cycle) {
final sdlUploadToGpuTextureLookupFunction = libSdl3.lookupFunction<
Void Function(
Pointer<SdlGpuCopyPass> copyPass,
Pointer<SdlGpuTextureTransferInfo> source,
Pointer<SdlGpuTextureRegion> destination,
Uint8 cycle),
void Function(
Pointer<SdlGpuCopyPass> copyPass,
Pointer<SdlGpuTextureTransferInfo> source,
Pointer<SdlGpuTextureRegion> destination,
int cycle)>('SDL_UploadToGPUTexture');
return sdlUploadToGpuTextureLookupFunction(
copyPass, source, destination, cycle ? 1 : 0);
}