# ReaderWriterDDS.cpp File Reference

`#include <osg/Texture>`
`#include <osg/Notify>`
`#include <osgDB/Registry>`
`#include <osgDB/FileNameUtils>`
`#include <osgDB/FileUtils>`
`#include <stdio.h>`

Include dependency graph for ReaderWriterDDS.cpp:

## Defines

#define | DDSD_CAPS 0x00000001l
#define | DDSD_HEIGHT 0x00000002l
#define | DDSD_WIDTH 0x00000004l
#define | DDSD_PIXELFORMAT 0x00001000l
#define | DDSD_PITCH 0x00000008l
#define | DDSD_MIPMAPCOUNT 0x00020000l
#define | DDSD_LINEARSIZE 0x00080000l
#define | DDSD_DEPTH 0x00800000l
#define | DDPF_ALPHAPIXELS 0x00000001l
#define | DDPF_FOURCC 0x00000004l
#define | DDPF_RGB 0x00000040l
#define | DDPF_ALPHA 0x00000002l
#define | DDPF_COMPRESSED 0x00000080l
#define | DDPF_LUMINANCE 0x00020000l
#define | DDSCAPS_TEXTURE 0x00001000l
#define | DDSCAPS_COMPLEX 0x00000008l
#define | DDSCAPS_MIPMAP 0x00400000l
#define | DDSCAPS2_VOLUME 0x00200000l
#define | MAKEFOURCC(ch0, ch1, ch2, ch3)
#define | FOURCC_DXT1 (MAKEFOURCC('D','X','T','1'))
#define | FOURCC_DXT2 (MAKEFOURCC('D','X','T','2'))
#define | FOURCC_DXT3 (MAKEFOURCC('D','X','T','3'))
#define | FOURCC_DXT4 (MAKEFOURCC('D','X','T','4'))
#define | FOURCC_DXT5 (MAKEFOURCC('D','X','T','5'))

## Functions

osg::Image * | ReadDDSFile (std::istream &_istream)
bool | WriteDDSFile (const osg::Image *img, std::ostream &fout)

## Variables

osgDB::RegisterReaderWriterProxy< ReaderWriterDDS > | g_readerWriter_DDS_Proxy

## Define Documentation

#define DDPF_ALPHA 0x00000002l

#define DDPF_ALPHAPIXELS 0x00000001l

#define DDPF_COMPRESSED 0x00000080l

#define DDPF_FOURCC 0x00000004l

#define DDPF_LUMINANCE 0x00020000l

#define DDPF_RGB 0x00000040l

#define DDSCAPS2_VOLUME 0x00200000l

#define DDSCAPS_COMPLEX 0x00000008l

#define DDSCAPS_MIPMAP 0x00400000l

#define DDSCAPS_TEXTURE 0x00001000l

#define DDSD_CAPS 0x00000001l

#define DDSD_DEPTH 0x00800000l

#define DDSD_HEIGHT 0x00000002l

#define DDSD_LINEARSIZE 0x00080000l

#define DDSD_MIPMAPCOUNT 0x00020000l

#define DDSD_PITCH 0x00000008l

#define DDSD_PIXELFORMAT 0x00001000l

#define DDSD_WIDTH 0x00000004l

#define FOURCC_DXT1 (MAKEFOURCC('D','X','T','1'))

#define FOURCC_DXT2 (MAKEFOURCC('D','X','T','2'))

#define FOURCC_DXT3 (MAKEFOURCC('D','X','T','3'))

#define FOURCC_DXT4 (MAKEFOURCC('D','X','T','4'))

#define FOURCC_DXT5 (MAKEFOURCC('D','X','T','5'))

#define MAKEFOURCC | ( | ch0,
|  | ch1,
|  | ch2,
|  | ch3 |  | ) |

Value:

    ((unsigned long)(char)(ch0) | ((unsigned long)(char)(ch1) << 8) |   \
        ((unsigned long)(char)(ch2) << 16) | ((unsigned long)(char)(ch3) << 24 ))

## Function Documentation

osg::Image* ReadDDSFile | ( | std::istream & | _istream | ) |

bool WriteDDSFile | ( | const osg::Image * | img,
|  | std::ostream & | fout
| ) |

## Variable Documentation

osgDB::RegisterReaderWriterProxy<ReaderWriterDDS> g_readerWriter_DDS_Proxy