nvtt: nvtt/nvtt.h File Reference

nvtt

Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
nvtt.h File Reference
`#include "nvtt_lowlevel.h"`

Go to the source code of this file.

## Classes

struct | nvtt::CompressionOptions
| Compression options. This class describes the desired compression format and other compression settings. More...
struct | nvtt::OutputHandler
| Inheritable interface for outputting data. More...
struct | nvtt::ErrorHandler
| Inheritable interface for handling errors. More...
struct | nvtt::OutputOptions
| Output Options. More...
struct | nvtt::Context
| Compression context. More...
struct | nvtt::Surface
| A surface is one level of a 2D or 3D texture. More...
struct | nvtt::SurfaceSet
| Surface-set struct for convenience of handling multi-level texture files such as DDS, currently only supporting reading. More...
struct | nvtt::CubeSurface
| A CubeSurface is one level of a cube map texture. More...
struct | nvtt::BatchList
| Structure defining a list of inputs to be compressed. More...
struct | nvtt::TimingContext
| A TimingContext is a way to collect timing data from a number of functions, and report how much time each function took. More...

## Namespaces

namespace | nvtt
| Namespace for all public non-macro NVTT fields.

## Macros

#define | NVTT_VERSION 30205
#define | NVTT_FORBID_COPY(Class)
| Prevents a class from being copied.
#define | NVTT_DECLARE_PIMPL(Class)
| Hides the members of the implementation of the class behind a `Private` structure.

## Typedefs

typedef void(* | nvtt::MessageCallback) (Severity severity, Error error, const char *message, const void *userData)

## Enumerations

enum | nvtt::WrapMode { nvtt::WrapMode_Clamp , nvtt::WrapMode_Repeat , nvtt::WrapMode_Mirror }
| Wrap modes. Specifies how to handle coordinates outside the typical image range. More...
enum | nvtt::TextureType { TextureType_2D , TextureType_Cube , TextureType_3D }
| Texture types. Specifies the dimensionality of a texture.
enum | nvtt::InputFormat { nvtt::InputFormat_BGRA_8UB , nvtt::InputFormat_BGRA_8SB , nvtt::InputFormat_RGBA_16F , nvtt::InputFormat_RGBA_32F , nvtt::InputFormat_R_32F }
| Input formats. Used when creating an nvtt::Surface from an RGB/RGBA array. More...
enum | nvtt::MipmapFilter { nvtt::MipmapFilter_Box , nvtt::MipmapFilter_Triangle , nvtt::MipmapFilter_Kaiser , nvtt::MipmapFilter_Mitchell , nvtt::MipmapFilter_Min , nvtt::MipmapFilter_Max }
| Mipmap downsampling filters. Each of these can be customized using `filterWidth` and `params` when calling Surface::buildNextMipmap(). More...
enum | nvtt::ResizeFilter { nvtt::ResizeFilter_Box , nvtt::ResizeFilter_Triangle , nvtt::ResizeFilter_Kaiser , nvtt::ResizeFilter_Mitchell , nvtt::ResizeFilter_Min , nvtt::ResizeFilter_Max }
| Texture resizing filters. More...
enum | nvtt::RoundMode { nvtt::RoundMode_None , nvtt::RoundMode_ToNextPowerOfTwo , nvtt::RoundMode_ToNearestPowerOfTwo , nvtt::RoundMode_ToPreviousPowerOfTwo }
| Extents rounding mode. More...
enum | nvtt::AlphaMode { nvtt::AlphaMode_None , nvtt::AlphaMode_Transparency , nvtt::AlphaMode_Premultiplied }
| Alpha mode. More...

enum

nvtt::Error {
nvtt::Error_None , nvtt::Error_Unknown = Error_None , nvtt::Error_InvalidInput , nvtt::Error_UnsupportedFeature ,
nvtt::Error_CudaError , nvtt::Error_FileOpen , nvtt::Error_FileWrite , nvtt::Error_UnsupportedOutputFormat ,
nvtt::Error_Messaging , nvtt::Error_OutOfHostMemory , nvtt::Error_OutOfDeviceMemory , nvtt::Error_OutputWrite ,
Error_Count
}

