| 0.8.0 API documentation

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Classes | Enumerations | Functions
gli Namespace Reference

Namespace where all the classes and functions provided by GLI are exposed. More...

## Classes
class | dx
| Translation class to convert GLI enums into DirectX enums. More...
class | gl
| Translation class to convert GLI enums into OpenGL values. More...
class | image
| Image, representation for a single texture level. More...
class | sampler
| Genetic sampler class. More...
class | sampler1d
| 1d texture sampler More...
class | sampler1d_array
| 1d array texture sampler More...
class | sampler2d
| 2d texture sampler More...
class | sampler2d_array
| 2d array texture sampler More...
class | sampler3d
| 3d texture sampler More...
class | sampler_cube
| Cube map texture sampler. More...
class | sampler_cube_array
| Cube map array texture sampler. More...
class | texture
| Genetic texture class. It can support any target. More...
class | texture1d
| 1d texture More...
class | texture1d_array
| 1d array texture More...
class | texture2d
| 2d texture More...
class | texture2d_array
| 2d array texture More...
class | texture3d
| 3d texture More...
class | texture_cube
| Cube map texture. More...
class | texture_cube_array
| Cube map array texture. More...

## Enumerations
enum | filter
| Texture filtring modes.
enum | format
| Texture data format.
enum | swizzle
| Represent the source of a channel.
enum | target
| Texture target: type/shape of the texture storage.
enum | wrap
| Texture coordinate wrapping mode.

