#include <gfx_targa.hh>
Public Member Functions | |
| Targa (SafePtr< const uint8 > ibuf, uint ibufLen, TargaFilterFuncType filterFunc=DefaultTargaFilterFunc) | |
| ~Targa () | |
| bool | IfValid (void) const |
| bool | HasAlpha (void) const |
| uint | GetWidth (void) const |
| uint | GetHeight (void) const |
| uint8 * | GetBuf (void) |
| const uint8 * | GetConstBuf (void) const |
| uint | GetBufLen (void) const |
| uint | GetColorLen (void) const |
| uint8 | ReadBuf (uint i) const |
| void | WriteBuf (uint i, uint8 c) |
Private Attributes | |
| uint | mWidth |
| uint | mHeight |
| uint8 * | mBuf |
| uint | mBufLen |
| bool | mHasAlpha |
Construct Targa object from buffer containing a TGA file (ibuf).
To reduce texture memory use, Targa::IfAlpha() can be used to create a RGB Texture object that is 75% of an full RGBA one.
Old Targa C code always outputs full RGBA (inefficient but beneficial): Trying to optimize the old Targa code to produce smaller output would be very difficult. And another problem is that clients of Targa (Font and Texture) have become dependent on it producing full RGBA despite the Targa header indicating RGB or gray-scale.
| gfx::Targa::Targa | ( | SafePtr< const uint8 > | ibuf, | |
| uint | ibufLen, | |||
| TargaFilterFuncType | filterFunc = DefaultTargaFilterFunc | |||
| ) |
| gfx::Targa::~Targa | ( | ) |
| bool gfx::Targa::IfValid | ( | void | ) | const [inline] |
| bool gfx::Targa::HasAlpha | ( | void | ) | const [inline] |
| uint gfx::Targa::GetWidth | ( | void | ) | const [inline] |
| uint gfx::Targa::GetHeight | ( | void | ) | const [inline] |
| uint8* gfx::Targa::GetBuf | ( | void | ) | [inline] |
| const uint8* gfx::Targa::GetConstBuf | ( | void | ) | const [inline] |
| uint gfx::Targa::GetBufLen | ( | void | ) | const [inline] |
| uint gfx::Targa::GetColorLen | ( | void | ) | const [inline] |
| uint8 gfx::Targa::ReadBuf | ( | uint | i | ) | const [inline] |
| void gfx::Targa::WriteBuf | ( | uint | i, | |
| uint8 | c | |||
| ) | [inline] |
uint gfx::Targa::mWidth [private] |
uint gfx::Targa::mHeight [private] |
uint8* gfx::Targa::mBuf [private] |
uint gfx::Targa::mBufLen [private] |
bool gfx::Targa::mHasAlpha [private] |
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:28 2007