|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Types | |
| typedef AtlasChunk | Parent |
| FormatJPEG | |
| Use (lossy) JPEG compression. | |
| FormatPNG | |
| Use (lossless) PNG compression. | |
| FormatDDS | |
| Use (fast-to-load, big, lossy) DDS with DXT compression. | |
| enum | TexFormat { FormatJPEG, FormatPNG, FormatDDS } |
Public Member Functions | |
| AtlasTexChunk () | |
| ~AtlasTexChunk () | |
| virtual void | read (Stream *s) |
| Deserialize from a stream. | |
| virtual void | write (Stream *s) |
| Serialize this chunk to a stream. | |
| virtual U32 | getHeadSentinel () |
| virtual U32 | getTailSentinel () |
| virtual void | process () |
| Once the chunk has been loaded (in another thread), this is called in the main thread to prepare any complex resources. | |
| void | generate (AtlasChunk *children[4]) |
| Given four children, (re)generate the data for this one. | |
| const bool | isBitmapTexFormat (const TexFormat f) const |
| AtlasTexChunk * | generateCopy (S32 reformat=-1) |
Static Public Member Functions | |
| static GBitmap * | loadDDSIntoGBitmap (const U8 *ddsBuffer, U32 ddsBufferSize) |
Public Attributes | |
| TexFormat | mFormat |
| U8 | layerCount |
| If we're storing opacity map data there may be more than one layer worth of image data. | |
| GBitmap * | bitmap |
| DDSFile * | dds |
Private Member Functions | |
| void | writeDDS (Stream *s) |
| typedef AtlasChunk AtlasTexChunk::Parent |
| AtlasTexChunk::AtlasTexChunk | ( | ) |
| AtlasTexChunk::~AtlasTexChunk | ( | ) |
Deserialize from a stream.
Reimplemented from AtlasChunk.
Serialize this chunk to a stream.
Reimplemented from AtlasChunk.
| virtual U32 AtlasTexChunk::getHeadSentinel | ( | ) | [virtual] |
Reimplemented from AtlasChunk.
| virtual U32 AtlasTexChunk::getTailSentinel | ( | ) | [virtual] |
Reimplemented from AtlasChunk.
| virtual void AtlasTexChunk::process | ( | ) | [virtual] |
Once the chunk has been loaded (in another thread), this is called in the main thread to prepare any complex resources.
(For instance, a texture or VB, that depend on access to GFX to initialize.)
Reimplemented from AtlasChunk.
| void AtlasTexChunk::generate | ( | AtlasChunk * | children[4] | ) | [virtual] |
Given four children, (re)generate the data for this one.
Their order starts at topleft, clockwise, 0123.
Reimplemented from AtlasChunk.
| AtlasTexChunk* AtlasTexChunk::generateCopy | ( | S32 | reformat = -1 |
) |
| static GBitmap* AtlasTexChunk::loadDDSIntoGBitmap | ( | const U8 * | ddsBuffer, | |
| U32 | ddsBufferSize | |||
| ) | [static] |
If we're storing opacity map data there may be more than one layer worth of image data.
(e.g. we have 10 channels of opacity data and PNG only supports 4 channels/image, so we'd have to have 3 layers).
TOC versions prior than 150 only support a layerCount of 1.