#include <TextureUtils.h>
Public Member Functions | |
Image (const char *path=NULL) | |
~Image () | |
void | setHeight (unsigned short) |
void | setWidth (unsigned short) |
void | setDepth (unsigned short) |
void | setFormat (unsigned int) |
void | setDataBuffer (const unsigned char *) |
void | flipVertically () |
void | setInternalFormat (unsigned int) |
void | setComponentsCount (unsigned int) |
bool | load (const char *) |
const std::string & | getPath () const |
const unsigned int | getComponentsCount () const |
const unsigned int | getInternalFormat () const |
const unsigned char * | getDataBuffer () const |
const unsigned int | getFormat () const |
const unsigned short | getHeight () const |
const unsigned short | getWidth () const |
const unsigned short | getDepth () const |
Static Public Member Functions | |
static bool | isDDSVolume (const char *filename) |
static bool | isDDSCube (const char *filename) |
Private Member Functions | |
bool | loadTGA (const char *filename) |
bool | loadUncompressed8BitTGA (const char *filename) |
bool | loadCompressedTrueColorTGA (const char *filename) |
bool | loadUncompressedTrueColorTGA (const char *filename) |
bool | loadPPM (const char *filename) |
bool | loadJPG (const char *filename) |
void | getJPGInfo () |
int | decodeScanJPG () |
int | decodeJPG () |
Private Attributes | |
std::string | path |
unsigned char * | dataBuffer |
unsigned int | internalFormat |
unsigned int | components |
unsigned int | format |
unsigned short | height |
unsigned short | width |
unsigned short | depth |
Definition at line 131 of file TextureUtils.h.
Image::Image | ( | const char * | path = NULL |
) |
Definition at line 1118 of file TextureUtils.cpp.
References components, dataBuffer, depth, format, height, internalFormat, load(), and width.
Image::~Image | ( | ) |
bool Image::loadTGA | ( | const char * | filename | ) | [private] |
Definition at line 2090 of file TextureUtils.cpp.
References loadCompressedTrueColorTGA(), loadUncompressed8BitTGA(), loadUncompressedTrueColorTGA(), and Logger::writeErrorLog().
Referenced by load().
bool Image::loadUncompressed8BitTGA | ( | const char * | filename | ) | [private] |
Definition at line 2126 of file TextureUtils.cpp.
References dataBuffer, deleteArray, height, setComponentsCount(), setFormat(), setHeight(), setInternalFormat(), setWidth(), width, and Logger::writeErrorLog().
Referenced by loadTGA().
bool Image::loadCompressedTrueColorTGA | ( | const char * | filename | ) | [private] |
Definition at line 2270 of file TextureUtils.cpp.
References dataBuffer, deleteArray, getComponentsCount(), height, setComponentsCount(), setFormat(), setHeight(), setInternalFormat(), setWidth(), width, and Logger::writeErrorLog().
Referenced by loadTGA().
bool Image::loadUncompressedTrueColorTGA | ( | const char * | filename | ) | [private] |
Definition at line 2207 of file TextureUtils.cpp.
References dataBuffer, deleteArray, getComponentsCount(), GL_BGR, GL_BGRA, height, setComponentsCount(), setFormat(), setHeight(), setInternalFormat(), setWidth(), width, and Logger::writeErrorLog().
Referenced by loadTGA().
bool Image::loadPPM | ( | const char * | filename | ) | [private] |
Definition at line 2023 of file TextureUtils.cpp.
References deleteArray, setComponentsCount(), setDataBuffer(), setFormat(), setHeight(), setInternalFormat(), setWidth(), and Logger::writeErrorLog().
Referenced by load().
bool Image::loadJPG | ( | const char * | filename | ) | [private] |
Definition at line 1957 of file TextureUtils.cpp.
References decodeJPG(), fileClose(), fileOpen(), and flipVertically().
Referenced by load().
void Image::getJPGInfo | ( | ) | [private] |
Definition at line 1414 of file TextureUtils.cpp.
References getByte(), height, and width.
Referenced by decodeJPG().
int Image::decodeScanJPG | ( | ) | [private] |
Definition at line 1729 of file TextureUtils.cpp.
References components, dataBuffer, decodeBlock(), deleteArray, getByte(), GL_BGR, height, max, min, setFormat(), setInternalFormat(), strmSkip(), width, and wordDec().
Referenced by decodeJPG().
int Image::decodeJPG | ( | ) | [private] |
Definition at line 1867 of file TextureUtils.cpp.
References decodeHuffTable(), decodeQTable(), decodeScanJPG(), getByte(), and getJPGInfo().
Referenced by loadJPG().
static bool Image::isDDSVolume | ( | const char * | filename | ) | [static] |
static bool Image::isDDSCube | ( | const char * | filename | ) | [static] |
void Image::setHeight | ( | unsigned short | h | ) |
Definition at line 1137 of file TextureUtils.cpp.
References height.
Referenced by loadCompressedTrueColorTGA(), loadPPM(), loadUncompressed8BitTGA(), and loadUncompressedTrueColorTGA().
void Image::setWidth | ( | unsigned short | w | ) |
Definition at line 1132 of file TextureUtils.cpp.
References width.
Referenced by loadCompressedTrueColorTGA(), loadPPM(), loadUncompressed8BitTGA(), and loadUncompressedTrueColorTGA().
void Image::setDepth | ( | unsigned | short | ) |
void Image::setFormat | ( | unsigned int | f | ) |
Definition at line 1153 of file TextureUtils.cpp.
References format.
Referenced by decodeScanJPG(), loadCompressedTrueColorTGA(), loadPPM(), loadUncompressed8BitTGA(), and loadUncompressedTrueColorTGA().
void Image::setDataBuffer | ( | const unsigned char * | buffer | ) |
Definition at line 1141 of file TextureUtils.cpp.
References components, dataBuffer, deleteArray, height, and width.
Referenced by flipVertically(), and loadPPM().
void Image::flipVertically | ( | ) |
Definition at line 1168 of file TextureUtils.cpp.
References components, dataBuffer, deleteArray, depth, height, setDataBuffer(), and width.
Referenced by loadJPG().
void Image::setInternalFormat | ( | unsigned int | iformat | ) |
Definition at line 1158 of file TextureUtils.cpp.
References internalFormat.
Referenced by decodeScanJPG(), loadCompressedTrueColorTGA(), loadPPM(), loadUncompressed8BitTGA(), and loadUncompressedTrueColorTGA().
void Image::setComponentsCount | ( | unsigned int | c | ) |
Definition at line 1163 of file TextureUtils.cpp.
References components.
Referenced by loadCompressedTrueColorTGA(), loadPPM(), loadUncompressed8BitTGA(), and loadUncompressedTrueColorTGA().
bool Image::load | ( | const char * | path_ | ) |
Definition at line 1213 of file TextureUtils.cpp.
References loadJPG(), loadPPM(), loadTGA(), MediaPathManager::lookUpMediaPath(), and path.
Referenced by Image(), and Texture::load2D().
const std::string & Image::getPath | ( | ) | const |
Definition at line 1246 of file TextureUtils.cpp.
References path.
Referenced by Texture::load2DImage().
const unsigned int Image::getComponentsCount | ( | ) | const |
Definition at line 1242 of file TextureUtils.cpp.
References components.
Referenced by loadCompressedTrueColorTGA(), and loadUncompressedTrueColorTGA().
const unsigned int Image::getInternalFormat | ( | ) | const |
Definition at line 1243 of file TextureUtils.cpp.
References internalFormat.
Referenced by Texture::loadTextureFace().
const unsigned char * Image::getDataBuffer | ( | ) | const |
Definition at line 1244 of file TextureUtils.cpp.
References dataBuffer.
Referenced by Texture::loadTextureFace().
const unsigned int Image::getFormat | ( | ) | const |
Definition at line 1245 of file TextureUtils.cpp.
References format.
Referenced by Texture::loadTextureFace().
const unsigned short Image::getHeight | ( | ) | const |
Definition at line 1248 of file TextureUtils.cpp.
References height.
Referenced by Texture::load2DImage(), and Texture::loadTextureFace().
const unsigned short Image::getWidth | ( | ) | const |
Definition at line 1249 of file TextureUtils.cpp.
References width.
Referenced by Texture::load2DImage(), and Texture::loadTextureFace().
const unsigned short Image::getDepth | ( | ) | const |
std::string Image::path [private] |
unsigned char* Image::dataBuffer [private] |
Definition at line 135 of file TextureUtils.h.
Referenced by decodeScanJPG(), flipVertically(), getDataBuffer(), Image(), loadCompressedTrueColorTGA(), loadUncompressed8BitTGA(), loadUncompressedTrueColorTGA(), setDataBuffer(), and ~Image().
unsigned int Image::internalFormat [private] |
Definition at line 136 of file TextureUtils.h.
Referenced by getInternalFormat(), Image(), and setInternalFormat().
unsigned int Image::components [private] |
Definition at line 136 of file TextureUtils.h.
Referenced by decodeScanJPG(), flipVertically(), getComponentsCount(), Image(), setComponentsCount(), and setDataBuffer().
unsigned int Image::format [private] |
unsigned short Image::height [private] |
Definition at line 140 of file TextureUtils.h.
Referenced by decodeScanJPG(), flipVertically(), getHeight(), getJPGInfo(), Image(), loadCompressedTrueColorTGA(), loadUncompressed8BitTGA(), loadUncompressedTrueColorTGA(), setDataBuffer(), and setHeight().
unsigned short Image::width [private] |
Definition at line 140 of file TextureUtils.h.
Referenced by decodeScanJPG(), flipVertically(), getJPGInfo(), getWidth(), Image(), loadCompressedTrueColorTGA(), loadUncompressed8BitTGA(), loadUncompressedTrueColorTGA(), setDataBuffer(), and setWidth().
unsigned short Image::depth [private] |
Definition at line 140 of file TextureUtils.h.
Referenced by flipVertically(), getDepth(), and Image().