| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/image/compressedimage.h>

Public Types | |
| enum | Compression { R5G6B5_S3TC = 0, R5G6B5A1_S3TC, R5G6B5A8_S3TC, R3G3B2, R5G6B5, R5G5B5A1, R4G4B4A4, B5G5R5A1 } |
Public Member Functions | |
| VRS_SERIALIZABLE_CLASS_ENUM (Compression) | |
| supported compression types | |
| CompressedImage (DataResource *data) | |
| CompressedImage (unsigned int sizeX, unsigned int sizeY, Compression compression) | |
| CompressedImage (Compression compression, Image *source, const std::string &filename="") | |
| virtual int | width () const |
| virtual int | height () const |
| See Image. | |
| virtual void * | pixelComponents (int x, int y, int component=0) const |
| See Image. | |
| virtual Image::MemoryLayout | memoryLayout () const |
| virtual int | alignment () const |
| virtual int | padding () const |
| Returns the number of unused bytes at the end of each line. | |
| CompressedImage::Compression | compression () const |
| GLenum | internalFormat () const |
| GLenum | imageFormat () const |
| GLenum | pixelFormat () const |
| for OpenGL only | |
| virtual int | dataSize () const |
| Size of the compressed data. | |
| virtual int | bitsPerPixel () const |
| Returns the number of bits used for one pixel. | |
| virtual DataResource * | rawData () const |
| virtual SO< Image > | uncompressed (bool storeReference=false) const |
| Returns an uncompressed image from this compressed image. | |
| virtual bool | flipY () const |
| virtual void | flipY (bool yesNo) |
| VRS_TYPEINFO (CompressedImage, Image) | |
| VRS_SERIALIZABLE (CompressedImage) | |
Protected Member Functions | |
| CompressedImage () | |
| VRS::CompressedImage::CompressedImage | ( | DataResource * | data | ) |
| VRS::CompressedImage::CompressedImage | ( | unsigned int | sizeX, | |
| unsigned int | sizeY, | |||
| Compression | compression | |||
| ) |
| VRS::CompressedImage::CompressedImage | ( | Compression | compression, | |
| Image * | source, | |||
| const std::string & | filename = "" | |||
| ) |
The CompressedImage can be used to reduce texture memory transfer for OpenGL appications. The S3TC compression must be supported by the graphics hardware (e.g., GeForce). The compression R3G3B2 and R5G6B5 need the OpenGL packed pixel extension. The TextureGL object recognizes the image type and sets the correct memorylayout, alignment, padding ... At this moment, compressed images cannot be uncompressed into regular images again. If a filename is given the image is stored under that filename in the filesystem.
| VRS::CompressedImage::CompressedImage | ( | ) | [protected] |
| VRS::CompressedImage::VRS_SERIALIZABLE_CLASS_ENUM | ( | Compression | ) |
supported compression types
| virtual int VRS::CompressedImage::width | ( | ) | const [virtual] |
Implements VRS::Image.
| virtual int VRS::CompressedImage::height | ( | ) | const [virtual] |
| virtual void* VRS::CompressedImage::pixelComponents | ( | int | x, | |
| int | y, | |||
| int | component = 0 | |||
| ) | const [virtual] |
| virtual Image::MemoryLayout VRS::CompressedImage::memoryLayout | ( | ) | const [virtual] |
Returns the the internal memory layout of the image. Increasing: lineComponents(i + 1) > lineComponents(i) Decreasing: lineComponents(i + 1) < lineComponents(i)
Reimplemented from VRS::Image.
| virtual int VRS::CompressedImage::alignment | ( | ) | const [virtual] |
Returns the alignment of one scan line of the image. An alignment of 1 means no alignment (can be 1, 2, 4 or 8).
Reimplemented from VRS::Image.
| virtual int VRS::CompressedImage::padding | ( | ) | const [virtual] |
| CompressedImage::Compression VRS::CompressedImage::compression | ( | ) | const |
| GLenum VRS::CompressedImage::internalFormat | ( | ) | const |
| GLenum VRS::CompressedImage::imageFormat | ( | ) | const |
| GLenum VRS::CompressedImage::pixelFormat | ( | ) | const |
for OpenGL only
| virtual int VRS::CompressedImage::dataSize | ( | ) | const [virtual] |
Size of the compressed data.
| virtual int VRS::CompressedImage::bitsPerPixel | ( | ) | const [virtual] |
| virtual DataResource* VRS::CompressedImage::rawData | ( | ) | const [virtual] |
| virtual bool VRS::CompressedImage::flipY | ( | ) | const [inline, virtual] |
| virtual void VRS::CompressedImage::flipY | ( | bool | yesNo | ) | [inline, virtual] |
| VRS::CompressedImage::VRS_TYPEINFO | ( | CompressedImage | , | |
| Image | ||||
| ) |
| VRS::CompressedImage::VRS_SERIALIZABLE | ( | CompressedImage | ) |