SDL_CreateTexture3
Create a texture for a rendering context.
Usage
#include "SDL3/SDL.h"
SDL_Texture * SDL_CreateTexture(SDL_Renderer *renderer, SDL_PixelFormat format, SDL_TextureAccess access, int w, int h);
Header file
Defined in SDL3/SDL_render.h
Overview
The contents of a texture when first created are not defined.
Function parameters
renderer
|
the rendering context. |
|---|---|
format
|
one of the enumerated values in |
access
|
one of the enumerated values in |
w
|
the width of the texture in pixels. |
h
|
the height of the texture in pixels. |
Return value
( SDL_Texture
*) Returns the created texture or NULL on failure; call SDL_GetError () for more information.
Thread safety
This function should only be called on the main thread.