Go to the documentation of this file.00001
00003 struct Pixel
00004 {
00005 union
00006 {
00007 struct { uchar r,g,b,a; };
00008 uchar canal[4];
00009 };
00010 };
00011
00014 struct MipMap
00015 {
00016 int width, height;
00017 Pixel* data;
00018 };
00019
00022 struct TextureData
00023 {
00024 TextureData();
00025 ~TextureData();
00026 int mipmapsColor;
00027 int mipmapsDetail;
00028 MipMap* color;
00029 MipMap* detail;
00030 };
00031
00032 typedef TextureData* pTextureData;
00033
00037 bool loadTextureData(const wchar* colorFilename, const wchar* normalFilename, const wchar* heightFilename, TextureData& out);
00038
00040 bool loadTGA(const wchar* filename, int& width, int& height, Pixel** outData);
00042 bool loadBMP(const wchar* filename, int& width, int& height, Pixel** outData);
00043 uint myShiftRightByMask(uint Color, uint Mask, uint DistributeToBits = 8);
00044 bool myLoadUncompressedTGA(int& width, int& height, Pixel** outData, FILE * datei);
00045 bool myLoadCompressedTGA(int& width, int& height, Pixel** outData, FILE * datei);