From ed3fd722108ea4d41167c8339a97ecd818e78cdf Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Sun, 8 May 2011 09:05:52 +0000 Subject: 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). --- source/blender/imbuf/intern/dds/ColorBlock.h | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'source/blender/imbuf/intern/dds/ColorBlock.h') 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; -- cgit v1.2.3