Home

Awesome

NVTT 3 Samples

This repository contains a number of samples showing how to use NVTT 3, a GPU-accelerated texture compression and image processing library.

This includes several small samples intended as tutorials:

#include<nvtt/nvtt.h>
int main(int n,char**v){if(n==3){nvtt::Surface i;i.load(v[1]);nvtt::Context c(1);nvtt::CompressionOptions o;o.setFormat(nvtt::Format_BC7);nvtt::OutputOptions p;p.setFileName(v[2]);c.outputHeader(i,1,o,p);c.compress(i,0,0,o,p);}}

This also includes the source code for several tools from NVTT 3 ported to use the nvpro-samples framework, which show how to use almost all of the functionality in NVTT 3:

For comprehensive API documentation, please see the docs/ folder in the NVTT 3 distribution.

Build Instructions

To build these samples, you'll need the NVTT 3 SDK. For cuda_input, you'll also need the CUDA Toolkit. Then do one of the following:

You can then use CMake to generate and subsequently build the project.