Merge changes from the-witness.

Fix DXT5n compressor.
This commit is contained in:
castano
2010-07-22 10:25:14 +00:00
parent ac7c017c35
commit 9e881f28d1
24 changed files with 3357 additions and 3332 deletions

View File

@ -141,9 +141,8 @@ void ColorBlock::swizzle(uint x, uint y, uint z, uint w)
/// Returns true if the block has a single color.
bool ColorBlock::isSingleColor() const
bool ColorBlock::isSingleColor(Color32 mask/*= Color32(0xFF, 0xFF, 0xFF, 0x00)*/) const
{
Color32 mask(0xFF, 0xFF, 0xFF, 0x00);
uint u = m_color[0].u & mask.u;
for (int i = 1; i < 16; i++)
@ -184,7 +183,7 @@ bool ColorBlock::isSingleColorNoAlpha() const
*/
/// Count number of unique colors in this color block.
uint ColorBlock::countUniqueColors() const
/*uint ColorBlock::countUniqueColors() const
{
uint count = 0;
@ -204,7 +203,7 @@ uint ColorBlock::countUniqueColors() const
}
return count;
}
}*/
/*/// Get average color of the block.
Color32 ColorBlock::averageColor() const

View File

@ -25,9 +25,8 @@ namespace nv
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;
bool isSingleColor(Color32 mask = Color32(0xFF, 0xFF, 0xFF, 0x00)) const;
//uint countUniqueColors() const;
//Color32 averageColor() const;
bool hasAlpha() const;