## Functions
ivec3 | block_extent (format Format)
| Return the dimensions in texels of the block for a format.
size_t | block_size (format Format)
| Return the size in bytes of a block for a format.
size_t | component_count (format Format)
| Return the number of components of a format.
template<typename texture_type >
texture_type | convert (texture_type const &Texture, format Format)
| Convert texture data to a new format. More...
image | duplicate (image const &Image)
| Duplicate an image and create a new image with a new storage allocation.
template<typename texType >
texture | duplicate (texType const &Texture)
| Duplicate a texture and create a new texture with a new storage allocation.
template<typename texType >
texture | duplicate (texType const &Texture, format Format)
| Duplicate a texture and create a new texture with a new storage allocation but a different format. More...
texture | duplicate (texture1d const &Texture, texture1d::size_type BaseLevel, texture1d::size_type MaxLevel)
| Duplicate a subset of a texture and create a new texture with a new storage allocation.
texture | duplicate (texture1d_array const &Texture, texture1d_array::size_type BaseLayer, texture1d_array::size_type MaxLayer, texture1d_array::size_type BaseLevel, texture1d_array::size_type MaxLevel)
| Duplicate a subset of a texture and create a new texture with a new storage allocation.
texture | duplicate (texture2d const &Texture, texture2d::size_type BaseLevel, texture2d::size_type MaxLevel)
| Duplicate a subset of a texture and create a new texture with a new storage allocation.
texture | duplicate (texture2d_array const &Texture, texture2d_array::size_type BaseLayer, texture2d_array::size_type MaxLayer, texture2d_array::size_type BaseLevel, texture2d_array::size_type MaxLevel)
| Duplicate a subset of a texture and create a new texture with a new storage allocation.
texture | duplicate (texture3d const &Texture, texture3d::size_type BaseLevel, texture3d::size_type MaxLevel)
| Duplicate a subset of a texture and create a new texture with a new storage allocation.
texture | duplicate (texture_cube const &Texture, texture_cube::size_type BaseFace, texture_cube::size_type MaxFace, texture_cube::size_type BaseLevel, texture_cube::size_type MaxLevel)
| Duplicate a subset of a texture and create a new texture with a new storage allocation.
texture | duplicate (texture_cube_array const &Texture, texture_cube_array::size_type BaseLayer, texture_cube_array::size_type MaxLayer, texture_cube_array::size_type BaseFace, texture_cube_array::size_type MaxFace, texture_cube_array::size_type BaseLevel, texture_cube_array::size_type MaxLevel)
| Duplicate a subset of a texture and create a new texture with a new storage allocation.
template<typename texture_type >
texture_type | generate_mipmaps (texture_type const &Texture, filter Minification)
| Allocate a texture and generate all the mipmaps of the texture using the Minification filter.
texture1d | generate_mipmaps (texture1d const &Texture, texture1d::size_type BaseLevel, texture1d::size_type MaxLevel, filter Minification)
| Allocate a texture and generate the mipmaps of the texture from the BaseLevel to the MaxLevel included using the Minification filter.
texture1d_array | generate_mipmaps (texture1d_array const &Texture, texture1d_array::size_type BaseLayer, texture1d_array::size_type MaxLayer, texture1d_array::size_type BaseLevel, texture1d_array::size_type MaxLevel, filter Minification)
| Allocate a texture and generate the mipmaps of the texture from the BaseLayer to the MaxLayer and from the BaseLevel to the MaxLevel included levels using the Minification filter.
texture2d | generate_mipmaps (texture2d const &Texture, texture2d::size_type BaseLevel, texture2d::size_type MaxLevel, filter Minification)
| Allocate a texture and generate the mipmaps of the texture from the BaseLevel to the MaxLevel included using the Minification filter.
texture2d_array | generate_mipmaps (texture2d_array const &Texture, texture2d_array::size_type BaseLayer, texture2d_array::size_type MaxLayer, texture2d_array::size_type BaseLevel, texture2d_array::size_type MaxLevel, filter Minification)
| Allocate a texture and generate the mipmaps of the texture from the BaseLayer to the MaxLayer and from the BaseLevel to the MaxLevel included levels using the Minification filter.
texture3d | generate_mipmaps (texture3d const &Texture, texture3d::size_type BaseLevel, texture3d::size_type MaxLevel, filter Minification)
| Allocate a texture and generate the mipmaps of the texture from the BaseLevel to the MaxLevel included using the Minification filter.
texture_cube | generate_mipmaps (texture_cube const &Texture, texture_cube::size_type BaseFace, texture_cube::size_type MaxFace, texture_cube::size_type BaseLevel, texture_cube::size_type MaxLevel, filter Minification)
| Allocate a texture and generate the mipmaps of the texture from the BaseLayer to the MaxLayer, from the BaseFace to the MaxFace and from the BaseLevel to the MaxLevel included levels using the Minification filter.
texture_cube_array | generate_mipmaps (texture_cube_array const &Texture, texture_cube_array::size_type BaseLayer, texture_cube_array::size_type MaxLayer, texture_cube_array::size_type BaseFace, texture_cube_array::size_type MaxFace, texture_cube_array::size_type BaseLevel, texture_cube_array::size_type MaxLevel, filter Minification)
| Allocate a texture and generate the mipmaps of the texture from the BaseLayer to the MaxLayer and from the BaseLevel to the MaxLevel included levels using the Minification filter.
bool | is_border (wrap Wrap)
| Evaluate whether the texture coordinate wrapping mode relies on border color.
bool | is_channel (swizzle Swizzle)
| Determine whether the Swizzle value represent a channel.
bool | is_compressed (format Format)
| Evaluate whether a format is compressed.
bool | is_dds_ext (target Target, format Format)
| Evaluate whether a target and format combinaison is only supported by the DDS container through GLI DDS extension.
bool | is_srgb (format Format)
| Evaluate whether a format stores sRGB color space values.
bool | is_target_1d (target Target)
| Check whether a target is a 1D target.
bool | is_target_array (target Target)
| Check whether a target is an array target.
bool | is_target_cube (target Target)
| Check whether a target is a cube map target.
bool | is_target_rect (target Target)
| Check whether a target is a rectangle target.
bool | is_valid (format Format)
| Evaluate whether a format value is value or not.
template<typename T , precision P, template< typename, precision > class vecType>
T | levels (vecType< T, P > const &Extent)
| Compute the number of mipmaps levels necessary to create a mipmap complete texture. More...
template<typename T , precision P>
size_t | linear_index (tvec1< T, P > const &Coord, tvec1< T, P > const &Dimensions)
| Compute an offset from the beginning of a storage to a specific texel stored in linear order.
template<typename T , precision P>
size_t | linear_index (tvec2< T, P > const &Coord, tvec2< T, P > const &Dimensions)
| Compute an offset from the beginning of a storage to a specific texel stored in linear order.
template<typename T , precision P>
size_t | linear_index (tvec3< T, P > const &Coord, tvec3< T, P > const &Dimensions)
| Compute an offset from the beginning of a storage to a specific texel stored in linear order.
texture | load (char const *Path)
| Loads a texture storage from file. More...
texture | load (std::string const &Path)
| Loads a texture storage from file. More...
texture | load (char const *Data, std::size_t Size)
| Loads a texture storage from memory. More...
texture | load_dds (char const *Path)
| Loads a texture storage from DDS file. More...
texture | load_dds (std::string const &Path)
| Loads a texture storage from DDS file. More...
texture | load_dds (char const *Data, std::size_t Size)
| Loads a texture storage from DDS memory. More...
texture | load_kmg (char const *Path)
| Loads a texture storage from KMG (Khronos Image) file. More...
texture | load_kmg (std::string const &Path)
| Loads a texture storage from KMG (Khronos Image) file. More...
texture | load_kmg (char const *Data, std::size_t Size)
| Loads a texture storage from KMG (Khronos Image) memory. More...
texture | load_ktx (char const *Path)
| Loads a texture storage from KTX file. More...
texture | load_ktx (std::string const &Path)
| Loads a texture storage from KTX file. More...
texture | load_ktx (char const *Data, std::size_t Size)
| Loads a texture storage from KTX memory. More...
bool | operator!= (image const &ImageA, image const &ImageB)
| Compare two images. Two images are equal when the date is the same.
bool | operator!= (texture const &A, texture const &B)
| Compare two textures. Two textures are the same when the data, the format and the targets are the same.
bool | operator== (image const &ImageA, image const &ImageB)
| Compare two images. Two images are equal when the date is the same.
bool | operator== (texture const &A, texture const &B)
| Compare two textures. Two textures are the same when the data, the format and the targets are the same.
template<typename vec_type >
vec_type | reduce (texture1d const &In0, texture1d const &In1, typename reduce_func< vec_type >::type TexelFunc, typename reduce_func< vec_type >::type ReduceFunc)
| Compute per-texel operations using a user defined function. More...
template<typename vec_type >
vec_type | reduce (texture1d_array const &In0, texture1d_array const &In1, typename reduce_func< vec_type >::type TexelFunc, typename reduce_func< vec_type >::type ReduceFunc)
| Compute per-texel operations using a user defined function. More...
template<typename vec_type >
vec_type | reduce (texture2d const &In0, texture2d const &In1, typename reduce_func< vec_type >::type TexelFunc, typename reduce_func< vec_type >::type ReduceFunc)
| Compute per-texel operations using a user defined function. More...
template<typename vec_type >
vec_type | reduce (texture2d_array const &In0, texture2d_array const &In1, typename reduce_func< vec_type >::type TexelFunc, typename reduce_func< vec_type >::type ReduceFunc)
| Compute per-texel operations using a user defined function. More...
template<typename vec_type >
vec_type | reduce (texture3d const &In0, texture3d const &In1, typename reduce_func< vec_type >::type TexelFunc, typename reduce_func< vec_type >::type ReduceFunc)
| Compute per-texel operations using a user defined function. More...
template<typename vec_type >
vec_type | reduce (texture_cube const &In0, texture_cube const &In1, typename reduce_func< vec_type >::type TexelFunc, typename reduce_func< vec_type >::type ReduceFunc)
| Compute per-texel operations using a user defined function. More...
template<typename vec_type >
vec_type | reduce (texture_cube_array const &In0, texture_cube_array const &In1, typename reduce_func< vec_type >::type TexelFunc, typename reduce_func< vec_type >::type ReduceFunc)
| Compute per-texel operations using a user defined function. More...
template<typename texture_type , typename vec_type >
vec_type | reduce (texture_type const &In0, texture_type const &In1, typename reduce_func< vec_type >::type TexelFunc, typename reduce_func< vec_type >::type ReduceFunc)
| Compute per-texel operations using a user defined function. More...
bool | save (texture const &Texture, char const *Path)
| Save a texture storage to file. More...
bool | save (texture const &Texture, std::string const &Path)
| Save a texture storage to file. More...
bool | save_dds (texture const &Texture, char const *Path)
| Save a texture storage to a DDS file. More...
bool | save_dds (texture const &Texture, std::string const &Path)
| Save a texture storage to a DDS file. More...
bool | save_dds (texture const &Texture, std::vector< char > &Memory)
| Save a texture storage to a DDS file. More...
bool | save_kmg (texture const &Texture, char const *Path)
| Save a texture storage to a KMG (Khronos Image) file. More...
bool | save_kmg (texture const &Texture, std::string const &Path)
| Save a texture storage to a KMG (Khronos Image) file. More...
bool | save_kmg (texture const &Texture, std::vector< char > &Memory)
| Save a texture storage to a KMG (Khronos Image) file. More...
bool | save_ktx (texture const &Texture, char const *Path)
| Save a texture storage to a KTX file. More...
bool | save_ktx (texture const &Texture, std::string const &Path)
| Save a texture storage to a KTX file. More...
bool | save_ktx (texture const &Texture, std::vector< char > &Memory)
| Save a texture storage to a KTX file. More...
template<typename vec_type >
void | transform (texture1d &Out, texture1d const &In0, texture1d const &In1, typename transform_func< vec_type >::type TexelFunc)
| Compute per-texel operations using a user defined function. More...
template<typename vec_type >
void | transform (texture1d_array &Out, texture1d_array const &In0, texture1d_array const &In1, typename transform_func< vec_type >::type TexelFunc)
| Compute per-texel operations using a user defined function. More...
template<typename vec_type >
void | transform (texture2d &Out, texture2d const &In0, texture2d const &In1, typename transform_func< vec_type >::type TexelFunc)
| Compute per-texel operations using a user defined function. More...
template<typename vec_type >
void | transform (texture2d_array &Out, texture2d_array const &In0, texture2d_array const &In1, typename transform_func< vec_type >::type TexelFunc)
| Compute per-texel operations using a user defined function. More...
template<typename vec_type >
void | transform (texture3d &Out, texture3d const &In0, texture3d const &In1, typename transform_func< vec_type >::type TexelFunc)
| Compute per-texel operations using a user defined function. More...
template<typename vec_type >
void | transform (texture_cube &Out, texture_cube const &In0, texture_cube const &In1, typename transform_func< vec_type >::type TexelFunc)
| Compute per-texel operations using a user defined function. More...
template<typename vec_type >
void | transform (texture_cube_array &Out, texture_cube_array const &In0, texture_cube_array const &In1, typename transform_func< vec_type >::type TexelFunc)
| Compute per-texel operations using a user defined function. More...
image | view (image const &Image)
| Create an image view of an existing image, sharing the same memory storage.
texture | view (texture const &Texture)
| Create a texture view of an existing texture, sharing the same memory storage.
texture | view (texture const &Texture, texture::size_type BaseLayer, texture::size_type MaxLayer, texture::size_type BaseFace, texture::size_type MaxFace, texture::size_type BaseLevel, texture::size_type MaxLevel)
| Create a texture view of an existing texture, sharing the same memory storage but giving access only to a subset of layers, levels and faces.
template<typename texType >
texture | view (texType const &Texture)
| Create a texture view of an existing texture, sharing the same memory storage.
template<typename texType >
texture | view (texType const &Texture, format Format)
| Create a texture view of an existing texture, sharing the same memory storage but a different format. More...
texture | view (texture1d const &Texture, texture1d::size_type BaseLevel, texture1d::size_type MaxLevel)
| Create a texture view of an existing texture, sharing the same memory storage but giving access only to a subset of levels.
texture | view (texture1d_array const &Texture, texture1d_array::size_type BaseLayer, texture1d_array::size_type MaxLayer, texture1d_array::size_type BaseLevel, texture1d_array::size_type MaxLevel)
| Create a texture view of an existing texture, sharing the same memory storage but giving access only to a subset of levels and layers.
texture | view (texture2d const &Texture, texture2d::size_type BaseLevel, texture2d::size_type MaxLevel)
| Create a texture view of an existing texture, sharing the same memory storage but giving access only to a subset of levels.
texture | view (texture2d_array const &Texture, texture2d_array::size_type BaseLayer, texture2d_array::size_type MaxLayer, texture2d_array::size_type BaseLevel, texture2d_array::size_type MaxLevel)
| Create a texture view of an existing texture, sharing the same memory storage but giving access only to a subset of levels and layers.
texture | view (texture3d const &Texture, texture3d::size_type BaseLevel, texture3d::size_type MaxLevel)
| Create a texture view of an existing texture, sharing the same memory storage but giving access only to a subset of levels.
texture | view (texture_cube const &Texture, texture_cube::size_type BaseFace, texture_cube::size_type MaxFace, texture_cube::size_type BaseLevel, texture_cube::size_type MaxLevel)
| Create a texture view of an existing texture, sharing the same memory storage but giving access only to a subset of levels and faces.
texture | view (texture_cube_array const &Texture, texture_cube_array::size_type BaseLayer, texture_cube_array::size_type MaxLayer, texture_cube_array::size_type BaseFace, texture_cube_array::size_type MaxFace, texture_cube_array::size_type BaseLevel, texture_cube_array::size_type MaxLevel)
| Create a texture view of an existing texture, sharing the same memory storage but giving access only to a subset of layers, levels and faces.