| Error codes. More...
enum | nvtt::Severity { nvtt::Severity_Info , nvtt::Severity_Warning , nvtt::Severity_Error , Severity_Count }
| Message severity. More...
enum | nvtt::Container { nvtt::Container_DDS , nvtt::Container_DDS10 }
| Container type for encoded data. More...
enum | nvtt::NormalTransform { nvtt::NormalTransform_Orthographic , nvtt::NormalTransform_Stereographic , nvtt::NormalTransform_Paraboloid , nvtt::NormalTransform_Quartic }
| Specifies a normal transformation, used to store 3D (x, y, z) normals in 2D (x, y). More...
enum | nvtt::ToneMapper { nvtt::ToneMapper_Linear , nvtt::ToneMapper_Reinhard , nvtt::ToneMapper_Reindhart = ToneMapper_Reinhard , nvtt::ToneMapper_Halo , nvtt::ToneMapper_Lightmap }
| Tone mapping functions. More...
enum | nvtt::CubeLayout { nvtt::CubeLayout_VerticalCross , nvtt::CubeLayout_HorizontalCross , nvtt::CubeLayout_Column , nvtt::CubeLayout_Row , nvtt::CubeLayout_LatitudeLongitude }
| Specifies how to fold or unfold a cube map from or to a 2D texture. More...
enum | nvtt::EdgeFixup { nvtt::EdgeFixup_None , nvtt::EdgeFixup_Stretch , nvtt::EdgeFixup_Warp , nvtt::EdgeFixup_Average }
| Use EdgeFixup_None if unsure; this affects how certain cube surface processing algorithms work. More...

## Functions

NVTT_API unsigned int | nvtt::version ()
| Return the NVTT version number, as 10000*fork + 100*major + minor.
NVTT_API const char * | nvtt::errorString (Error e)
| Return string for the given error code.
NVTT_API bool | nvtt::setMessageCallback (MessageCallback callback, const void *userData)
NVTT_API float | nvtt::rmsError (const Surface &reference, const Surface &img, TimingContext *tc=0)
| Image comparison and error measurement functions. (New in NVTT 2.1)
NVTT_API float | nvtt::rmsAlphaError (const Surface &reference, const Surface &img, TimingContext *tc=0)
| Image comparison and error measurement functions. (New in NVTT 2.1)
NVTT_API float | nvtt::cieLabError (const Surface &reference, const Surface &img, TimingContext *tc=0)
| Image comparison and error measurement functions. (New in NVTT 2.1)
NVTT_API float | nvtt::angularError (const Surface &reference, const Surface &img, TimingContext *tc=0)
| Image comparison and error measurement functions. (New in NVTT 2.1)
NVTT_API Surface | nvtt::diff (const Surface &reference, const Surface &img, float scale, TimingContext *tc=0)
| Image comparison and error measurement functions. (New in NVTT 2.1)
NVTT_API float | nvtt::rmsToneMappedError (const Surface &reference, const Surface &img, float exposure, TimingContext *tc=0)
| Image comparison and error measurement functions. (New in NVTT 2.1)
NVTT_API Surface | nvtt::histogram (const Surface &img, int width, int height, TimingContext *tc=0)
| Generate histogram from surface.
NVTT_API Surface | nvtt::histogram (const Surface &img, float minRange, float maxRange, int width, int height, TimingContext *tc=0)
| Generate histogram from surface.
NVTT_API void | nvtt::getTargetExtent (int *width, int *height, int *depth, int maxExtent, RoundMode roundMode, TextureType textureType, TimingContext *tc=0)
| Geting the target extent for round-mode and texture-type. (New in NVTT 3.0)
NVTT_API int | nvtt::countMipmaps (int w, int h, int d, TimingContext *tc=0)
| Calculate the count of mipmaps given width, height, depth. (New in NVTT 3.0)

## Detailed Description

Header of the high-level interface of NVTT.

## Macro Definition Documentation

## ◆ NVTT_DECLARE_PIMPL

#define NVTT_DECLARE_PIMPL | ( |  | Class | ) |

Value:
public: \
struct Private; \
Private & m;

Hides the members of the implementation of the class behind a `Private` structure.

See also
  nvtt::Surface::data()

## ◆ NVTT_FORBID_COPY

#define NVTT_FORBID_COPY | ( |  | Class | ) |

Value:
private: \
Class(const Class &); \
void operator=(const Class &); \
public:

Prevents a class from being copied.

## ◆ NVTT_VERSION

#define NVTT_VERSION 30205

This library's version number, stored as 10000*fork + 100*major + minor. This can also be read via nvtt::version().