0.8.1 API documentation
Public Member Functions | List of all members
texture_cube Class Reference

Cube map texture. More...

Inheritance diagram for texture_cube:
texture

Public Member Functions

extent_type extent (size_type Level=0) const
 Return the dimensions of a texture instance: width and height where both should be equal.
 
template<typename gen_type >
gen_type load (extent_type const &TexelCoord, size_type Face, size_type Level) const
 Fetch a texel from a texture. The texture format must be uncompressed.
 
texture2d operator[] (size_type Face) const
 Create a view of the texture identified by Face in the texture cube.
 
template<typename gen_type >
void store (extent_type const &TexelCoord, size_type Face, size_type Level, gen_type const &Texel)
 Write a texel to a texture. The texture format must be uncompressed.
 
 texture_cube ()
 Create an empty texture cube.
 
 texture_cube (format_type Format, extent_type const &Extent, size_type Levels, swizzles_type const &Swizzles=swizzles_type(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ALPHA))
 Create a texture_cube and allocate a new storage_linear.
 
 texture_cube (format_type Format, extent_type const &Extent, swizzles_type const &Swizzles=swizzles_type(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ALPHA))
 Create a texture_cube and allocate a new storage_linear with a complete mipmap chain.
 
 texture_cube (texture const &Texture)
 Create a texture_cube view with an existing storage_linear.
 
 texture_cube (texture const &Texture, format_type Format, size_type BaseLayer, size_type MaxLayer, size_type BaseFace, size_type MaxFace, size_type BaseLevel, size_type MaxLevel, swizzles_type const &Swizzles=swizzles_type(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ALPHA))
 Create a texture_cube view with an existing storage_linear.
 
 texture_cube (texture_cube const &Texture, size_type BaseFace, size_type MaxFace, size_type BaseLevel, size_type MaxLevel)
 Create a texture_cube view, reference a subset of an existing texture_cube instance.
 
- Public Member Functions inherited from texture
size_type base_face () const
 Return the base face of the texture instance, effectively a memory offset in the actual texture storage_type to identify where to start reading the faces.
 
size_type base_layer () const
 Return the base layer of the texture instance, effectively a memory offset in the actual texture storage_type to identify where to start reading the layers.
 
size_type base_level () const
 Return the base level of the texture instance, effectively a memory offset in the actual texture storage_type to identify where to start reading the levels.
 
void clear ()
 Clear the entire texture storage_linear with zeros.
 
template<typename gen_type >
void clear (gen_type const &Texel)
 Clear the entire texture storage_linear with Texel which type must match the texture storage_linear format block size If the type of gen_type doesn't match the type of the texture format, no conversion is performed and the data will be reinterpreted as if is was of the texture format. More...
 
template<typename gen_type >
void clear (size_type Layer, size_type Face, size_type Level, gen_type const &BlockData)
 Clear a specific image of a texture.
 
template<typename gen_type >
void clear (size_type Layer, size_type Face, size_type Level, extent_type const &TexelOffset, extent_type const &TexelExtent, gen_type const &BlockData)
 Clear a subset of a specific image of a texture.
 
void copy (texture const &TextureSrc, size_t LayerSrc, size_t FaceSrc, size_t LevelSrc, size_t LayerDst, size_t FaceDst, size_t LevelDst)
 Copy a specific image of a texture.
 
void copy (texture const &TextureSrc, size_t LayerSrc, size_t FaceSrc, size_t LevelSrc, extent_type const &OffsetSrc, size_t LayerDst, size_t FaceDst, size_t LevelDst, extent_type const &OffsetDst, extent_type const &Extent)
 Copy a subset of a specific image of a texture.
 
void * data ()
 Return a pointer to the beginning of the texture instance data.
 
template<typename gen_type >
gen_type * data ()
 Return a pointer of type genType which size must match the texture format block size.
 
void const * data () const
 Return a pointer to the beginning of the texture instance data.
 
template<typename gen_type >
gen_type const * data () const
 Return a pointer of type genType which size must match the texture format block size.
 
void * data (size_type Layer, size_type Face, size_type Level)
 Return a pointer to the beginning of the texture instance data.
 
void const *const data (size_type Layer, size_type Face, size_type Level) const
 Return a pointer to the beginning of the texture instance data.
 
template<typename gen_type >
gen_type * data (size_type Layer, size_type Face, size_type Level)
 Return a pointer of type genType which size must match the texture format block size.
 
template<typename gen_type >
gen_type const *const data (size_type Layer, size_type Face, size_type Level) const
 Return a pointer of type genType which size must match the texture format block size.
 
bool empty () const
 Return whether the texture instance is empty, no storage_type or description have been assigned to the instance.
 
extent_type extent (size_type Level=0) const
 Return the size of a texture instance: width, height and depth.
 
size_type faces () const
 Return max_face() - base_face() + 1.
 
format_type format () const
 Return the texture instance format.
 
size_type layers () const
 Return max_layer() - base_layer() + 1.
 
size_type levels () const
 Return max_level() - base_level() + 1.
 
template<typename gen_type >
gen_type load (extent_type const &TexelCoord, size_type Layer, size_type Face, size_type Level) const
 Fetch a texel from a texture. The texture format must be uncompressed.
 
size_type max_face () const
 Return the max face of the texture instance, effectively a memory offset to the beginning of the last face in the actual texture storage_type that the texture instance can access.
 
size_type max_layer () const
 Return the max layer of the texture instance, effectively a memory offset to the beginning of the last layer in the actual texture storage_type that the texture instance can access.
 
size_type max_level () const
 Return the max level of the texture instance, effectively a memory offset to the beginning of the last level in the actual texture storage_type that the texture instance can access.
 
size_type size () const
 Return the memory size of a texture instance storage_type in bytes.
 
template<typename genType >
size_type size () const
 Return the number of blocks contained in a texture instance storage_type. More...
 
size_type size (size_type Level) const
 Return the memory size of a specific level identified by Level.
 
template<typename gen_type >
size_type size (size_type Level) const
 Return the memory size of a specific level identified by Level. More...
 
template<typename gen_type >
void store (extent_type const &TexelCoord, size_type Layer, size_type Face, size_type Level, gen_type const &Texel)
 Write a texel to a texture. The texture format must be uncompressed.
 
template<typename gen_type >
void swizzle (gli::swizzles const &Swizzles)
 Reorder the component in texture memory.
 
target_type target () const
 Return the target of a texture instance.
 
 texture ()
 Create an empty texture instance.
 
 texture (target_type Target, format_type Format, extent_type const &Extent, size_type Layers, size_type Faces, size_type Levels, swizzles_type const &Swizzles=swizzles_type(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ALPHA))
 Create a texture object and allocate a texture storoge for it. More...
 
 texture (texture const &Texture, target_type Target, format_type Format, size_type BaseLayer, size_type MaxLayer, size_type BaseFace, size_type MaxFace, size_type BaseLevel, size_type MaxLevel, swizzles_type const &Swizzles=swizzles_type(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ALPHA))
 Create a texture object by sharing an existing texture storage_type from another texture instance. More...
 
 texture (texture const &Texture, target_type Target, format_type Format, swizzles_type const &Swizzles=swizzles_type(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ALPHA))
 Create a texture object by sharing an existing texture storage_type from another texture instance. More...
 

Detailed Description

Cube map texture.

Definition at line 11 of file texture_cube.hpp.