table of contents
SDL_CreateGPUTexture(3) | SDL3 FUNCTIONS | SDL_CreateGPUTexture(3) |
NAME¶
SDL_CreateGPUTexture - Creates a texture object to be used in graphics or compute workflows.
HEADER FILE¶
Defined in SDL3/SDL_gpu.h
SYNOPSIS¶
#include "SDL3/SDL.h"
SDL_GPUTexture* SDL_CreateGPUTexture( SDL_GPUDevice *device, const SDL_GPUTextureCreateInfo *createinfo);
DESCRIPTION¶
The contents of this texture are undefined until data is written to the texture.
Note that certain combinations of usage flags are invalid. For example, a texture cannot have both the SAMPLER and GRAPHICS_STORAGE_READ flags.
If you request a sample count higher than the hardware supports, the implementation will automatically fall back to the highest available sample count.
FUNCTION PARAMETERS¶
- device
- a GPU Context.
- createinfo
- a struct describing the state of the texture to create.
RETURN VALUE¶
( SDL_GPUTexture
*) Returns a texture object on success, or NULL on failure; call
SDL_GetError () for more information.
AVAILABILITY¶
This function is available since SDL 3.1.3.
SEE ALSO¶
•(3), SDL_UploadToGPUTexture(3), •(3), SDL_DownloadFromGPUTexture(3), •(3), SDL_BindGPUVertexSamplers(3), •(3), SDL_BindGPUVertexStorageTextures(3), •(3), SDL_BindGPUFragmentSamplers(3), •(3), SDL_BindGPUFragmentStorageTextures(3), •(3), SDL_BindGPUComputeStorageTextures(3), •(3), SDL_BlitGPUTexture(3), •(3), SDL_ReleaseGPUTexture(3), •(3), SDL_GPUTextureSupportsFormat(3)
SDL 3.1.6 | Simple Directmedia Layer |