Blender V2.61 - r43446
|
DirectDraw Surface. (DDS) More...
#include <DirectDrawSurface.h>
Public Member Functions | |
DirectDrawSurface (unsigned char *mem, uint size) | |
~DirectDrawSurface () | |
bool | isValid () const |
bool | isSupported () const |
bool | hasAlpha () const |
uint | mipmapCount () const |
uint | width () const |
uint | height () const |
uint | depth () const |
bool | isTexture1D () const |
bool | isTexture2D () const |
bool | isTexture3D () const |
bool | isTextureCube () const |
void | setNormalFlag (bool b) |
void | setHasAlphaFlag (bool b) |
void | setUserVersion (int version) |
void | mipmap (Image *img, uint f, uint m) |
void | printInfo () const |
DirectDraw Surface. (DDS)
Definition at line 149 of file DirectDrawSurface.h.
DirectDrawSurface::DirectDrawSurface | ( | unsigned char * | mem, |
uint | size | ||
) |
Definition at line 880 of file DirectDrawSurface.cpp.
References DDSPixelFormat::fourcc, FOURCC_ATI2, mem_read(), DDSHeader::pf, and DDSHeader::setNormalFlag().
DirectDrawSurface::~DirectDrawSurface | ( | ) |
Definition at line 890 of file DirectDrawSurface.cpp.
uint DirectDrawSurface::depth | ( | ) | const |
Definition at line 1032 of file DirectDrawSurface.cpp.
References DDSD_DEPTH, DDSHeader::depth, and DDSHeader::flags.
bool DirectDrawSurface::hasAlpha | ( | ) | const |
Definition at line 977 of file DirectDrawSurface.cpp.
References DDSPixelFormat::amask, DDPF_FOURCC, DDPF_NORMAL, DDPF_RGB, DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_BC2_UNORM, DXGI_FORMAT_BC3_UNORM, DDSHeader10::dxgiFormat, DDSPixelFormat::flags, DDSPixelFormat::fourcc, FOURCC_ATI1, FOURCC_ATI2, FOURCC_RXGB, DDSHeader::hasDX10Header(), DDSHeader::header10, and DDSHeader::pf.
Referenced by mipmap().
uint DirectDrawSurface::height | ( | ) | const |
Definition at line 1026 of file DirectDrawSurface.cpp.
References DDSD_HEIGHT, DDSHeader::flags, and DDSHeader::height.
Referenced by imb_load_dds(), and mipmap().
bool DirectDrawSurface::isSupported | ( | ) | const |
Definition at line 920 of file DirectDrawSurface.cpp.
References DDSHeader::caps, DDSCaps::caps2, DDPF_FOURCC, DDPF_LUMINANCE, DDPF_RGB, DDSCAPS2_CUBEMAP_ALL_FACES, DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_BC2_UNORM, DXGI_FORMAT_BC3_UNORM, DXGI_FORMAT_BC4_UNORM, DXGI_FORMAT_BC5_UNORM, DDSHeader10::dxgiFormat, DDSPixelFormat::flags, DDSPixelFormat::fourcc, FOURCC_ATI1, FOURCC_ATI2, FOURCC_DXT1, FOURCC_DXT2, FOURCC_DXT3, FOURCC_DXT4, FOURCC_DXT5, FOURCC_RXGB, DDSHeader::hasDX10Header(), DDSHeader::header10, isTexture3D(), isTextureCube(), and DDSHeader::pf.
Referenced by imb_load_dds().
bool DirectDrawSurface::isTexture1D | ( | ) | const |
Definition at line 1038 of file DirectDrawSurface.cpp.
References D3D10_RESOURCE_DIMENSION_TEXTURE1D, DDSHeader::hasDX10Header(), DDSHeader::header10, and DDSHeader10::resourceDimension.
bool DirectDrawSurface::isTexture2D | ( | ) | const |
Definition at line 1047 of file DirectDrawSurface.cpp.
References D3D10_RESOURCE_DIMENSION_TEXTURE2D, DDSHeader::hasDX10Header(), DDSHeader::header10, isTexture3D(), isTextureCube(), and DDSHeader10::resourceDimension.
bool DirectDrawSurface::isTexture3D | ( | ) | const |
Definition at line 1059 of file DirectDrawSurface.cpp.
References DDSHeader::caps, DDSCaps::caps2, D3D10_RESOURCE_DIMENSION_TEXTURE3D, DDSCAPS2_VOLUME, DDSHeader::hasDX10Header(), DDSHeader::header10, and DDSHeader10::resourceDimension.
Referenced by isSupported(), and isTexture2D().
bool DirectDrawSurface::isTextureCube | ( | ) | const |
Definition at line 1071 of file DirectDrawSurface.cpp.
References DDSHeader::caps, DDSCaps::caps2, and DDSCAPS2_CUBEMAP.
Referenced by isSupported(), and isTexture2D().
bool DirectDrawSurface::isValid | ( | ) | const |
Definition at line 894 of file DirectDrawSurface.cpp.
References DDSD_HEIGHT, DDSD_WIDTH, DDSHeader::flags, DDSHeader::fourcc, FOURCC_DDS, DDSHeader::pf, DDSPixelFormat::size, and DDSHeader::size.
Referenced by imb_load_dds().
Definition at line 1091 of file DirectDrawSurface.cpp.
References Image::allocate(), DDPF_FOURCC, DDPF_RGB, DDSPixelFormat::flags, Image::Format_ARGB, Image::Format_RGB, hasAlpha(), DDSHeader::hasDX10Header(), height(), max, DDSHeader::pf, Stream::seek(), Image::setFormat(), U, simple_enum_gen::w, and width().
Referenced by imb_load_dds().
uint DirectDrawSurface::mipmapCount | ( | ) | const |
Definition at line 1013 of file DirectDrawSurface.cpp.
References DDSD_MIPMAPCOUNT, DDSHeader::flags, and DDSHeader::mipmapcount.
void DirectDrawSurface::printInfo | ( | ) | const |
Definition at line 1415 of file DirectDrawSurface.cpp.
References DDSPixelFormat::amask, DDSHeader10::arraySize, DDSPixelFormat::bitcount, DDSPixelFormat::bmask, DDSHeader::caps, DDSCaps::caps1, DDSCaps::caps2, DDSCaps::caps3, DDSCaps::caps4, DDPF_ALPHA, DDPF_ALPHAPIXELS, DDPF_ALPHAPREMULT, DDPF_FOURCC, DDPF_LUMINANCE, DDPF_NORMAL, DDPF_PALETTEINDEXED1, DDPF_PALETTEINDEXED2, DDPF_PALETTEINDEXED4, DDPF_PALETTEINDEXED8, DDPF_RGB, DDSCAPS2_CUBEMAP, DDSCAPS2_CUBEMAP_ALL_FACES, DDSCAPS2_CUBEMAP_NEGATIVEX, DDSCAPS2_CUBEMAP_NEGATIVEY, DDSCAPS2_CUBEMAP_NEGATIVEZ, DDSCAPS2_CUBEMAP_POSITIVEX, DDSCAPS2_CUBEMAP_POSITIVEY, DDSCAPS2_CUBEMAP_POSITIVEZ, DDSCAPS2_VOLUME, DDSCAPS_COMPLEX, DDSCAPS_MIPMAP, DDSCAPS_TEXTURE, DDSD_CAPS, DDSD_DEPTH, DDSD_HEIGHT, DDSD_LINEARSIZE, DDSD_MIPMAPCOUNT, DDSD_PITCH, DDSD_PIXELFORMAT, DDSD_WIDTH, DDSHeader::depth, DDSHeader10::dxgiFormat, DDSPixelFormat::flags, DDSHeader::flags, DDSPixelFormat::fourcc, FOURCC_NVTT, FOURCC_UVER, getD3d10ResourceDimensionString(), getDxgiFormatString(), DDSPixelFormat::gmask, DDSHeader::hasDX10Header(), DDSHeader::header10, DDSHeader::height, DDSHeader::mipmapcount, DDSHeader10::miscFlag, DDSHeader::pf, DDSHeader::pitch, DDSHeader::reserved, DDSHeader10::resourceDimension, DDSPixelFormat::rmask, and DDSHeader::width.
Referenced by imb_load_dds().
void DirectDrawSurface::setHasAlphaFlag | ( | bool | b | ) |
Definition at line 1081 of file DirectDrawSurface.cpp.
References DDSHeader::setHasAlphaFlag().
void DirectDrawSurface::setNormalFlag | ( | bool | b | ) |
Definition at line 1076 of file DirectDrawSurface.cpp.
References DDSHeader::setNormalFlag().
void DirectDrawSurface::setUserVersion | ( | int | version | ) |
Definition at line 1086 of file DirectDrawSurface.cpp.
References DDSHeader::setUserVersion().
uint DirectDrawSurface::width | ( | ) | const |
Definition at line 1020 of file DirectDrawSurface.cpp.
References DDSD_WIDTH, DDSHeader::flags, and DDSHeader::width.
Referenced by imb_load_dds(), and mipmap().