## Detailed Description

Namespace where all the classes and functions provided by GLI are exposed.

## Function Documentation

texture_type gli::convert | ( | texture_type const & | Texture,
|  | format | Format
| ) |  |

Convert texture data to a new format.

Parameters

  Texture | Source texture, the format must be uncompressed.
  Format | Destination Texture format, it must be uncompressed.

texture gli::duplicate | ( | texType const & | Texture,
|  | format | Format
| ) |  |

Duplicate a texture and create a new texture with a new storage allocation but a different format.

The format must be a compatible format, a format which block size match the original format.

T gli::levels | ( | vecType< T, P > const & | Extent | ) |

Compute the number of mipmaps levels necessary to create a mipmap complete texture.

Parameters

  Extent | Extent of the texture base level mipmap

Template Parameters

  vecType | Vector type used to express the dimentions of a texture of any kind. #include <gli/texture2d.hpp> #include <gli/levels.hpp> ... gli::texture2d::extent_type Extent(32, 10); gli::texture2d Texture(gli::levels(Extent));

texture gli::load | ( | char const * | Path | ) |

Loads a texture storage from file.

Returns an empty storage in case of failure.

Parameters

  Path | Path of the file to open including filaname and filename extension

texture gli::load | ( | std::string const & | Path | ) |

