From 1fb02d935ab5c62c0b180fbc4279fe7c5406d35f Mon Sep 17 00:00:00 2001 From: "castano@gmail.com" Date: Tue, 7 Sep 2010 18:16:25 +0000 Subject: [PATCH] Edited wiki page ApiDocumentation through web user interface. --- wiki/ApiDocumentation.wiki | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wiki/ApiDocumentation.wiki b/wiki/ApiDocumentation.wiki index 1a30db9..64271cd 100644 --- a/wiki/ApiDocumentation.wiki +++ b/wiki/ApiDocumentation.wiki @@ -500,6 +500,18 @@ compressionOptions.setPixelType(PixelType_Float); compressionOptions.setPixelFormat(32, 32, 32, 32); }}} +By default pixel rows of unaligned pixel formats are aligned to the next byte boundary. However, it's possible to change that behavior using the following function: + +{{{ +void CompressionOptions:: setPitchAlignment(int pitchAlignment); +}}} + +Where `pitchAlignment` must be a positive number multiple of 8. Note, that previous versions of NVTT incorrectly aligned the pitch to 32 bits by default, so obtain the same behavior now you have to explicitly set the alignment as follows: + +{{{ +compressionOptions.setPitchAlignment(32); +}}} + === Quantization ===