table of contents
SDL_CreateTexture(3) | SDL3 FUNCTIONS | SDL_CreateTexture(3) |
NAME¶
SDL_CreateTexture - Create a texture for a rendering context.
HEADER FILE¶
Defined in SDL3/SDL_render.h
SYNOPSIS¶
#include "SDL3/SDL.h"
SDL_Texture * SDL_CreateTexture(SDL_Renderer *renderer, SDL_PixelFormat format, SDL_TextureAccess access, int w, int h);
DESCRIPTION¶
The contents of a texture when first created are not defined.
FUNCTION PARAMETERS¶
RETURN VALUE¶
( SDL_Texture
*) Returns a pointer to the created texture or NULL if no rendering context
was active, the format was unsupported, or the width or height were out of
range; call SDL_GetError () for more information.
THREAD SAFETY¶
You may only call this function from the main thread.
AVAILABILITY¶
This function is available since SDL 3.1.3.
SEE ALSO¶
•(3), SDL_CreateTextureFromSurface(3), •(3), SDL_CreateTextureWithProperties(3), •(3), SDL_DestroyTexture(3), •(3), SDL_GetTextureSize(3), •(3), SDL_UpdateTexture(3)
SDL 3.1.6 | Simple Directmedia Layer |