gfm



class  SDL2Texture;

SDL Texture wrapper.


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

Creates a SDL Texture for a specific renderer.

See Also
http://wiki.libsdl.org/SDL_CreateTexture
Throws
SDL2Exception on error.

this(SDL2Renderer renderer, SDL2Surface surface);

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

See Also
http://wiki.libsdl.org/SDL_CreateTextureFromSurface
Throws
SDL2Exception on error.

void  setBlendMode(SDL_BlendMode blendMode);

See Also
http://wiki.libsdl.org/SDL_SetTextureBlendMode
Throws
SDL2Exception on error.

void  setColorMod(int r, int g, int b);

See Also
http://wiki.libsdl.org/SDL_SetTextureColorMod
Throws
SDL2Exception on error.

void  setAlphaMod(int a);

See Also
http://wiki.libsdl.org/SDL_SetTextureAlphaMod
Throws
SDL2Exception on error.

uint  format();

Returns
Texture  format.
See Also
http://wiki.libsdl.org/SDL_QueryTexture
Throws
SDL2Exception on error.

int  access();

Returns
Texture  access.
See Also
http://wiki.libsdl.org/SDL_QueryTexture
Throws
SDL2Exception on error.

int  width();

Returns
Width of texture.
See Also
http://wiki.libsdl.org/SDL_QueryTexture
Throws
SDL2Exception on error.

int  height();

Returns
Height of texture.
See Also
http://wiki.libsdl.org/SDL_QueryTexture
Throws
SDL2Exception on error.

void  updateTexture(const(void)* pixels, int pitch);

Updates the whole texture with new pixel data.

See Also
http://wiki.libsdl.org/SDL_UpdateTexture
Throws
SDL2Exception on error.

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

Updates a part of a texture with new pixel data.

See Also
http://wiki.libsdl.org/SDL_UpdateTexture
Throws
SDL2Exception on error.

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

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

See Also
http://wiki.libsdl.org/SDL_UpdateYUVTexture
Throws
SDL2Exception on error.

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

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

See Also
http://wiki.libsdl.org/SDL_UpdateYUVTexture
Throws
SDL2Exception on error.

SDL_Texture*  handle();

Returns
SDL  handle.