![]() |
PROTO::KLUDGE
0.1
Quick prototyping library for games using SDL and OpenGL.
|
A class implemented using the Facade pattern used for loading SDL_Texture data. More...
#include <Texture.hpp>
Public Member Functions | |
Texture () | |
Default constructor. More... | |
virtual | ~Texture () |
bool | loadTexture (const char *path, SDL_Renderer *const renderTarget) |
bool | loadTexture (SDL_Texture *const texture) |
Load the texture from an existing SDL_Texture. More... | |
SDL_Texture * | getTexture () |
Get the SDL_Texture from the Texture. More... | |
int | getWidth () |
Get the width of the SDL_Texture. More... | |
int | getHeight () |
Get the height of the SDL_Texture. More... | |
Private Attributes | |
SDL_Texture * | m_texture |
Pointer to the SDL_Texture data. More... | |
int | m_width |
The width of the Texture in pixels. More... | |
int | m_height |
The height of the Texture in pixels. More... | |
A class implemented using the Facade pattern used for loading SDL_Texture data.
pk::Texture::Texture | ( | ) |
Default constructor.
|
virtual |
|
inline |
Get the height of the SDL_Texture.
|
inline |
Get the SDL_Texture from the Texture.
|
inline |
Get the width of the SDL_Texture.
bool pk::Texture::loadTexture | ( | const char * | path, |
SDL_Renderer *const | renderTarget | ||
) |
bool pk::Texture::loadTexture | ( | SDL_Texture *const | texture | ) |
Load the texture from an existing SDL_Texture.
SDL_Texture | * const texture - const pointer to an SDL_Texture. |
|
private |
The height of the Texture in pixels.
|
private |
Pointer to the SDL_Texture data.
|
private |
The width of the Texture in pixels.