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 |
![]() | |
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 | |
![]() | |
template<typename... Ts> | |
void | checkGLError (Ts...) |
template<typename... Ts> | |
void | checkGLWarning (Ts...) |
template<typename... Ts> | |
void | logThrowGL (Ts...) |
![]() | |
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) |
![]() | |
NotCopyable (const NotCopyable &)=delete | |
NotCopyable & | operator= (const NotCopyable &)=delete |
![]() | |
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 |