nvtt
|
Surface-set struct for convenience of handling multi-level texture files such as DDS, currently only supporting reading. More...
#include <nvtt.h>
Public Member Functions | |
NVTT_API | SurfaceSet () |
Constructor. | |
NVTT_API | ~SurfaceSet () |
Destructor. | |
NVTT_API TextureType | GetTextureType () |
Texture type: 2D, 3D, or Cube. | |
NVTT_API int | GetFaceCount () |
Number of faces. | |
NVTT_API int | GetMipmapCount () |
Number of mip-map levels. | |
NVTT_API int | GetWidth () |
Image width (level 0) | |
NVTT_API int | GetHeight () |
Image height (level 0) | |
NVTT_API int | GetDepth () |
Image depth (level 0) | |
NVTT_API Surface | GetSurface (int faceId, int mipId, bool expectSigned=false) |
Get a surface at specified face and mip level. | |
NVTT_API void | GetSurface (int faceId, int mipId, Surface &surface, bool expectSigned=false) |
Get a surface at specified face and mip level. | |
NVTT_API void | reset () |
Release data. | |
NVTT_API bool | loadDDS (const char *fileName, bool forcenormal=false) |
Load a surface set from a DDS file. | |
NVTT_API bool | loadDDSFromMemory (const void *data, unsigned long long sizeInBytes, bool forcenormal=false) |
Load a surface set from an in-memory DDS file. | |
NVTT_API bool | saveImage (const char *fileName, int faceId, int mipId) |
Save an image at specified face and mip level (for decompression) | |
Surface-set struct for convenience of handling multi-level texture files such as DDS, currently only supporting reading.
NVTT_API bool nvtt::SurfaceSet::loadDDS | ( | const char * | fileName, |
bool | forcenormal = false ) |
Load a surface set from a DDS file.
true
if loading succeeded and false
if it failed.fileName | Path to the file to load. This uses the same character encoding as the filename argument of fopen() . |
forcenormal | If true, builds a normal map from the red and green components of BC5U data, or the alpha and green components of BC3 data. |
NVTT_API bool nvtt::SurfaceSet::loadDDSFromMemory | ( | const void * | data, |
unsigned long long | sizeInBytes, | ||
bool | forcenormal = false ) |
Load a surface set from an in-memory DDS file.
true
if loading succeeded and false
if it failed.data | Pointer to the start of the file's data in memory. |
sizeInBytes | Length of the file's data. |
forcenormal | If true, builds a normal map from the red and green components of BC5U data, or the alpha and green components of BC3 data. |