Loads a texture storage from file.

Returns an empty storage in case of failure.

Parameters

  Path | Path of the file to open including filaname and filename extension

texture gli::load | ( | char const * | Data,
|  | std::size_t | Size
| ) |  |

Loads a texture storage from memory.

Returns an empty storage in case of failure.

Parameters

  Data | Data of a texture
  Size | Size of the data

texture gli::load_dds | ( | char const * | Path | ) |

Loads a texture storage from DDS file.

Returns an empty storage in case of failure.

Parameters

  Path | Path of the file to open including filaname and filename extension

texture gli::load_dds | ( | std::string const & | Path | ) |

Loads a texture storage from DDS file.

Returns an empty storage in case of failure.

Parameters

  Path | Path of the file to open including filaname and filename extension

texture gli::load_dds | ( | char const * | Data,
|  | std::size_t | Size
| ) |  |

Loads a texture storage from DDS memory.

Returns an empty storage in case of failure.

Parameters

  Data | Pointer to the beginning of the texture container data to read
  Size | Size of texture container Data to read

texture gli::load_kmg | ( | char const * | Path | ) |

Loads a texture storage from KMG (Khronos Image) file.

Returns an empty storage in case of failure.

Parameters

  Path | Path of the file to open including filaname and filename extension

texture gli::load_kmg | ( | std::string const & | Path | ) |

