SDL2Texture

SDL Texture wrapper.

Constructors

this
this(SDL2Renderer renderer, uint format, uint access, int width, int height)

Creates a SDL Texture for a specific renderer.

this
this(SDL2Renderer renderer, SDL2Surface surface)

Creates a SDL Texture for a specific renderer, from an existing surface.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

access
int access()
close
void close()

Releases the SDL resource.

format
uint format()
height
int height()
setAlphaMod
void setAlphaMod(int a)
setBlendMode
void setBlendMode(SDL_BlendMode blendMode)
setColorMod
void setColorMod(int r, int g, int b)
updateTexture
void updateTexture(const(void)* pixels, int pitch)

Updates the whole texture with new pixel data.

updateTexture
void updateTexture(const(SDL_Rect)* rect, const(void)* pixels, int pitch)

Updates a part of a texture with new pixel data.

updateYUVTexture
void updateYUVTexture(const(ubyte)* Yplane, int Ypitch, const(ubyte)* Uplane, int Upitch, Uint8* Vplane, int Vpitch)

Update a planar YV12 or IYUV texture with new pixel data.

updateYUVTexture
void updateYUVTexture(const(SDL_Rect)* rect, const(ubyte)* Yplane, int Ypitch, const(ubyte)* Uplane, int Upitch, Uint8* Vplane, int Vpitch)

Update a part of a planar YV12 or IYUV texture with new pixel data.

width
int width()

Variables

_handle
SDL_Texture* _handle;
Undocumented in source.

Meta