| 0.8.2 API documentation

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
image Class Reference

Image, representation for a single texture level. More...

## Public Member Functions
void | clear ()
| Clear the entire image storage_linear with zeros.
template<typename genType >
void | clear (genType const &Texel)
| Clear the entire image storage_linear with Texel which type must match the image storage_linear format block size If the type of genType doesn't match the type of the image format, no conversion is performed and the data will be reinterpreted as if is was of the image format. More...
void * | data ()
| Return a pointer to the beginning of the image instance data.
void const * | data () const
| Return a pointer to the beginning of the image instance data.
template<typename genType >
genType * | data ()
| Return a pointer of type genType which size must match the image format block size.
template<typename genType >
genType const * | data () const
| Return a pointer of type genType which size must match the image format block size.
bool | empty () const
| Return whether the image instance is empty, no storage_linear or description have been assigned to the instance.
extent_type | extent () const
| Return the dimensions of an image instance: width, height and depth.
format_type | format () const
| Return the image instance format.
| image ()
| Create an empty image instance.
| image (format_type Format, extent_type const &Extent)
| Create an image object and allocate an image storoge for it.
| image (image const &Image, format_type Format)
| Create an image object by sharing an existing image storage_linear from another image instance. More...
template<typename genType >
genType | load (extent_type const &TexelCoord)
| Load the texel located at TexelCoord coordinates. More...
size_type | size () const
| Return the memory size of an image instance storage_linear in bytes.
template<typename genType >
size_type | size () const
| Return the number of blocks contained in an image instance storage_linear. More...
template<typename genType >
void | store (extent_type const &TexelCoord, genType const &Data)
| Store the texel located at TexelCoord coordinates. More...

## Detailed Description

Image, representation for a single texture level.

Definition at line 11 of file image.hpp.

## Constructor & Destructor Documentation

image | ( | image const & | Image,
|  | format_type | Format
| ) |  |
| explicit

Create an image object by sharing an existing image storage_linear from another image instance.

This image object is effectively an image view where format can be reinterpreted with a different compatible image format. For formats to be compatible, the block size of source and destination must match.

## Member Function Documentation

void clear | ( | genType const & | Texel | ) |

Clear the entire image storage_linear with Texel which type must match the image storage_linear format block size If the type of genType doesn't match the type of the image format, no conversion is performed and the data will be reinterpreted as if is was of the image format.

genType load | ( | extent_type const & | TexelCoord | ) |

Load the texel located at TexelCoord coordinates.

It's an error to call this function if the format is compressed. It's an error if TexelCoord values aren't between [0, dimensions].

size_type size | ( |  | ) | const

Return the number of blocks contained in an image instance storage_linear.

genType size must match the block size conresponding to the image format.

void store | ( | extent_type const & | TexelCoord,
|  | genType const & | Data
| ) |  |

Store the texel located at TexelCoord coordinates.

It's an error to call this function if the format is compressed. It's an error if TexelCoord values aren't between [0, dimensions].