A class representing a texture in the GPU.
More...
#include <Texture.hpp>
A class representing a texture in the GPU.
| lm::Texture::~Texture |
( |
| ) |
|
| const Rect2f& lm::Texture::atlas |
( |
std::size_t |
i | ) |
const |
Get a rect from the atlas
- Parameters
-
- Returns
- The rect
| void lm::Texture::bind |
( |
| ) |
const |
| float lm::Texture::bufferHeight |
( |
| ) |
const |
|
inline |
Get the texture buffer height
- Returns
- The texture buffer height
| float lm::Texture::bufferWidth |
( |
| ) |
const |
|
inline |
Get the texture buffer width
- Returns
- The texture buffer width
| float lm::Texture::height |
( |
| ) |
const |
|
inline |
Get the texture height
- Returns
- The texture height
| void lm::Texture::load |
( |
| ) |
|
| bool lm::Texture::loaded |
( |
| ) |
const |
Check wether a texture is loaded
- Returns
- true if the texture is loaded, false otherwise
| void lm::Texture::pushAtlas |
( |
const Rect2f & |
rect | ) |
|
Add a rect to the texture atlas
- Parameters
-
| void lm::Texture::pushAtlas |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
Cut the texture into equal parts
- Parameters
-
| w | the texture part width |
| h | the texture part height |
| void lm::Texture::setImage |
( |
Image & |
image | ) |
|
Set the texture image.
- Parameters
-
| void lm::Texture::unload |
( |
| ) |
|
| float lm::Texture::width |
( |
| ) |
const |
|
inline |
Get the texture width
- Returns
- The texture width
The documentation for this class was generated from the following file: