Fix typo.

Add bc1n option.
This commit is contained in:
castano 2008-02-01 19:50:55 +00:00
parent 2b291f7871
commit 90a0dc505b

View File

@ -136,6 +136,7 @@ int main(int argc, char *argv[])
bool fast = false; bool fast = false;
bool nocuda = false; bool nocuda = false;
bool silent = false; bool silent = false;
bool bc1n = false;
nvtt::Format format = nvtt::Format_BC1; nvtt::Format format = nvtt::Format_BC1;
const char * externalCompressor = NULL; const char * externalCompressor = NULL;
@ -188,6 +189,11 @@ int main(int argc, char *argv[])
{ {
format = nvtt::Format_BC1; format = nvtt::Format_BC1;
} }
else if (strcmp("-bc1n", argv[i]) == 0)
{
format = nvtt::Format_BC1;
bc1n = true;
}
else if (strcmp("-bc1a", argv[i]) == 0) else if (strcmp("-bc1a", argv[i]) == 0)
{ {
format = nvtt::Format_BC1a; format = nvtt::Format_BC1a;
@ -265,6 +271,7 @@ int main(int argc, char *argv[])
printf(" -nocuda \tDo not use cuda compressor.\n"); printf(" -nocuda \tDo not use cuda compressor.\n");
printf(" -rgb \tRGBA format\n"); printf(" -rgb \tRGBA format\n");
printf(" -bc1 \tBC1 format (DXT1)\n"); printf(" -bc1 \tBC1 format (DXT1)\n");
printf(" -bc1n \tBC1 normal map format (DXT1nm)\n");
printf(" -bc1a \tBC1 format with binary alpha (DXT1a)\n"); printf(" -bc1a \tBC1 format with binary alpha (DXT1a)\n");
printf(" -bc2 \tBC2 format (DXT3)\n"); printf(" -bc2 \tBC2 format (DXT3)\n");
printf(" -bc3 \tBC3 format (DXT5)\n"); printf(" -bc3 \tBC3 format (DXT5)\n");
@ -377,7 +384,11 @@ int main(int argc, char *argv[])
//compressionOptions.setQuality(nvtt::Quality_Production); //compressionOptions.setQuality(nvtt::Quality_Production);
//compressionOptions.setQuality(nvtt::Quality_Highest); //compressionOptions.setQuality(nvtt::Quality_Highest);
} }
compressionOptions.setColorWeights(1, 1, 1);
if (bc1n)
{
compressionOptions.setColorWeights(1, 1, 0);
}
if (externalCompressor != NULL) if (externalCompressor != NULL)
{ {
@ -394,7 +405,7 @@ int main(int argc, char *argv[])
} }
nvtt::Compressor compressor; nvtt::Compressor compressor;
compressor.enableCudaAceleration(!nocuda); compressor.enableCudaAcceleration(!nocuda);
outputHandler.setTotal(compressor.estimateSize(inputOptions, compressionOptions)); outputHandler.setTotal(compressor.estimateSize(inputOptions, compressionOptions));
outputHandler.setDisplayProgress(!silent); outputHandler.setDisplayProgress(!silent);