Loads a texture storage from KMG (Khronos Image) file.

Returns an empty storage in case of failure.

Parameters

  Path | Path of the file to open including filaname and filename extension

texture gli::load_kmg | ( | char const * | Data,
|  | std::size_t | Size
| ) |  |

Loads a texture storage from KMG (Khronos Image) memory.

Returns an empty storage in case of failure.

Parameters

  Data | Pointer to the beginning of the texture container data to read
  Size | Size of texture container Data to read

texture gli::load_ktx | ( | char const * | Path | ) |

Loads a texture storage from KTX file.

Returns an empty storage in case of failure.

Parameters

  Path | Path of the file to open including filaname and filename extension

texture gli::load_ktx | ( | std::string const & | Path | ) |

Loads a texture storage from KTX file.

Returns an empty storage in case of failure.

Parameters

  Path | Path of the file to open including filaname and filename extension

texture gli::load_ktx | ( | char const * | Data,
|  | std::size_t | Size
| ) |  |

Loads a texture storage from KTX memory.

Returns an empty storage in case of failure.

Parameters

  Data | Pointer to the beginning of the texture container data to read
  Size | Size of texture container Data to read

vec_type gli::reduce | ( | texture1d const & | In0,
|  | texture1d const & | In1,
|  | typename reduce_func< vec_type >::type | TexelFunc,
|  | typename reduce_func< vec_type >::type | ReduceFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function for per texel operation.
  ReduceFunc | Pointer to a binary function to reduce texels.

vec_type gli::reduce | ( | texture1d_array const & | In0,
|  | texture1d_array const & | In1,
|  | typename reduce_func< vec_type >::type | TexelFunc,
|  | typename reduce_func< vec_type >::type | ReduceFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function for per texel operation.
  ReduceFunc | Pointer to a binary function to reduce texels.

vec_type gli::reduce | ( | texture2d const & | In0,
|  | texture2d const & | In1,
|  | typename reduce_func< vec_type >::type | TexelFunc,
|  | typename reduce_func< vec_type >::type | ReduceFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function for per texel operation.
  ReduceFunc | Pointer to a binary function to reduce texels.

vec_type gli::reduce | ( | texture2d_array const & | In0,
|  | texture2d_array const & | In1,
|  | typename reduce_func< vec_type >::type | TexelFunc,
|  | typename reduce_func< vec_type >::type | ReduceFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function for per texel operation.
  ReduceFunc | Pointer to a binary function to reduce texels.

vec_type gli::reduce | ( | texture3d const & | In0,
|  | texture3d const & | In1,
|  | typename reduce_func< vec_type >::type | TexelFunc,
|  | typename reduce_func< vec_type >::type | ReduceFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function for per texel operation.
  ReduceFunc | Pointer to a binary function to reduce texels.

vec_type gli::reduce | ( | texture_cube const & | In0,
|  | texture_cube const & | In1,
|  | typename reduce_func< vec_type >::type | TexelFunc,
|  | typename reduce_func< vec_type >::type | ReduceFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function for per texel operation.
  ReduceFunc | Pointer to a binary function to reduce texels.

vec_type gli::reduce | ( | texture_cube_array const & | In0,
|  | texture_cube_array const & | In1,
|  | typename reduce_func< vec_type >::type | TexelFunc,
|  | typename reduce_func< vec_type >::type | ReduceFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function for per texel operation.
  ReduceFunc | Pointer to a binary function to reduce texels.

vec_type gli::reduce | ( | texture_type const & | In0,
|  | texture_type const & | In1,
|  | typename reduce_func< vec_type >::type | TexelFunc,
|  | typename reduce_func< vec_type >::type | ReduceFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function for per texel operation.
  ReduceFunc | Pointer to a binary function to reduce texels.

bool gli::save | ( | texture const & | Texture,
|  | char const * | Path
| ) |  |

Save a texture storage to file.

Parameters

  Texture | Source texture to save
  Path | Path for where to save the file. It must include the filaname and filename extension. The function use the filename extension included in the path to figure out the file container to use.

Returns
  Returns false if the function fails to save the file.

bool gli::save | ( | texture const & | Texture,
|  | std::string const & | Path
| ) |  |

Save a texture storage to file.

Parameters

  Texture | Source texture to save
  Path | Path for where to save the file. It must include the filaname and filename extension. The function use the filename extension included in the path to figure out the file container to use.

Returns
  Returns false if the function fails to save the file.

bool gli::save_dds | ( | texture const & | Texture,
|  | char const * | Path
| ) |  |

Save a texture storage to a DDS file.

Parameters

  Texture | Source texture to save
  Path | Path for where to save the file. It must include the filaname and filename extension. This function ignores the filename extension in the path and save to DDS anyway but keep the requested filename extension.

Returns
  Returns false if the function fails to save the file.

bool gli::save_dds | ( | texture const & | Texture,
|  | std::string const & | Path
| ) |  |

Save a texture storage to a DDS file.

Parameters

  Texture | Source texture to save
  Path | Path for where to save the file. It must include the filaname and filename extension. This function ignores the filename extension in the path and save to DDS anyway but keep the requested filename extension.

Returns
  Returns false if the function fails to save the file.

bool gli::save_dds | ( | texture const & | Texture,
|  | std::vector< char > & | Memory
| ) |  |

Save a texture storage to a DDS file.

Parameters

  Texture | Source texture to save
  Memory | Storage for the DDS container. The function resizes the containers to fit the necessary storage.

Returns
  Returns false if the function fails to save the file.

bool gli::save_kmg | ( | texture const & | Texture,
|  | char const * | Path
| ) |  |

Save a texture storage to a KMG (Khronos Image) file.

Parameters

  Texture | Source texture to save
  Path | Path for where to save the file. It must include the filaname and filename extension. This function ignores the filename extension in the path and save to KMG anyway but keep the requested filename extension.

Returns
  Returns false if the function fails to save the file.

bool gli::save_kmg | ( | texture const & | Texture,
|  | std::string const & | Path
| ) |  |

Save a texture storage to a KMG (Khronos Image) file.

Parameters

  Texture | Source texture to save
  Path | Path for where to save the file. It must include the filaname and filename extension. This function ignores the filename extension in the path and save to KMG anyway but keep the requested filename extension.

Returns
  Returns false if the function fails to save the file.

bool gli::save_kmg | ( | texture const & | Texture,
|  | std::vector< char > & | Memory
| ) |  |

Save a texture storage to a KMG (Khronos Image) file.

Parameters

  Texture | Source texture to save
  Memory | Storage for the KMG container. The function resizes the containers to fit the necessary storage.

Returns
  Returns false if the function fails to save the file.

bool gli::save_ktx | ( | texture const & | Texture,
|  | char const * | Path
| ) |  |

Save a texture storage to a KTX file.

Parameters

  Texture | Source texture to save
  Path | Path for where to save the file. It must include the filaname and filename extension. This function ignores the filename extension in the path and save to KTX anyway but keep the requested filename extension.

Returns
  Returns false if the function fails to save the file.

bool gli::save_ktx | ( | texture const & | Texture,
|  | std::string const & | Path
| ) |  |

Save a texture storage to a KTX file.

Parameters

  Texture | Source texture to save
  Path | Path for where to save the file. It must include the filaname and filename extension. This function ignores the filename extension in the path and save to KTX anyway but keep the requested filename extension.

Returns
  Returns false if the function fails to save the file.

bool gli::save_ktx | ( | texture const & | Texture,
|  | std::vector< char > & | Memory
| ) |  |

Save a texture storage to a KTX file.

Parameters

  Texture | Source texture to save
  Memory | Storage for the KTX container. The function resizes the containers to fit the necessary storage.

Returns
  Returns false if the function fails to save the file.

void gli::transform | ( | texture1d & | Out,
|  | texture1d const & | In0,
|  | texture1d const & | In1,
|  | typename transform_func< vec_type >::type | TexelFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  Out | Output texture.
  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function.

void gli::transform | ( | texture1d_array & | Out,
|  | texture1d_array const & | In0,
|  | texture1d_array const & | In1,
|  | typename transform_func< vec_type >::type | TexelFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  Out | Output texture.
  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function.

void gli::transform | ( | texture2d & | Out,
|  | texture2d const & | In0,
|  | texture2d const & | In1,
|  | typename transform_func< vec_type >::type | TexelFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  Out | Output texture.
  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function.

void gli::transform | ( | texture2d_array & | Out,
|  | texture2d_array const & | In0,
|  | texture2d_array const & | In1,
|  | typename transform_func< vec_type >::type | TexelFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  Out | Output texture.
  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function.

void gli::transform | ( | texture3d & | Out,
|  | texture3d const & | In0,
|  | texture3d const & | In1,
|  | typename transform_func< vec_type >::type | TexelFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  Out | Output texture.
  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function.

void gli::transform | ( | texture_cube & | Out,
|  | texture_cube const & | In0,
|  | texture_cube const & | In1,
|  | typename transform_func< vec_type >::type | TexelFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  Out | Output texture.
  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function.

void gli::transform | ( | texture_cube_array & | Out,
|  | texture_cube_array const & | In0,
|  | texture_cube_array const & | In1,
|  | typename transform_func< vec_type >::type | TexelFunc
| ) |  |

Compute per-texel operations using a user defined function.

Parameters

  Out | Output texture.
  In0 | First input texture.
  In1 | Second input texture.
  TexelFunc | Pointer to a binary function.

texture gli::view | ( | texType const & | Texture,
|  | format | Format
| ) |  |

Create a texture view of an existing texture, sharing the same memory storage but a different format.

The format must be a compatible format, a format which block size match the original format.