sdlCreateTexture function
Create a texture for a rendering context.
You can set the texture scaling method by setting
SDL_HINT_RENDER_SCALE_QUALITY
before creating the texture.
\param renderer the rendering context \param format one of the enumerated values in SDL_PixelFormatEnum \param access one of the enumerated values in SDL_TextureAccess \param w the width of the texture in pixels \param h the height of the texture in pixels \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.
\since This function is available since SDL 2.0.0.
\sa SDL_CreateTextureFromSurface \sa SDL_DestroyTexture \sa SDL_QueryTexture \sa SDL_UpdateTexture
extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format, int access, int w, int h)
Implementation
Pointer<SdlTexture> sdlCreateTexture(
Pointer<SdlRenderer> renderer, int format, int access, int w, int h) {
final sdlCreateTextureLookupFunction = libSdl2.lookupFunction<
Pointer<SdlTexture> Function(Pointer<SdlRenderer> renderer, Uint32 format,
Int32 access, Int32 w, Int32 h),
Pointer<SdlTexture> Function(Pointer<SdlRenderer> renderer, int format,
int access, int w, int h)>('SDL_CreateTexture');
return sdlCreateTextureLookupFunction(renderer, format, access, w, h);
}