This is a base texture class that serves as a base class for other texture types.
More...
#include <Texture.hpp>
|
| | Texture (Type type) |
| |
| virtual | ~Texture ()=default |
| |
| virtual int | getWidth () const =0 |
| | Returns the width of the texture in pixels.
|
| |
| virtual int | getHeight () const =0 |
| | Returns the height of the texture in pixels.
|
| |
| virtual int | getDepth () const =0 |
| | Returns the depth of the texture in pixels.
|
| |
| bool | isLoaded () const |
| |
This is a base texture class that serves as a base class for other texture types.
- Bug
- This has some weird bug too!
#include <iostream>
#include <memory>
int main() {
const auto pixels = std::make_unique<uint8_t[]>(new uint8_t[1024*1024*3]);
fillData(*pixels, "path/to/texture.png");
return 0;
}
Definition Texture2D.hpp:10
◆ Type
| Enumerator |
|---|
| UNKNOWN | - Note
- This should probably never occur
|
| RGBA_8 | - Note
- Use primarly this for the best performance!
|
| RGB_8 | |
| RGBA_16 | |
| RGB_16 | |
| RGBA_32 | |
| RGB_32 | |
◆ Texture()
| Engine::Graphics::Texture::Texture |
( |
Type | type | ) |
|
|
explicit |
◆ ~Texture()
| virtual Engine::Graphics::Texture::~Texture |
( |
| ) |
|
|
virtualdefault |
◆ getDepth()
| virtual int Engine::Graphics::Texture::getDepth |
( |
| ) |
const |
|
pure virtual |
◆ getHeight()
| virtual int Engine::Graphics::Texture::getHeight |
( |
| ) |
const |
|
pure virtual |
◆ getWidth()
| virtual int Engine::Graphics::Texture::getWidth |
( |
| ) |
const |
|
pure virtual |
◆ isLoaded()
| bool Engine::Graphics::Texture::isLoaded |
( |
| ) |
const |
|
inline |
◆ loaded
| bool Engine::Graphics::Texture::loaded {false} |
|
protected |
◆ type
| Type Engine::Graphics::Texture::type |
|
protected |
The documentation for this interface was generated from the following file: