From a75bf7fb1ea552dacb4d9512129a375471f6d759 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Thu, 12 May 2005 03:55:39 +0000 Subject: [PATCH] Updates to texture converter and DDS code: Generates sharpened mipmaps. DDS decompression now identical to NVIDIA PS plugin (and probably most hardware). Compression lossless when possible (e.g. always for DDS->TGA->DDS), and slightly improved in other cases. This was SVN commit r2291. --- source/tools/textureconv/main.cpp | 11 +++++++++-- source/tools/textureconv/textureconv.vcproj | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/source/tools/textureconv/main.cpp b/source/tools/textureconv/main.cpp index b25aaf8920..aa74f9ffad 100644 --- a/source/tools/textureconv/main.cpp +++ b/source/tools/textureconv/main.cpp @@ -21,7 +21,7 @@ #define tstring wstring #define tstrcmp wcscmp #define tstrrchr wcsrchr -#define tsprintf wsprintf +#define tsprintf swprintf #define tmain wmain #else #define tstring string @@ -324,8 +324,15 @@ void convert(std::tstring filename, OutputFormat fmt, trool alphablock) if (fmt == DXTn || fmt == DXT1 || fmt == DXT3 || fmt == DXT5) { - // TODO: Do the mipmaps work better with a different scale filter? iluBuildMipmaps(); + int num = ilGetInteger(IL_NUM_MIPMAPS); + for (int n = 1; n < num; ++n) + { + ilActiveMipmap(n); + iluSharpen(2.0, 1); // TODO: alter these, to make things look as nice as possible + ilActiveMipmap(0); + } + check(); } ilEnable(IL_FILE_OVERWRITE); diff --git a/source/tools/textureconv/textureconv.vcproj b/source/tools/textureconv/textureconv.vcproj index 01fccfc256..ce7e3a3011 100644 --- a/source/tools/textureconv/textureconv.vcproj +++ b/source/tools/textureconv/textureconv.vcproj @@ -86,10 +86,11 @@ OutputFile="$(OutDir)/textureconv.exe" LinkIncremental="1" AdditionalLibraryDirectories=""..\..\..\libraries\devil\src\lib";"e:\icc81\compiler80\ia32\lib"" - GenerateDebugInformation="FALSE" + GenerateDebugInformation="TRUE" SubSystem="1" OptimizeReferences="2" EnableCOMDATFolding="2" + OptimizeForWindows98="1" TargetMachine="1"/>