"L. Spiro Engine"
Classes | Public Types | Static Public Member Functions

lsi::CDds Class Reference

Handles loading of .DDS files. More...

#include <LSIDds.h>

List of all members.

Classes

struct  LSI_DDS_HEADER
struct  LSI_DDS_PIXELFORMAT

Public Types

typedef struct
lsi::CDds::LSI_DDS_PIXELFORMAT
LPLSI_DDS_PIXELFORMAT
typedef struct
lsi::CDds::LSI_DDS_PIXELFORMAT 
LPCLSI_DDS_PIXELFORMAT
typedef struct
lsi::CDds::LSI_DDS_HEADER
LPLSI_DDS_HEADER
typedef struct
lsi::CDds::LSI_DDS_HEADER 
LPCLSI_DDS_HEADER

Static Public Member Functions

static LSBOOL LSE_CALL LoadDds (const LSUINT8 *_pui8FileData, LSUINT32 _ui32DataLen, LSUINT32 &_ui32Width, LSUINT32 &_ui32Height, LSI_PIXEL_FORMAT &_pfFormat, CImageLib::CTexelBuffer &_tbReturn, CVector< CImageLib::CTexelBuffer > &_vMipMaps)
static LSUINT32 LSE_CALL DdsBlockSize (LSI_PIXEL_FORMAT _pfFormat)
static LSI_PIXEL_FORMAT LSE_CALL DdsPixelFormat (LSUINT32 _ui32FourCc)
static LSUINT32 LSE_CALL DdsScanlineWidth (LSUINT32 _ui32Width, LSI_PIXEL_FORMAT _pfFormat)
static LSUINT32 LSE_CALL DdsTotalScanlines (LSUINT32 _ui32Height)
static LSUINT32 LSE_CALL GetCompressedSize (LSUINT32 _ui32Width, LSUINT32 _ui32Height, LSUINT32 _ui32Factor)

Detailed Description

Handles loading of .DDS files.

Class CDds Description: Handles loading of .DDS files.


Member Typedef Documentation

The DDS header.

The DDS header pixel format structure.


Member Function Documentation

static LSUINT32 LSE_CALL lsi::CDds::DdsBlockSize ( LSI_PIXEL_FORMAT  _pfFormat) [static]

Returns the size, in pixels, of a block of a DDS file.

Parameters:
_pfFormatThe DXT format whose block size is to be obtained.
Returns:
Returns the size, in pixels, of a block of a DDS file.
static LSI_PIXEL_FORMAT LSE_CALL lsi::CDds::DdsPixelFormat ( LSUINT32  _ui32FourCc) [static]

Returns the pixel format of the given four-character code.

Parameters:
_ui32FourCcThe FourCC to be converted into a pixel format.
Returns:
Returns the pixel format of the given four-character code.
static LSUINT32 LSE_CALL lsi::CDds::DdsScanlineWidth ( LSUINT32  _ui32Width,
LSI_PIXEL_FORMAT  _pfFormat 
) [static]

Gets the pitch of a FourCC image format.

Parameters:
_ui32WidthThe width of the image.
_pfFormatThe format of the image.
Returns:
Returns the width, in bytes, of a scanline in the given DDS format.
static LSUINT32 LSE_CALL lsi::CDds::DdsTotalScanlines ( LSUINT32  _ui32Height) [static]

Gets the total number of scanlines in a given DDS format.

Parameters:
_ui32HeightHeight of the image.
Returns:
Returns the number of scanlines in the given DDS format.
static LSUINT32 LSE_CALL lsi::CDds::GetCompressedSize ( LSUINT32  _ui32Width,
LSUINT32  _ui32Height,
LSUINT32  _ui32Factor 
) [static]

Returns the total size of a compressed image given a factor and its width and height.

Parameters:
_ui32WidthWidth in pixels.
_ui32HeightHeight in pixels.
_ui32FactorMultiplier.
Returns:
Returns the size of the compressed data.
static LSBOOL LSE_CALL lsi::CDds::LoadDds ( const LSUINT8 *  _pui8FileData,
LSUINT32  _ui32DataLen,
LSUINT32 &  _ui32Width,
LSUINT32 &  _ui32Height,
LSI_PIXEL_FORMAT _pfFormat,
CImageLib::CTexelBuffer _tbReturn,
CVector< CImageLib::CTexelBuffer > &  _vMipMaps 
) [static]

Loads a DDS file from memory.

Parameters:
_pui8FileDataThe in-memory image of the file.
_ui32DataLenThe length of the in-memory image of the file.
_ui32WidthThe returned width of the image.
_ui32HeightThe returned height of the image.
_pfFormatIndicates the format of the converted data held in _tbReturn.
_tbReturnThe returned data.
_vMipMapsThe returned mipmap data, if any.
Returns:
Returns true if the file was successfully loaded. False indicates an invalid file or lack of RAM.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator