All Classes Files Functions Variables Typedefs Pages
Public Member Functions | Public Attributes | List of all members
Texture< TT > Class Template Reference

Description

template<TexType TT>
class lumina::Texture< TT >

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!

Template Parameters
TTType 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
 
NotCopyableoperator= (const NotCopyable &)=delete
 
- Static Protected Attributes inherited from GLContextFreeObject
static constexpr PrintGL GLERR = PrintGL::Error
 

Member Function Documentation

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.

Parameters
dimensionSize of the texture
formatFormat of the texture
dataA pointer to valid texture data