KImgIO
dds.cpp File Reference
#include "dds.h"#include <QtCore/QStringList>#include <QtGui/QImage>#include <QtCore/QDataStream>#include <kglobal.h>#include <kdebug.h>#include <math.h>Go to the source code of this file.
Defines | |
| #define | CUBE_LAYOUT HORIZONTAL |
| #define | HORIZONTAL 1 |
| #define | MAKEFOURCC(ch0, ch1, ch2, ch3) |
| #define | sqrtf(x) ((float)sqrt(x)) |
| #define | VERTICAL 2 |
Typedefs | |
| typedef bool(* | TextureLoader )(QDataStream &s, const DDSHeader &header, QImage &img) |
| typedef quint8 | uchar |
| typedef quint32 | uint |
| typedef quint16 | ushort |
Enumerations | |
| enum | DDSType { DDS_A8R8G8B8 = 0, DDS_A1R5G5B5 = 1, DDS_A4R4G4B4 = 2, DDS_R8G8B8 = 3, DDS_R5G6B5 = 4, DDS_DXT1 = 5, DDS_DXT2 = 6, DDS_DXT3 = 7, DDS_DXT4 = 8, DDS_DXT5 = 9, DDS_RXGB = 10, DDS_ATI2 = 11, DDS_UNKNOWN } |
Functions | |
| static int | FaceOffset (const DDSHeader &header) |
| static TextureLoader | GetTextureLoader (DDSType type) |
| static DDSType | GetType (const DDSHeader &header) |
| static bool | HasAlpha (const DDSHeader &header) |
| static bool | IsCubeMap (const DDSHeader &header) |
| static bool | IsSupported (const DDSHeader &header) |
| static bool | IsValid (const DDSHeader &header) |
| static bool | LoadA1R5G5B5 (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadA4R4G4B4 (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadA8R8G8B8 (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadATI2 (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadCubeMap (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadDXT1 (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadDXT2 (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadDXT3 (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadDXT4 (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadDXT5 (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadR5G6B5 (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadR8G8B8 (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadRXGB (QDataStream &s, const DDSHeader &header, QImage &img) |
| static bool | LoadTexture (QDataStream &s, const DDSHeader &header, QImage &img) |
| static QDataStream & | operator>> (QDataStream &s, BlockDXTAlphaLinear &c) |
| static QDataStream & | operator>> (QDataStream &s, BlockDXTAlphaExplicit &c) |
| static QDataStream & | operator>> (QDataStream &s, BlockDXT &c) |
| static QDataStream & | operator>> (QDataStream &s, Color565 &c) |
| static QDataStream & | operator>> (QDataStream &s, DDSHeader &header) |
| static QDataStream & | operator>> (QDataStream &s, DDSCaps &caps) |
| static QDataStream & | operator>> (QDataStream &s, DDSPixelFormat &pf) |
Variables | |
| static const uint | DDPF_ALPHAPIXELS = 0x00000001l |
| static const uint | DDPF_FOURCC = 0x00000004l |
| static const uint | DDPF_RGB = 0x00000040l |
| static const uint | DDSCAPS2_CUBEMAP = 0x00000200l |
| static const uint | DDSCAPS2_CUBEMAP_NEGATIVEX = 0x00000800l |
| static const uint | DDSCAPS2_CUBEMAP_NEGATIVEY = 0x00002000l |
| static const uint | DDSCAPS2_CUBEMAP_NEGATIVEZ = 0x00008000l |
| static const uint | DDSCAPS2_CUBEMAP_POSITIVEX = 0x00000400l |
| static const uint | DDSCAPS2_CUBEMAP_POSITIVEY = 0x00001000l |
| static const uint | DDSCAPS2_CUBEMAP_POSITIVEZ = 0x00004000l |
| static const uint | DDSCAPS2_VOLUME = 0x00200000l |
| static const uint | DDSCAPS_TEXTURE = 0x00001000l |
| static const uint | DDSD_CAPS = 0x00000001l |
| static const uint | DDSD_HEIGHT = 0x00000002l |
| static const uint | DDSD_PITCH = 0x00000008l |
| static const uint | DDSD_PIXELFORMAT = 0x00001000l |
| static const uint | DDSD_WIDTH = 0x00000004l |
| static int | face_flags [6] |
| static int | face_offset [6][2] = { {2, 1}, {0, 1}, {1, 0}, {1, 2}, {1, 1}, {3, 1} } |
| static const uint | FOURCC_ATI2 = MAKEFOURCC('A', 'T', 'I', '2') |
| static const uint | FOURCC_DDS = MAKEFOURCC('D', 'D', 'S', ' ') |
| static const uint | FOURCC_DXT1 = MAKEFOURCC('D', 'X', 'T', '1') |
| static const uint | FOURCC_DXT2 = MAKEFOURCC('D', 'X', 'T', '2') |
| static const uint | FOURCC_DXT3 = MAKEFOURCC('D', 'X', 'T', '3') |
| static const uint | FOURCC_DXT4 = MAKEFOURCC('D', 'X', 'T', '4') |
| static const uint | FOURCC_DXT5 = MAKEFOURCC('D', 'X', 'T', '5') |
| static const uint | FOURCC_RXGB = MAKEFOURCC('R', 'X', 'G', 'B') |
Define Documentation
| #define MAKEFOURCC | ( | ch0, | |||
| ch1, | |||||
| ch2, | |||||
| ch3 | ) |
Typedef Documentation
| typedef bool(* TextureLoader)(QDataStream &s, const DDSHeader &header, QImage &img) |
Enumeration Type Documentation
| enum DDSType |
Function Documentation
| static TextureLoader GetTextureLoader | ( | DDSType | type | ) | [static] |
| static DDSType GetType | ( | const DDSHeader & | header | ) | [static] |
| static bool IsSupported | ( | const DDSHeader & | header | ) | [static] |
| static bool LoadA1R5G5B5 | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadA4R4G4B4 | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadA8R8G8B8 | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadATI2 | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadCubeMap | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadDXT1 | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadDXT2 | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadDXT3 | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadDXT4 | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadDXT5 | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadR5G6B5 | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadR8G8B8 | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadRXGB | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static bool LoadTexture | ( | QDataStream & | s, | |
| const DDSHeader & | header, | |||
| QImage & | img | |||
| ) | [static] |
| static QDataStream& operator>> | ( | QDataStream & | s, | |
| BlockDXTAlphaLinear & | c | |||
| ) | [static] |
| static QDataStream& operator>> | ( | QDataStream & | s, | |
| BlockDXTAlphaExplicit & | c | |||
| ) | [static] |
| static QDataStream& operator>> | ( | QDataStream & | s, | |
| BlockDXT & | c | |||
| ) | [static] |
| static QDataStream& operator>> | ( | QDataStream & | s, | |
| Color565 & | c | |||
| ) | [static] |
| static QDataStream& operator>> | ( | QDataStream & | s, | |
| DDSHeader & | header | |||
| ) | [static] |
| static QDataStream& operator>> | ( | QDataStream & | s, | |
| DDSCaps & | caps | |||
| ) | [static] |
| static QDataStream& operator>> | ( | QDataStream & | s, | |
| DDSPixelFormat & | pf | |||
| ) | [static] |
Variable Documentation
const uint DDPF_ALPHAPIXELS = 0x00000001l [static] |
const uint DDPF_FOURCC = 0x00000004l [static] |
const uint DDSCAPS2_CUBEMAP = 0x00000200l [static] |
const uint DDSCAPS2_CUBEMAP_NEGATIVEX = 0x00000800l [static] |
const uint DDSCAPS2_CUBEMAP_NEGATIVEY = 0x00002000l [static] |
const uint DDSCAPS2_CUBEMAP_NEGATIVEZ = 0x00008000l [static] |
const uint DDSCAPS2_CUBEMAP_POSITIVEX = 0x00000400l [static] |
const uint DDSCAPS2_CUBEMAP_POSITIVEY = 0x00001000l [static] |
const uint DDSCAPS2_CUBEMAP_POSITIVEZ = 0x00004000l [static] |
const uint DDSCAPS2_VOLUME = 0x00200000l [static] |
const uint DDSCAPS_TEXTURE = 0x00001000l [static] |
const uint DDSD_HEIGHT = 0x00000002l [static] |
const uint DDSD_PITCH = 0x00000008l [static] |
const uint DDSD_PIXELFORMAT = 0x00001000l [static] |
const uint DDSD_WIDTH = 0x00000004l [static] |
int face_flags[6] [static] |
int face_offset[6][2] = { {2, 1}, {0, 1}, {1, 0}, {1, 2}, {1, 1}, {3, 1} } [static] |
const uint FOURCC_ATI2 = MAKEFOURCC('A', 'T', 'I', '2') [static] |
const uint FOURCC_DDS = MAKEFOURCC('D', 'D', 'S', ' ') [static] |
const uint FOURCC_DXT1 = MAKEFOURCC('D', 'X', 'T', '1') [static] |
const uint FOURCC_DXT2 = MAKEFOURCC('D', 'X', 'T', '2') [static] |
const uint FOURCC_DXT3 = MAKEFOURCC('D', 'X', 'T', '3') [static] |
const uint FOURCC_DXT4 = MAKEFOURCC('D', 'X', 'T', '4') [static] |
const uint FOURCC_DXT5 = MAKEFOURCC('D', 'X', 'T', '5') [static] |
const uint FOURCC_RXGB = MAKEFOURCC('R', 'X', 'G', 'B') [static] |
KDE 4.3 API Reference