Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2011-05-08 13:05:52 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2011-05-08 13:05:52 +0400
commited3fd722108ea4d41167c8339a97ecd818e78cdf (patch)
tree858b8ce14f808667e81bd1b1cab8d02d3415abd9 /source/blender/imbuf/intern/dds/ColorBlock.h
parentaaa93c58b367e65bf4124e4b0d380925b0a6f539 (diff)
Apply second half of [#21590] .dds textures: fix for DXT1n format + sync with upstream nvtt
submitted by Amorilia This updates the DDS module with upstearm nvtt (r1042).
Diffstat (limited to 'source/blender/imbuf/intern/dds/ColorBlock.h')
-rw-r--r--source/blender/imbuf/intern/dds/ColorBlock.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/source/blender/imbuf/intern/dds/ColorBlock.h b/source/blender/imbuf/intern/dds/ColorBlock.h
index 47b08303a05..d4e4e8a809f 100644
--- a/source/blender/imbuf/intern/dds/ColorBlock.h
+++ b/source/blender/imbuf/intern/dds/ColorBlock.h
@@ -51,26 +51,15 @@ struct ColorBlock
ColorBlock(const Image * img, uint x, uint y);
void init(const Image * img, uint x, uint y);
+ void init(uint w, uint h, const uint * data, uint x, uint y);
+ void init(uint w, uint h, const float * data, uint x, uint y);
- void swizzleDXT5n();
- void splatX();
- void splatY();
+ void swizzle(uint x, uint y, uint z, uint w); // 0=r, 1=g, 2=b, 3=a, 4=0xFF, 5=0
- bool isSingleColor() const;
- bool isSingleColorNoAlpha() const;
- uint countUniqueColors() const;
- Color32 averageColor() const;
+ bool isSingleColor(Color32 mask = Color32(0xFF, 0xFF, 0xFF, 0x00)) const;
bool hasAlpha() const;
- void diameterRange(Color32 * start, Color32 * end) const;
- void luminanceRange(Color32 * start, Color32 * end) const;
- void boundsRange(Color32 * start, Color32 * end) const;
- void boundsRangeAlpha(Color32 * start, Color32 * end) const;
- void sortColorsByAbsoluteValue();
-
- float volume() const;
-
// Accessors
const Color32 * colors() const;