Add -alpha option. Get things ready for 2.0.8 revision.
This commit is contained in:
parent
a582722285
commit
8025ab13b5
|
@ -1 +1 @@
|
|||
2.0.7
|
||||
2.0.8
|
||||
|
|
|
@ -532,7 +532,7 @@ DDSHeader::DDSHeader()
|
|||
|
||||
// Store version information on the reserved header attributes.
|
||||
this->reserved[9] = MAKEFOURCC('N', 'V', 'T', 'T');
|
||||
this->reserved[10] = (2 << 16) | (0 << 8) | (7); // major.minor.revision
|
||||
this->reserved[10] = (2 << 16) | (0 << 8) | (8); // major.minor.revision
|
||||
|
||||
this->pf.size = 32;
|
||||
this->pf.flags = 0;
|
||||
|
|
|
@ -134,6 +134,7 @@ int main(int argc, char *argv[])
|
|||
MyAssertHandler assertHandler;
|
||||
MyMessageHandler messageHandler;
|
||||
|
||||
bool alpha = false;
|
||||
bool normal = false;
|
||||
bool color2normal = false;
|
||||
bool wrapRepeat = false;
|
||||
|
@ -157,6 +158,10 @@ int main(int argc, char *argv[])
|
|||
if (strcmp("-color", argv[i]) == 0)
|
||||
{
|
||||
}
|
||||
else if (strcmp("-alpha", argv[i]) == 0)
|
||||
{
|
||||
alpha = true;
|
||||
}
|
||||
else if (strcmp("-normal", argv[i]) == 0)
|
||||
{
|
||||
normal = true;
|
||||
|
@ -270,6 +275,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
printf("Input options:\n");
|
||||
printf(" -color \tThe input image is a color map (default).\n");
|
||||
printf(" -alpha \tThe input image has an alpha channel used for transparency.\n");
|
||||
printf(" -normal \tThe input image is a normal map.\n");
|
||||
printf(" -tonormal\tConvert input to normal map.\n");
|
||||
printf(" -clamp \tClamp wrapping mode (default).\n");
|
||||
|
@ -363,6 +369,15 @@ int main(int argc, char *argv[])
|
|||
inputOptions.setWrapMode(nvtt::WrapMode_Clamp);
|
||||
}
|
||||
|
||||
if (alpha)
|
||||
{
|
||||
inputOptions.setAlphaMode(nvtt::AlphaMode_Transparency);
|
||||
}
|
||||
else
|
||||
{
|
||||
inputOptions.setAlphaMode(nvtt::AlphaMode_None);
|
||||
}
|
||||
|
||||
if (normal)
|
||||
{
|
||||
setNormalMap(inputOptions);
|
||||
|
|
Loading…
Reference in New Issue
Block a user