Rose
Public Member Functions | List of all members
rose::sdl::Texture Class Reference

An encapsulation of the SDL_Texture structure. More...

#include <Texture.h>

Inheritance diagram for rose::sdl::Texture:
Inheritance graph
[legend]
Collaboration diagram for rose::sdl::Texture:
Collaboration graph
[legend]

Public Member Functions

 Texture (const Texture &)=delete
 
 Texture (Texture &&)=default
 
Textureoperator= (const Texture &)=delete
 
Textureoperator= (Texture &&texture)=default
 
 Texture (SDL_Texture *texture)
 
 Texture (Renderer &renderer, SDL_PixelFormatEnum format, SDL_TextureAccess access, int width, int height)
 Constructor More...
 
 Texture (Renderer &renderer, Size size)
 Constructor. More...
 
int setBlendMOde (SDL_BlendMode blendMode)
 
std::tuple< int, int > getSize () const noexcept
 

Detailed Description

An encapsulation of the SDL_Texture structure.

Constructor & Destructor Documentation

◆ Texture() [1/2]

rose::sdl::Texture::Texture ( Renderer renderer,
SDL_PixelFormatEnum  format,
SDL_TextureAccess  access,
int  width,
int  height 
)

Constructor

Parameters
rendererThe Renderer to use.
formatThe pixel format from SDL_PixelFormatEnum.
accessThe Texture access from SDL_TextureAccess.
widthThe width of the texture.
heightThe height of the texture.

◆ Texture() [2/2]

rose::sdl::Texture::Texture ( Renderer renderer,
Size  size 
)

Constructor.

Builds a Texture compatible with building up textures within Rose . The pixel format is SDL_PIXELFORMAT_RGBA8888, the texture access is SDL_TEXTUREACCESS_TARGET.

Parameters
rendererThe renderer to use.
sizeThe size of the texture.

The documentation for this class was generated from the following files: