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

Abstraction of SDL_Texture. More...

#include <Texture.h>

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

Public Member Functions

 Texture (const Texture &)=delete
 
 Texture (Texture &&)=default
 
Textureoperator= (const Texture &)=delete
 
Textureoperator= (Texture &&)=default
 
 Texture (Context &context, SDL_PixelFormatEnum format, SDL_TextureAccess access, int width, int height)
 Create a Texture More...
 
 Texture (Context &context, Size size)
 Create a Texture. More...
 
int setBlendMode (SDL_BlendMode blendMode)
 
Size getSize () const
 
int setAlphaMod (float alpha)
 

Detailed Description

Abstraction of SDL_Texture.

Constructor & Destructor Documentation

◆ Texture() [1/2]

rose::gm::Texture::Texture ( Context context,
SDL_PixelFormatEnum  format,
SDL_TextureAccess  access,
int  width,
int  height 
)

Create a Texture

Parameters
contextThe Context 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::gm::Texture::Texture ( Context context,
Size  size 
)

Create a Texture.

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
contextThe renderer to use.
sizeThe size of the texture.

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