holds and manages textures for use with meshes in sprites
More...
#include <Texture.h>
holds and manages textures for use with meshes in sprites
◆ Texture() [1/4]
default ctor, don't use, it doesn't make sense.
only For Json
◆ Texture() [2/4]
| Texture::Texture |
( |
const std::string & | fileName | ) |
|
◆ ~Texture()
◆ Texture() [3/4]
| Texture::Texture |
( |
const Texture & | other | ) |
|
◆ Texture() [4/4]
| Texture::Texture |
( |
Texture && | other | ) |
|
|
noexcept |
◆ activate()
| auto Texture::activate |
( |
| ) |
const->void |
◆ deactivate()
| auto Texture::deactivate |
( |
| ) |
const->void |
◆ getFrames()
| auto Texture::getFrames |
( |
| ) |
const->unsigned |
|
nodiscard |
◆ getTextureHeight()
| auto Texture::getTextureHeight |
( |
| ) |
const->int |
|
nodiscard |
◆ getTextureID()
| auto Texture::getTextureID |
( |
| ) |
const->GLuint |
get the opengl id of texture
◆ getTextureWidth()
| auto Texture::getTextureWidth |
( |
| ) |
const->int |
|
nodiscard |
◆ getTilesHigh()
| auto Texture::getTilesHigh |
( |
| ) |
const->unsigned |
|
nodiscard |
◆ getTilesWide()
| auto Texture::getTilesWide |
( |
| ) |
const->unsigned |
|
nodiscard |
◆ load()
| auto Texture::load |
( |
Stream & | stream | ) |
->void |
◆ loadFile()
| auto Texture::loadFile |
( |
const std::string & | fileName | ) |
->void |
◆ name() [1/2]
| auto Texture::name |
( |
| ) |
const->conststd::string & |
|
nodiscard |
- Returns
- the name of the Texture's .json
◆ name() [2/2]
| auto Texture::name |
( |
const std::string & | name | ) |
->void |
- Parameters
-
| name | the name of the texture's .json |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ save()
| auto Texture::save |
( |
Stream & | stream | ) |
const->void |
◆ from_json
◆ to_json
◆ _name
| std::string Texture::_name |
|
private |
Sprite will save the name of the texture it needs to load, so that multiple sprites can use the same texture.
◆ format
| GLenum Texture::format {GL_RGBA} |
|
private |
◆ frames
| unsigned Texture::frames = 1 |
|
private |
The total number of frames the texture has if it is a spritesheet.
◆ imageData
| unsigned char* Texture::imageData |
|
private |
◆ imagePath
| std::string Texture::imagePath |
|
private |
the path to the image that was loaded from
◆ numPerPixel
◆ textureHeight
| int Texture::textureHeight |
|
private |
◆ textureID
◆ textureWidth
| int Texture::textureWidth |
|
private |
◆ tilesHigh
| unsigned Texture::tilesHigh = 1 |
|
private |
◆ tilesWide
| unsigned Texture::tilesWide = 1 |
|
private |
The number of tiles wide of the image as a spritesheet.
The documentation for this class was generated from the following files:
- /home/egrazil/sites/Brunot/The House/source/Graphics/Texture.h
- /home/egrazil/sites/Brunot/The House/source/Graphics/Texture.cpp