Represents an OpenGL texture.
There are different kinds of textures: 2D, 3D and Cube. 2D is the most commonly used one. Currently only 2D works!
| TT | Type of the Texture (2D, 3D or Cube) |
Inherits TextureInterface.
Public Member Functions | |
| void | create (Vec2i dimension, TexFormat format, void *data=nullptr) |
| Creates internal storage for the texture. More... | |
| void | prime (int texUnit, std::function< void(HotTexture< TT > &)> func) |
| GLuint | nativeHandle () const |
| TexFormat | getFormat () const |
Public Member Functions inherited from SingleBase | |
| void | setServiceContext (config::ServiceContext cnt) |
| template<typename Ex , LogLevel LL, typename... Ts> | |
| Error Notice Debug void | logAndThrow (Ts...args) |
Public Attributes | |
| TexParam | params |
Additional Inherited Members | |
Protected Member Functions inherited from GLContextFreeObject | |
| template<typename... Ts> | |
| void | checkGLError (Ts...) |
| template<typename... Ts> | |
| void | checkGLWarning (Ts...) |
| template<typename... Ts> | |
| void | logThrowGL (Ts...) |
Protected Member Functions inherited from SingleBase | |
| template<typename... Ts> | |
| void | logCritical (Ts...args) |
| template<typename... Ts> | |
| void | logError (Ts...args) |
| template<typename... Ts> | |
| void | logWarning (Ts...args) |
| template<typename... Ts> | |
| void | logNotice (Ts...args) |
| template<typename... Ts> | |
| void | log (Ts...args) |
| template<typename... Ts> | |
| void | logDebug (Ts...args) |
| template<typename Ex , LogLevel LL = LogLevel::Error, typename... Ts> | |
| void | logAndThrow (Ts...args) |
Protected Member Functions inherited from NotCopyable | |
| NotCopyable (const NotCopyable &)=delete | |
| NotCopyable & | operator= (const NotCopyable &)=delete |
Static Protected Attributes inherited from GLContextFreeObject | |
| static constexpr PrintGL | GLERR = PrintGL::Error |
| void create | ( | Vec2i | dimension, |
| TexFormat | format, | ||
| void * | data = nullptr |
||
| ) |
Creates internal storage for the texture.
All internal data structures are created and optional data is filled into the texture memory.
| dimension | Size of the texture |
| format | Format of the texture |
| data | A pointer to valid texture data |