Compare commits
121 Commits
Author | SHA1 | Date | |
---|---|---|---|
c722267b9b | |||
f33bcfafad | |||
2d9805123c | |||
e70de27d12 | |||
874b087b43 | |||
25673a0c42 | |||
66a8237215 | |||
2ea2b40c72 | |||
e2ac16f100 | |||
9ce42ecfa4 | |||
2e0300fbb6 | |||
98cf9f360a | |||
dcdeead859 | |||
2996120fe2 | |||
20b73458a5 | |||
89206909a4 | |||
fd7c51068f | |||
0b2e6d633d | |||
acc7dee80f | |||
fbed8d31a5 | |||
b24e3bbcf2 | |||
3c559666b0 | |||
447c8fd8db | |||
3fafa5f0a6 | |||
20606def7c | |||
68ff9ffd76 | |||
265dbf33c3 | |||
a728e4a768 | |||
50cfd0b662 | |||
19e00c701d | |||
17ca9ab4ca | |||
24cde600ca | |||
d0315d6408 | |||
8af199a819 | |||
4d4286a3e4 | |||
38bf3f52c3 | |||
2392b1da5e | |||
ffe94b76fb | |||
155ef81d99 | |||
9ff6952793 | |||
93625c7de8 | |||
6e9feef6f4 | |||
b1b3ccbd6f | |||
27cab64175 | |||
0293f73121 | |||
64db4c2379 | |||
43ba8d50d4 | |||
5be5a6b922 | |||
7629e396b8 | |||
341c393dde | |||
cbbefe953f | |||
cfb7d7e4ed | |||
5eef915c0b | |||
a5fdca595a | |||
b5e5d4b0a2 | |||
82f99ea9d2 | |||
dc8fe745c0 | |||
3322367311 | |||
963d2969b8 | |||
6d9e6881d3 | |||
4f58a1bf8b | |||
30eb24149e | |||
794e4e90c6 | |||
c5d618807f | |||
bdb9502ac6 | |||
00af7f75bc | |||
92f76113e5 | |||
bd7013a37b | |||
1ec9f130e2 | |||
5910d3f4bf | |||
d292859745 | |||
58d6c8d243 | |||
4c197ab48c | |||
7165dab99f | |||
d827cee863 | |||
d787b30379 | |||
cc4741ed03 | |||
559bf61f4a | |||
dbfb36b812 | |||
8314ac076f | |||
d58fd00fd9 | |||
117c892141 | |||
cd112e2133 | |||
b013aa64b9 | |||
112bf2c5c3 | |||
7a85fdc59a | |||
f167b79cfd | |||
73288eb24b | |||
3f13eb89f1 | |||
ad43f6e5f2 | |||
da506404ad | |||
d253e4bf4f | |||
c59e4db15a | |||
d38e970221 | |||
bdebc937be | |||
d938e2d753 | |||
5fbeb8d34b | |||
f95d09d1e9 | |||
0b17e3095a | |||
6e1a87129f | |||
e8bb3f2886 | |||
f7bbd4b4d7 | |||
7bb46a4df7 | |||
7f6c257e9f | |||
3f1472b193 | |||
056aedea97 | |||
dda3b661dd | |||
214ca6c65c | |||
08ca2fbe16 | |||
de042e828a | |||
64cbd74ef0 | |||
3d1b9324e1 | |||
07df6e7539 | |||
46334cb96a | |||
67dc3a9739 | |||
b5e8428f9c | |||
21fb83c081 | |||
4c3549cb66 | |||
3dae7f9b70 | |||
ebe47a0f78 | |||
21859216bc |
25
ChangeLog
25
ChangeLog
@ -1,3 +1,28 @@
|
|||||||
|
NVIDIA Texture Tools version 2.0.9
|
||||||
|
* Fix invalid assert when reading paletted TGA images. Fixes issue 125.
|
||||||
|
* Add support for luminance flag. Fixes issue 126.
|
||||||
|
* Fix the C wrapper and provide methods involving callbacks.
|
||||||
|
* Improve C# / .NET Wrapper
|
||||||
|
* Add an XNA Game Studio 3.1 Content Processor to make it easy to utilize NVIDIA Texture Tools in XNA applications.
|
||||||
|
* Fix single color DXT1a compressor. Fixes issue 134.
|
||||||
|
* Fix mirror sampling. Fixes issue 135.
|
||||||
|
* Fix seek bug. Fixes issue 144.
|
||||||
|
* Fix aliasing bug. Fixes issue 139.
|
||||||
|
|
||||||
|
NVIDIA Texture Tools version 2.0.8
|
||||||
|
* Fix float to fixed image conversion. Patch provided by Alex Pfaffe. Fixes issue 121.
|
||||||
|
* ColorBlock::isSingleColor compares only RGB channels. Fixes issue 115.
|
||||||
|
* Fix cmake build in msvc. Fixes issue 111.
|
||||||
|
* Better estimate principal component. Fixes issue 120.
|
||||||
|
|
||||||
|
NVIDIA Texture Tools version 2.0.7
|
||||||
|
* Output correct exit codes. Fixes issue 92.
|
||||||
|
* Fix thread-safety errors. Fixes issue 90.
|
||||||
|
* Add SIMD power method. Fixes issue 94.
|
||||||
|
* Fix compilation error in Snow Leopard reported by Huahang Liu.
|
||||||
|
* Interact better with applications that already use CUDA.
|
||||||
|
* Faster CPU compression.
|
||||||
|
|
||||||
NVIDIA Texture Tools version 2.0.6
|
NVIDIA Texture Tools version 2.0.6
|
||||||
* Fix dll version checking.
|
* Fix dll version checking.
|
||||||
* Detect CUDA 2.1 and future CUDA versions correctly.
|
* Detect CUDA 2.1 and future CUDA versions correctly.
|
||||||
|
@ -120,7 +120,7 @@ MACRO (WRAP_CUDA outfiles)
|
|||||||
FOREACH (CUFILE ${ARGN})
|
FOREACH (CUFILE ${ARGN})
|
||||||
GET_FILENAME_COMPONENT (CUFILE ${CUFILE} ABSOLUTE)
|
GET_FILENAME_COMPONENT (CUFILE ${CUFILE} ABSOLUTE)
|
||||||
GET_FILENAME_COMPONENT (CFILE ${CUFILE} NAME_WE)
|
GET_FILENAME_COMPONENT (CFILE ${CUFILE} NAME_WE)
|
||||||
SET (CFILE ${CMAKE_CURRENT_BINARY_DIR}/${CFILE}.gen.c)
|
SET (CFILE ${CMAKE_CURRENT_BINARY_DIR}/${CFILE}.gen.cpp)
|
||||||
|
|
||||||
GET_CUFILE_DEPENDENCIES(CUDEPS ${CUFILE})
|
GET_CUFILE_DEPENDENCIES(CUDEPS ${CUFILE})
|
||||||
#MESSAGE("${CUDEPS}")
|
#MESSAGE("${CUDEPS}")
|
||||||
|
@ -53,11 +53,7 @@ ENDIF(ZLIB_FOUND)
|
|||||||
IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
|
IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
|
||||||
SET(OPENEXR_FOUND TRUE)
|
SET(OPENEXR_FOUND TRUE)
|
||||||
SET(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
|
SET(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
|
||||||
SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${ZLIB_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR")
|
SET(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ZLIB_LIBRARY} CACHE STRING "The libraries needed to use OpenEXR")
|
||||||
|
|
||||||
IF(OPENEXR_ILMTHREAD_LIBRARY)
|
|
||||||
SET(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} ${OPENEXR_ILMTHREAD_LIBRARY})
|
|
||||||
ENDIF(OPENEXR_ILMTHREAD_LIBRARY)
|
|
||||||
ENDIF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
|
ENDIF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
|
||||||
|
|
||||||
IF(OPENEXR_FOUND)
|
IF(OPENEXR_FOUND)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
namespace Nvidia.TextureTools
|
namespace Nvidia.TextureTools
|
||||||
{
|
{
|
||||||
@ -134,86 +136,113 @@ namespace Nvidia.TextureTools
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public enum Error
|
public enum Error
|
||||||
{
|
{
|
||||||
|
Unknown,
|
||||||
InvalidInput,
|
InvalidInput,
|
||||||
UserInterruption,
|
|
||||||
UnsupportedFeature,
|
UnsupportedFeature,
|
||||||
CudaError,
|
CudaError,
|
||||||
Unknown,
|
|
||||||
FileOpen,
|
FileOpen,
|
||||||
FileWrite,
|
FileWrite,
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public class InputOptions
|
#endregion
|
||||||
/// <summary>
|
|
||||||
|
#region Exception Class
|
||||||
|
|
||||||
|
public class TextureToolsException : ApplicationException
|
||||||
|
{
|
||||||
|
Error errorCode = Error.Unknown;
|
||||||
|
|
||||||
|
public Error ErrorCode
|
||||||
|
{
|
||||||
|
get { return errorCode; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextureToolsException(Error errorCode) : this(errorCode, Compressor.ErrorString(errorCode))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextureToolsException(Error errorCode, string msg)
|
||||||
|
: base(msg)
|
||||||
|
{
|
||||||
|
this.errorCode = errorCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region public class InputOptions
|
||||||
|
/// <summary>
|
||||||
/// Input options.
|
/// Input options.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class InputOptions
|
public class InputOptions : IDisposable
|
||||||
{
|
{
|
||||||
#region Bindings
|
#region Bindings
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static IntPtr nvttCreateInputOptions();
|
private extern static IntPtr nvttCreateInputOptions();
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttDestroyInputOptions(IntPtr inputOptions);
|
private extern static void nvttDestroyInputOptions(IntPtr inputOptions);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsTextureLayout(IntPtr inputOptions, TextureType type, int w, int h, int d);
|
private extern static void nvttSetInputOptionsTextureLayout(IntPtr inputOptions, TextureType type, int w, int h, int d);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttResetInputOptionsTextureLayout(IntPtr inputOptions);
|
private extern static void nvttResetInputOptionsTextureLayout(IntPtr inputOptions);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static bool nvttSetInputOptionsMipmapData(IntPtr inputOptions, IntPtr data, int w, int h, int d, int face, int mipmap);
|
private extern static bool nvttSetInputOptionsMipmapData(IntPtr inputOptions, IntPtr data, int w, int h, int d, int face, int mipmap);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsFormat(IntPtr inputOptions, InputFormat format);
|
private extern static void nvttSetInputOptionsFormat(IntPtr inputOptions, InputFormat format);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsAlphaMode(IntPtr inputOptions, AlphaMode alphaMode);
|
private extern static void nvttSetInputOptionsAlphaMode(IntPtr inputOptions, AlphaMode alphaMode);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsGamma(IntPtr inputOptions, float inputGamma, float outputGamma);
|
private extern static void nvttSetInputOptionsGamma(IntPtr inputOptions, float inputGamma, float outputGamma);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsWrapMode(IntPtr inputOptions, WrapMode mode);
|
private extern static void nvttSetInputOptionsWrapMode(IntPtr inputOptions, WrapMode mode);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsMipmapFilter(IntPtr inputOptions, MipmapFilter filter);
|
private extern static void nvttSetInputOptionsMipmapFilter(IntPtr inputOptions, MipmapFilter filter);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsMipmapGeneration(IntPtr inputOptions, bool generateMipmaps, int maxLevel);
|
private extern static void nvttSetInputOptionsMipmapGeneration(IntPtr inputOptions, bool generateMipmaps, int maxLevel);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsKaiserParameters(IntPtr inputOptions, float width, float alpha, float stretch);
|
private extern static void nvttSetInputOptionsKaiserParameters(IntPtr inputOptions, float width, float alpha, float stretch);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsNormalMap(IntPtr inputOptions, bool b);
|
private extern static void nvttSetInputOptionsNormalMap(IntPtr inputOptions, bool b);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsConvertToNormalMap(IntPtr inputOptions, bool convert);
|
private extern static void nvttSetInputOptionsConvertToNormalMap(IntPtr inputOptions, bool convert);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsHeightEvaluation(IntPtr inputOptions, float redScale, float greenScale, float blueScale, float alphaScale);
|
private extern static void nvttSetInputOptionsHeightEvaluation(IntPtr inputOptions, float redScale, float greenScale, float blueScale, float alphaScale);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsNormalFilter(IntPtr inputOptions, float small, float medium, float big, float large);
|
private extern static void nvttSetInputOptionsNormalFilter(IntPtr inputOptions, float small, float medium, float big, float large);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsNormalizeMipmaps(IntPtr inputOptions, bool b);
|
private extern static void nvttSetInputOptionsNormalizeMipmaps(IntPtr inputOptions, bool b);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsColorTransform(IntPtr inputOptions, ColorTransform t);
|
private extern static void nvttSetInputOptionsColorTransform(IntPtr inputOptions, ColorTransform t);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsLinearTransfrom(IntPtr inputOptions, int channel, float w0, float w1, float w2, float w3);
|
private extern static void nvttSetInputOptionsLinearTransfrom(IntPtr inputOptions, int channel, float w0, float w1, float w2, float w3);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsMaxExtents(IntPtr inputOptions, int d);
|
private extern static void nvttSetInputOptionsMaxExtents(IntPtr inputOptions, int d);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetInputOptionsRoundMode(IntPtr inputOptions, RoundMode mode);
|
private extern static void nvttSetInputOptionsRoundMode(IntPtr inputOptions, RoundMode mode);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -223,10 +252,7 @@ namespace Nvidia.TextureTools
|
|||||||
{
|
{
|
||||||
options = nvttCreateInputOptions();
|
options = nvttCreateInputOptions();
|
||||||
}
|
}
|
||||||
~InputOptions()
|
|
||||||
{
|
|
||||||
nvttDestroyInputOptions(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetTextureLayout(TextureType type, int w, int h, int d)
|
public void SetTextureLayout(TextureType type, int w, int h, int d)
|
||||||
{
|
{
|
||||||
@ -237,6 +263,22 @@ namespace Nvidia.TextureTools
|
|||||||
nvttResetInputOptionsTextureLayout(options);
|
nvttResetInputOptionsTextureLayout(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetMipmapData(byte[] data, int width, int height, int depth, int face, int mipmap)
|
||||||
|
{
|
||||||
|
//unsafe() would be cleaner, but that would require compiling with the unsafe compiler option....
|
||||||
|
GCHandle gcHandle = GCHandle.Alloc(data, GCHandleType.Pinned);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SetMipmapData(gcHandle.AddrOfPinnedObject(), width, height, depth, face, mipmap);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
gcHandle.Free();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void SetMipmapData(IntPtr data, int width, int height, int depth, int face, int mipmap)
|
public void SetMipmapData(IntPtr data, int width, int height, int depth, int face, int mipmap)
|
||||||
{
|
{
|
||||||
nvttSetInputOptionsMipmapData(options, data, width, height, depth, face, mipmap);
|
nvttSetInputOptionsMipmapData(options, data, width, height, depth, face, mipmap);
|
||||||
@ -326,36 +368,62 @@ namespace Nvidia.TextureTools
|
|||||||
{
|
{
|
||||||
nvttSetInputOptionsRoundMode(options, mode);
|
nvttSetInputOptionsRoundMode(options, mode);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
#region IDisposable Members
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Dispose(true);
|
||||||
|
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (options != IntPtr.Zero)
|
||||||
|
{
|
||||||
|
nvttDestroyInputOptions(options);
|
||||||
|
options = IntPtr.Zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
~InputOptions()
|
||||||
|
{
|
||||||
|
Dispose(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region public class CompressionOptions
|
#region public class CompressionOptions
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compression options.
|
/// Compression options.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CompressionOptions
|
public class CompressionOptions : IDisposable
|
||||||
{
|
{
|
||||||
#region Bindings
|
#region Bindings
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static IntPtr nvttCreateCompressionOptions();
|
private extern static IntPtr nvttCreateCompressionOptions();
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttDestroyCompressionOptions(IntPtr compressionOptions);
|
private extern static void nvttDestroyCompressionOptions(IntPtr compressionOptions);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetCompressionOptionsFormat(IntPtr compressionOptions, Format format);
|
private extern static void nvttSetCompressionOptionsFormat(IntPtr compressionOptions, Format format);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetCompressionOptionsQuality(IntPtr compressionOptions, Quality quality);
|
private extern static void nvttSetCompressionOptionsQuality(IntPtr compressionOptions, Quality quality);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetCompressionOptionsColorWeights(IntPtr compressionOptions, float red, float green, float blue, float alpha);
|
private extern static void nvttSetCompressionOptionsColorWeights(IntPtr compressionOptions, float red, float green, float blue, float alpha);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetCompressionOptionsPixelFormat(IntPtr compressionOptions, uint bitcount, uint rmask, uint gmask, uint bmask, uint amask);
|
private extern static void nvttSetCompressionOptionsPixelFormat(IntPtr compressionOptions, uint bitcount, uint rmask, uint gmask, uint bmask, uint amask);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetCompressionOptionsQuantization(IntPtr compressionOptions, bool colorDithering, bool alphaDithering, bool binaryAlpha, int alphaThreshold);
|
private extern static void nvttSetCompressionOptionsQuantization(IntPtr compressionOptions, bool colorDithering, bool alphaDithering, bool binaryAlpha, int alphaThreshold);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
internal IntPtr options;
|
internal IntPtr options;
|
||||||
@ -364,10 +432,6 @@ namespace Nvidia.TextureTools
|
|||||||
{
|
{
|
||||||
options = nvttCreateCompressionOptions();
|
options = nvttCreateCompressionOptions();
|
||||||
}
|
}
|
||||||
~CompressionOptions()
|
|
||||||
{
|
|
||||||
nvttDestroyCompressionOptions(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetFormat(Format format)
|
public void SetFormat(Format format)
|
||||||
{
|
{
|
||||||
@ -403,115 +467,295 @@ namespace Nvidia.TextureTools
|
|||||||
{
|
{
|
||||||
nvttSetCompressionOptionsQuantization(options, colorDithering, alphaDithering, binaryAlpha, alphaThreshold);
|
nvttSetCompressionOptionsQuantization(options, colorDithering, alphaDithering, binaryAlpha, alphaThreshold);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
#region IDisposable Members
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Dispose(true);
|
||||||
|
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (options != IntPtr.Zero)
|
||||||
|
{
|
||||||
|
nvttDestroyCompressionOptions(options);
|
||||||
|
options = IntPtr.Zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
~CompressionOptions()
|
||||||
|
{
|
||||||
|
Dispose(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region public class OutputOptions
|
#region public class OutputOptions
|
||||||
|
|
||||||
|
public interface IOutputHandler
|
||||||
|
{
|
||||||
|
void BeginImage(int size, int width, int height, int depth, int face, int miplevel);
|
||||||
|
bool WriteDataUnsafe(IntPtr data, int size);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This class provides a nicer interface for the output handler by taking care of the marshalling of the image data.
|
||||||
|
* However the IOutputHandler interface is still provided to allow the user to do this themselves to avoid the
|
||||||
|
* additional copying and memory allocations.
|
||||||
|
*/
|
||||||
|
public abstract class OutputHandlerBase : IOutputHandler
|
||||||
|
{
|
||||||
|
private byte[] tempData;
|
||||||
|
|
||||||
|
protected OutputHandlerBase()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract void BeginImage(int size, int width, int height, int depth, int face, int miplevel);
|
||||||
|
protected abstract void WriteData(byte[] dataBuffer, int startIndex, int count);
|
||||||
|
|
||||||
|
#region IOutputHandler Members
|
||||||
|
|
||||||
|
void IOutputHandler.BeginImage(int size, int width, int height, int depth, int face, int miplevel)
|
||||||
|
{
|
||||||
|
BeginImage(size, width, height, depth, face, miplevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IOutputHandler.WriteDataUnsafe(IntPtr data, int size)
|
||||||
|
{
|
||||||
|
//TODO: Exception handling and return an error result?
|
||||||
|
|
||||||
|
if ((tempData == null) || (size > tempData.Length))
|
||||||
|
tempData = new byte[size];
|
||||||
|
|
||||||
|
Marshal.Copy(data, tempData, 0, size);
|
||||||
|
|
||||||
|
// Zero additional buffer elements to to aid reproducability of bugs.
|
||||||
|
Array.Clear(tempData, size, tempData.Length - size);
|
||||||
|
|
||||||
|
WriteData(tempData, 0, size);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Output options.
|
/// Output options.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class OutputOptions
|
public class OutputOptions : IDisposable
|
||||||
{
|
{
|
||||||
#region Delegates
|
#region Delegates
|
||||||
public delegate void ErrorHandler(Error error);
|
|
||||||
private delegate void WriteDataDelegate(IntPtr data, int size);
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
private delegate void ImageDelegate(int size, int width, int height, int depth, int face, int miplevel);
|
private delegate void InternalErrorHandlerDelegate(Error error);
|
||||||
|
|
||||||
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
|
private delegate bool WriteDataDelegate(IntPtr data, int size);
|
||||||
|
|
||||||
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
|
private delegate void ImageDelegate(int size, int width, int height, int depth, int face, int miplevel);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Bindings
|
private Error lastErrorCode = Error.Unknown;
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
|
||||||
|
internal Error LastErrorCode
|
||||||
|
{
|
||||||
|
get { return lastErrorCode; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Bindings
|
||||||
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static IntPtr nvttCreateOutputOptions();
|
private extern static IntPtr nvttCreateOutputOptions();
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttDestroyOutputOptions(IntPtr outputOptions);
|
private extern static void nvttDestroyOutputOptions(IntPtr outputOptions);
|
||||||
|
|
||||||
[DllImport("nvtt", CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetOutputOptionsFileName(IntPtr outputOptions, string fileName);
|
private extern static void nvttSetOutputOptionsFileName(IntPtr outputOptions, string fileName);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttSetOutputOptionsErrorHandler(IntPtr outputOptions, ErrorHandler errorHandler);
|
private extern static void nvttSetOutputOptionsErrorHandler(IntPtr outputOptions, InternalErrorHandlerDelegate errorHandler);
|
||||||
|
|
||||||
private void ErrorCallback(Error error)
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
{
|
|
||||||
if (Error != null) Error(error);
|
|
||||||
}
|
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
|
||||||
private extern static void nvttSetOutputOptionsOutputHeader(IntPtr outputOptions, bool b);
|
private extern static void nvttSetOutputOptionsOutputHeader(IntPtr outputOptions, bool b);
|
||||||
|
|
||||||
//[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
//private extern static void nvttSetOutputOptionsOutputHandler(IntPtr outputOptions, WriteDataDelegate writeData, ImageDelegate image);
|
private extern static void nvttSetOutputOptionsOutputHandler(IntPtr outputOptions, IntPtr writeData, IntPtr image);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
internal IntPtr options;
|
internal IntPtr options;
|
||||||
|
|
||||||
|
//Note: these references are used to prevent garbage collection of the delegates(and hence class) if they are
|
||||||
|
//only referenced from unmanaged land.
|
||||||
|
private WriteDataDelegate writeDataDelegate;
|
||||||
|
private ImageDelegate beginImageDelegate;
|
||||||
|
|
||||||
|
private IOutputHandler currentOutputHandler;
|
||||||
|
|
||||||
public OutputOptions()
|
public OutputOptions()
|
||||||
{
|
{
|
||||||
options = nvttCreateOutputOptions();
|
options = nvttCreateOutputOptions();
|
||||||
nvttSetOutputOptionsErrorHandler(options, new ErrorHandler(ErrorCallback));
|
nvttSetOutputOptionsErrorHandler(options, ErrorCallback);
|
||||||
}
|
|
||||||
~OutputOptions()
|
|
||||||
{
|
|
||||||
nvttDestroyOutputOptions(options);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void SetFileName(string fileName)
|
public void SetFileName(string fileName)
|
||||||
{
|
{
|
||||||
nvttSetOutputOptionsFileName(options, fileName);
|
nvttSetOutputOptionsFileName(options, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public event ErrorHandler Error;
|
|
||||||
|
|
||||||
public void SetOutputHeader(bool b)
|
public void SetOutputHeader(bool b)
|
||||||
{
|
{
|
||||||
nvttSetOutputOptionsOutputHeader(options, b);
|
nvttSetOutputOptionsOutputHeader(options, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @@ Add OutputHandler interface.
|
public void SetOutputHandler(IOutputHandler outputHandler)
|
||||||
}
|
{
|
||||||
|
if (outputHandler != null)
|
||||||
|
{
|
||||||
|
//We need to store a ref in order to prevent garbage collection.
|
||||||
|
WriteDataDelegate tmpWriteDataDelegate = new WriteDataDelegate(WriteDataCallback);
|
||||||
|
ImageDelegate tmpBeginImageDelegate = new ImageDelegate(ImageCallback);
|
||||||
|
|
||||||
|
IntPtr ptrWriteData = Marshal.GetFunctionPointerForDelegate(tmpWriteDataDelegate);
|
||||||
|
IntPtr ptrBeginImage = Marshal.GetFunctionPointerForDelegate(tmpBeginImageDelegate);
|
||||||
|
|
||||||
|
|
||||||
|
nvttSetOutputOptionsOutputHandler(options, ptrWriteData, ptrBeginImage);
|
||||||
|
|
||||||
|
writeDataDelegate = tmpWriteDataDelegate;
|
||||||
|
beginImageDelegate = tmpBeginImageDelegate;
|
||||||
|
|
||||||
|
currentOutputHandler = outputHandler;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nvttSetOutputOptionsOutputHandler(options, IntPtr.Zero, IntPtr.Zero);
|
||||||
|
|
||||||
|
writeDataDelegate = null;
|
||||||
|
beginImageDelegate = null;
|
||||||
|
|
||||||
|
currentOutputHandler = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ErrorCallback(Error error)
|
||||||
|
{
|
||||||
|
lastErrorCode = error;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool WriteDataCallback(IntPtr data, int size)
|
||||||
|
{
|
||||||
|
if (currentOutputHandler != null)
|
||||||
|
return currentOutputHandler.WriteDataUnsafe(data, size);
|
||||||
|
else
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ImageCallback(int size, int width, int height, int depth, int face, int miplevel)
|
||||||
|
{
|
||||||
|
if (currentOutputHandler != null) currentOutputHandler.BeginImage(size, width, height, depth, face, miplevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IDisposable Members
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Dispose(true);
|
||||||
|
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (options != IntPtr.Zero)
|
||||||
|
{
|
||||||
|
nvttDestroyOutputOptions(options);
|
||||||
|
|
||||||
|
options = IntPtr.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
writeDataDelegate = null;
|
||||||
|
beginImageDelegate = null;
|
||||||
|
currentOutputHandler = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
~OutputOptions()
|
||||||
|
{
|
||||||
|
Dispose(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region public static class Compressor
|
#region public class Compressor
|
||||||
public class Compressor
|
public class Compressor : IDisposable
|
||||||
{
|
{
|
||||||
#region Bindings
|
#region Bindings
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static IntPtr nvttCreateCompressor();
|
private extern static IntPtr nvttCreateCompressor();
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static void nvttDestroyCompressor(IntPtr compressor);
|
private extern static void nvttDestroyCompressor(IntPtr compressor);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static bool nvttCompress(IntPtr compressor, IntPtr inputOptions, IntPtr compressionOptions, IntPtr outputOptions);
|
private extern static bool nvttCompress(IntPtr compressor, IntPtr inputOptions, IntPtr compressionOptions, IntPtr outputOptions);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private extern static int nvttEstimateSize(IntPtr compressor, IntPtr inputOptions, IntPtr compressionOptions);
|
private extern static int nvttEstimateSize(IntPtr compressor, IntPtr inputOptions, IntPtr compressionOptions);
|
||||||
|
|
||||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
private static extern IntPtr nvttErrorString(Error error);
|
private static extern IntPtr nvttErrorString(Error error);
|
||||||
|
|
||||||
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static uint nvttVersion();
|
||||||
|
|
||||||
|
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttEnableCudaCompression(IntPtr compressor, bool enable);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
internal IntPtr compressor;
|
internal IntPtr compressor;
|
||||||
|
private Thread creatingThread;
|
||||||
|
|
||||||
public Compressor()
|
public Compressor()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Strictly speaking the CLR may decide to move managed threads between OS thread, to prevent this we call BeginThreadAffinity().
|
||||||
|
* In practice this doesnt happen, but it may if the host is using some form of custom thread management.
|
||||||
|
*/
|
||||||
|
creatingThread = Thread.CurrentThread;
|
||||||
|
Thread.BeginThreadAffinity();
|
||||||
|
|
||||||
compressor = nvttCreateCompressor();
|
compressor = nvttCreateCompressor();
|
||||||
}
|
}
|
||||||
|
|
||||||
~Compressor()
|
public void Compress(InputOptions input, CompressionOptions compression, OutputOptions output)
|
||||||
{
|
{
|
||||||
nvttDestroyCompressor(compressor);
|
ValidateThread();
|
||||||
}
|
|
||||||
|
|
||||||
public bool Compress(InputOptions input, CompressionOptions compression, OutputOptions output)
|
if (!nvttCompress(compressor, input.options, compression.options, output.options))
|
||||||
{
|
{
|
||||||
return nvttCompress(compressor, input.options, compression.options, output.options);
|
//An error occured, use the last error registered.
|
||||||
|
throw new TextureToolsException(output.LastErrorCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int EstimateSize(InputOptions input, CompressionOptions compression)
|
public int EstimateSize(InputOptions input, CompressionOptions compression)
|
||||||
{
|
{
|
||||||
|
ValidateThread();
|
||||||
|
|
||||||
return nvttEstimateSize(compressor, input.options, compression.options);
|
return nvttEstimateSize(compressor, input.options, compression.options);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -520,7 +764,169 @@ namespace Nvidia.TextureTools
|
|||||||
return Marshal.PtrToStringAnsi(nvttErrorString(error));
|
return Marshal.PtrToStringAnsi(nvttErrorString(error));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
public static uint Version()
|
||||||
|
{
|
||||||
|
return nvttVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetEnableCuda(bool enableCuda)
|
||||||
|
{
|
||||||
|
ValidateThread();
|
||||||
|
|
||||||
|
nvttEnableCudaCompression(compressor, enableCuda);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidateThread()
|
||||||
|
{
|
||||||
|
if (Thread.CurrentThread != creatingThread)
|
||||||
|
{
|
||||||
|
throw new TextureToolsException(Error.Unknown, "Compressor objects should only be used on the thread which creates them, this is because CUDA stores per thread data.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region IDisposable Members
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Dispose(true);
|
||||||
|
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (compressor != IntPtr.Zero)
|
||||||
|
{
|
||||||
|
if (!disposing)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Throwing exceptions from finalizers is a bad idea, so just let the user know in a debug build.
|
||||||
|
* Otherwise we presumably leak the cuda context data, but still deallocate the memory for the compressor object.
|
||||||
|
*/
|
||||||
|
Debug.Fail("Compressor objects should always be disposed on the thread which creates them, this is because CUDA stores per thread data which should be cleaned up on the calling thread");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ValidateThread();
|
||||||
|
}
|
||||||
|
|
||||||
|
nvttDestroyCompressor(compressor);
|
||||||
|
compressor = IntPtr.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (creatingThread != null)
|
||||||
|
{
|
||||||
|
Thread.EndThreadAffinity();
|
||||||
|
creatingThread = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
~Compressor()
|
||||||
|
{
|
||||||
|
Dispose(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region public class CompressorOptionsBundle
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We provide a class which combines all the objects, this simplifies usage such as:
|
||||||
|
*
|
||||||
|
* using(CompressorOptionsBundle compressor = new CompressorOptionsBundle())
|
||||||
|
* {
|
||||||
|
* compressor.InputOptions.SetMipmapData(...);
|
||||||
|
* ...
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* Making it easy to write exception safe code etc.
|
||||||
|
*/
|
||||||
|
public class CompressorOptionsBundle : IDisposable
|
||||||
|
{
|
||||||
|
InputOptions inputOptions;
|
||||||
|
CompressionOptions compressionOptions;
|
||||||
|
OutputOptions outputOptions;
|
||||||
|
|
||||||
|
Compressor compressor;
|
||||||
|
|
||||||
|
public InputOptions InputOptions
|
||||||
|
{
|
||||||
|
get { return inputOptions; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public CompressionOptions CompressionOptions
|
||||||
|
{
|
||||||
|
get { return compressionOptions; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public OutputOptions OutputOptions
|
||||||
|
{
|
||||||
|
get { return outputOptions; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Compressor Compressor
|
||||||
|
{
|
||||||
|
get { return compressor; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public CompressorOptionsBundle()
|
||||||
|
{
|
||||||
|
inputOptions = new InputOptions();
|
||||||
|
compressionOptions = new CompressionOptions();
|
||||||
|
outputOptions = new OutputOptions();
|
||||||
|
compressor = new Compressor();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Compress()
|
||||||
|
{
|
||||||
|
compressor.Compress(inputOptions, compressionOptions, outputOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IDisposable Members
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Dispose(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
if (inputOptions != null)
|
||||||
|
{
|
||||||
|
inputOptions.Dispose();
|
||||||
|
inputOptions = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (compressionOptions != null)
|
||||||
|
{
|
||||||
|
compressionOptions.Dispose();
|
||||||
|
compressionOptions = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (outputOptions != null)
|
||||||
|
{
|
||||||
|
outputOptions.Dispose();
|
||||||
|
outputOptions = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (compressor != null)
|
||||||
|
{
|
||||||
|
compressor.Dispose();
|
||||||
|
compressor = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
} // Nvidia.TextureTools namespace
|
} // Nvidia.TextureTools namespace
|
||||||
|
@ -0,0 +1,482 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
||||||
|
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
|
||||||
|
using Microsoft.Xna.Framework.Content.Pipeline.Processors;
|
||||||
|
using Nvidia.TextureTools;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
|
||||||
|
namespace NvidiaTextureToolsProcessor
|
||||||
|
{
|
||||||
|
|
||||||
|
[ContentProcessor(DisplayName = "NvidiaTextureProcessor")]
|
||||||
|
public class NvidiaTextureProcessor : ContentProcessor<TextureContent, TextureContent>
|
||||||
|
{
|
||||||
|
// Note: We dont expose all of Texture Tools formats since XNA does not support the custom formats(eg ATI1 / ATI2 etc).
|
||||||
|
// Plus we can use some friendlier/more consistant names
|
||||||
|
public enum TextureOutputFormat
|
||||||
|
{
|
||||||
|
Colour,
|
||||||
|
Normals,
|
||||||
|
|
||||||
|
DXT1,
|
||||||
|
DXT1a, // With 1 bit alpha
|
||||||
|
DXT3,
|
||||||
|
DXT5,
|
||||||
|
DXT5n, // Compressed Normals HILO: R=1, G=y, B=0, A=x
|
||||||
|
}
|
||||||
|
|
||||||
|
bool convertToNormalMap = false;
|
||||||
|
|
||||||
|
bool generateMipmaps = true;
|
||||||
|
int maxMipLevel = -1;
|
||||||
|
|
||||||
|
float inputGamma = 2.2f;
|
||||||
|
float outputGamma = 2.2f;
|
||||||
|
|
||||||
|
TextureOutputFormat textureFormat = TextureOutputFormat.DXT1;
|
||||||
|
Quality quality = Quality.Normal;
|
||||||
|
WrapMode wrapMode = WrapMode.Mirror;
|
||||||
|
MipmapFilter mipMapFilter = MipmapFilter.Box;
|
||||||
|
RoundMode roundMode = RoundMode.None;
|
||||||
|
AlphaMode alphaMode = AlphaMode.None;
|
||||||
|
|
||||||
|
bool enableCuda = true;
|
||||||
|
|
||||||
|
[DisplayName("Convert To Normal Map")]
|
||||||
|
[DefaultValue(false)]
|
||||||
|
[Description("When true the input data is converted from colour/height data into a normal map if the output is a normal map.")]
|
||||||
|
[Category("Input")]
|
||||||
|
public bool ConvertToNormalMap
|
||||||
|
{
|
||||||
|
get { return convertToNormalMap; }
|
||||||
|
set { convertToNormalMap = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Generate Mip Maps")]
|
||||||
|
[DefaultValue(true)]
|
||||||
|
[Description("When set to true the processor will generate mip maps")]
|
||||||
|
[Category("Mip Mapping")]
|
||||||
|
public bool GenerateMipmaps
|
||||||
|
{
|
||||||
|
get { return generateMipmaps; }
|
||||||
|
set { generateMipmaps = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Max Mip Map Level")]
|
||||||
|
[DefaultValue(-1)]
|
||||||
|
[Description("Setting the max mip map level allows partial mip map chains to be generated. -1 generates all levels if mip map generation is enabled.")]
|
||||||
|
[Category("Mip Mapping")]
|
||||||
|
public int MaxMipMapLevel
|
||||||
|
{
|
||||||
|
get { return maxMipLevel; }
|
||||||
|
set { maxMipLevel = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Input Gamma")]
|
||||||
|
[DefaultValue(2.2f)]
|
||||||
|
[Description("The gamma conversion performed before mip map generation, for best results mip maps should be generated in linear colour space.")]
|
||||||
|
[Category("Gamma")]
|
||||||
|
public float InputGamma
|
||||||
|
{
|
||||||
|
get { return inputGamma; }
|
||||||
|
set { inputGamma = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Output Gamma")]
|
||||||
|
[DefaultValue(2.2f)]
|
||||||
|
[Description("The gamma conversion applied during output. In general this should be left at 2.2 for LDR images.")]
|
||||||
|
[Category("Gamma")]
|
||||||
|
public float OutputGamma
|
||||||
|
{
|
||||||
|
get { return outputGamma; }
|
||||||
|
set { outputGamma = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Texture Output Format")]
|
||||||
|
[DefaultValue(TextureOutputFormat.DXT1)]
|
||||||
|
[Description("The format which the processor generates, Color means no compression, DXT1 if useful for textures with no alpha, DXT5 for textures with alpha and DXT5n for normal maps.")]
|
||||||
|
[Category("Output")]
|
||||||
|
public TextureOutputFormat TextureFormat
|
||||||
|
{
|
||||||
|
get { return textureFormat; }
|
||||||
|
set { textureFormat = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Compression Quality")]
|
||||||
|
[DefaultValue(Quality.Normal)]
|
||||||
|
[Description("Specifies the amount of time the processor will spend trying to find the best quality compression. Highest should only be used for testing as it uses a brute force approach.")]
|
||||||
|
[Category("Output")]
|
||||||
|
public Quality Quality
|
||||||
|
{
|
||||||
|
get { return quality; }
|
||||||
|
set { quality = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Wrap Mode")]
|
||||||
|
[DefaultValue(WrapMode.Mirror)]
|
||||||
|
[Description("Specifying the wrap mode used for the texture can sometimes improve the quality of filtering. In general Mirror should give good results.")]
|
||||||
|
[Category("Input")]
|
||||||
|
public WrapMode WrapMode
|
||||||
|
{
|
||||||
|
get { return wrapMode; }
|
||||||
|
set { wrapMode = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Mip Map Filter")]
|
||||||
|
[DefaultValue(MipmapFilter.Box)]
|
||||||
|
[Description("Specifies which filter to use for down sampling mip maps. Box generally gives good results, Triangle will often appear blurry and Kaiser is the slowest but best quality.")]
|
||||||
|
[Category("Mip Mapping")]
|
||||||
|
public MipmapFilter MipMapFilter
|
||||||
|
{
|
||||||
|
get { return mipMapFilter; }
|
||||||
|
set { mipMapFilter = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Texture Size Rounding Mode")]
|
||||||
|
[DefaultValue(RoundMode.None)]
|
||||||
|
[Description("Setting the rounding mode allows the texture to be resized to a power of 2, often needed for less capable hardware.")]
|
||||||
|
[Category("Input")]
|
||||||
|
public RoundMode TextureRoundingMode
|
||||||
|
{
|
||||||
|
get { return roundMode; }
|
||||||
|
set { roundMode = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Alpha Mode")]
|
||||||
|
[DefaultValue(AlphaMode.None)]
|
||||||
|
[Description("Setting the alpha mode allows improved quality when generating mip maps.")]
|
||||||
|
[Category("Input")]
|
||||||
|
public AlphaMode AlphaMode
|
||||||
|
{
|
||||||
|
get { return alphaMode; }
|
||||||
|
set { alphaMode = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Enable Cuda")]
|
||||||
|
[DefaultValue(true)]
|
||||||
|
[Description("When true Cuda will be utilised if available.")]
|
||||||
|
[Category("Compressor")]
|
||||||
|
public bool EnableCuda
|
||||||
|
{
|
||||||
|
get { return enableCuda; }
|
||||||
|
set { enableCuda = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public override TextureContent Process(TextureContent input, ContentProcessorContext context)
|
||||||
|
{
|
||||||
|
//System.Diagnostics.Debugger.Launch();
|
||||||
|
|
||||||
|
input.Validate();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
using (CompressorOptionsBundle compressor = new CompressorOptionsBundle())
|
||||||
|
{
|
||||||
|
compressor.InputOptions.ResetTextureLayout();
|
||||||
|
|
||||||
|
TextureType textureType = FindTextureType(input);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set options
|
||||||
|
*/
|
||||||
|
|
||||||
|
compressor.InputOptions.SetTextureLayout(textureType, input.Faces[0][0].Width, input.Faces[0][0].Height, 1);
|
||||||
|
compressor.InputOptions.SetFormat(InputFormat.BGRA_8UB);
|
||||||
|
compressor.InputOptions.SetAlphaMode(AlphaMode);
|
||||||
|
compressor.InputOptions.SetMipmapFilter(MipMapFilter);
|
||||||
|
compressor.InputOptions.SetMipmapGeneration(GenerateMipmaps, MaxMipMapLevel);
|
||||||
|
compressor.InputOptions.SetRoundMode(TextureRoundingMode);
|
||||||
|
compressor.InputOptions.SetWrapMode(WrapMode);
|
||||||
|
|
||||||
|
compressor.InputOptions.SetGamma(InputGamma, OutputGamma);
|
||||||
|
compressor.InputOptions.SetNormalizeMipmaps(false);
|
||||||
|
compressor.InputOptions.SetNormalMap(false);
|
||||||
|
compressor.InputOptions.SetConvertToNormalMap(false);
|
||||||
|
|
||||||
|
compressor.CompressionOptions.SetQuality(Quality);
|
||||||
|
|
||||||
|
GeneralOutputHandler outputHandler;
|
||||||
|
|
||||||
|
switch (TextureFormat)
|
||||||
|
{
|
||||||
|
case TextureOutputFormat.Colour:
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.RGBA);
|
||||||
|
outputHandler = new PixelOutputHandler<Color>(textureType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureOutputFormat.Normals:
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.RGBA);
|
||||||
|
outputHandler = new PixelOutputHandler<Color>(textureType);
|
||||||
|
|
||||||
|
compressor.InputOptions.SetNormalizeMipmaps(true);
|
||||||
|
compressor.InputOptions.SetNormalMap(true);
|
||||||
|
compressor.InputOptions.SetConvertToNormalMap(ConvertToNormalMap);
|
||||||
|
compressor.InputOptions.SetGamma(1.0f, 1.0f);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureOutputFormat.DXT1:
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.DXT1);
|
||||||
|
outputHandler = new Dxt1OutputHandler(textureType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureOutputFormat.DXT1a:
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.DXT1a);
|
||||||
|
outputHandler = new Dxt1OutputHandler(textureType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureOutputFormat.DXT3:
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.DXT3);
|
||||||
|
outputHandler = new Dxt3OutputHandler(textureType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureOutputFormat.DXT5:
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.DXT5);
|
||||||
|
outputHandler = new Dxt5OutputHandler(textureType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureOutputFormat.DXT5n:
|
||||||
|
//FIXME: We force fastest quality since the normal compression mode is _very_ slow.
|
||||||
|
compressor.CompressionOptions.SetQuality(Quality.Fastest);
|
||||||
|
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.DXT5n);
|
||||||
|
|
||||||
|
compressor.InputOptions.SetNormalizeMipmaps(true);
|
||||||
|
compressor.InputOptions.SetNormalMap(true);
|
||||||
|
compressor.InputOptions.SetConvertToNormalMap(ConvertToNormalMap);
|
||||||
|
compressor.InputOptions.SetGamma(1.0f, 1.0f);
|
||||||
|
|
||||||
|
outputHandler = new Dxt5OutputHandler(textureType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new NotSupportedException("Unknown texture output format: " + TextureFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set input data
|
||||||
|
*/
|
||||||
|
|
||||||
|
//TODO: Use a float format when texture tools support it.
|
||||||
|
input.ConvertBitmapType(typeof(PixelBitmapContent<Color>));
|
||||||
|
|
||||||
|
for (int i = 0; i < input.Faces.Count; i++)
|
||||||
|
{
|
||||||
|
MipmapChain mipChain = input.Faces[i];
|
||||||
|
|
||||||
|
for (int j = 0; j < mipChain.Count; j++)
|
||||||
|
{
|
||||||
|
BitmapContent bitmap = mipChain[j];
|
||||||
|
|
||||||
|
byte[] bitmapData = bitmap.GetPixelData();
|
||||||
|
|
||||||
|
//FIXME: When we move to XNA 4 the layout of Color will change, hence we need to swizzle the input.
|
||||||
|
compressor.InputOptions.SetMipmapData(bitmapData, bitmap.Width, bitmap.Height, 1, i, j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Setup output
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
compressor.OutputOptions.SetOutputHandler(outputHandler);
|
||||||
|
compressor.OutputOptions.SetOutputHeader(false);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Go!
|
||||||
|
*/
|
||||||
|
compressor.Compressor.SetEnableCuda(EnableCuda);
|
||||||
|
|
||||||
|
compressor.Compress();
|
||||||
|
/*
|
||||||
|
* Check the output makes sense.
|
||||||
|
*/
|
||||||
|
|
||||||
|
outputHandler.OutputTextureContent.Validate();
|
||||||
|
|
||||||
|
return outputHandler.OutputTextureContent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (TextureToolsException ttexcept)
|
||||||
|
{
|
||||||
|
throw ConvertException(ttexcept);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private TextureType FindTextureType(TextureContent input)
|
||||||
|
{
|
||||||
|
if (input is Texture2DContent)
|
||||||
|
return TextureType.Texture2D;
|
||||||
|
else if (input is TextureCubeContent)
|
||||||
|
return TextureType.TextureCube;
|
||||||
|
else
|
||||||
|
throw new InvalidContentException("Invalid texture type, cube maps are not supported", input.Identity);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private Exception ConvertException(TextureToolsException ttexcept)
|
||||||
|
{
|
||||||
|
switch (ttexcept.ErrorCode)
|
||||||
|
{
|
||||||
|
case Error.UnsupportedFeature:
|
||||||
|
return new NotSupportedException("Attempt to use a unsupported feature of NVIDIA Texture Tools",ttexcept);
|
||||||
|
|
||||||
|
case Error.InvalidInput:
|
||||||
|
return new InvalidContentException("Invalid input to NVIDIA texture tools", ttexcept);
|
||||||
|
|
||||||
|
case Error.CudaError:
|
||||||
|
case Error.Unknown:
|
||||||
|
return new InvalidOperationException("NVIDIA Texture Tools returned the following error: " + ttexcept.Message, ttexcept);
|
||||||
|
|
||||||
|
case Error.FileOpen:
|
||||||
|
case Error.FileWrite:
|
||||||
|
return new IOException("NVIDIA Texture Tools returned the following error: " + ttexcept.Message, ttexcept);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return new InvalidOperationException("NVIDIA Texture Tools returned an unknown error: " + ttexcept.Message, ttexcept);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class Dxt1OutputHandler : GeneralOutputHandler
|
||||||
|
{
|
||||||
|
public Dxt1OutputHandler(TextureType textureType) : base(textureType)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override BitmapContent CreateBitmapContent(int width, int height)
|
||||||
|
{
|
||||||
|
return new Dxt1BitmapContent(width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class Dxt3OutputHandler : GeneralOutputHandler
|
||||||
|
{
|
||||||
|
public Dxt3OutputHandler(TextureType textureType)
|
||||||
|
: base(textureType)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override BitmapContent CreateBitmapContent(int width, int height)
|
||||||
|
{
|
||||||
|
return new Dxt3BitmapContent(width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class Dxt5OutputHandler : GeneralOutputHandler
|
||||||
|
{
|
||||||
|
public Dxt5OutputHandler(TextureType textureType)
|
||||||
|
: base(textureType)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override BitmapContent CreateBitmapContent(int width, int height)
|
||||||
|
{
|
||||||
|
return new Dxt5BitmapContent(width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class PixelOutputHandler<T> : GeneralOutputHandler
|
||||||
|
where T : struct, System.IEquatable<T>
|
||||||
|
{
|
||||||
|
public PixelOutputHandler(TextureType textureType)
|
||||||
|
: base(textureType)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override BitmapContent CreateBitmapContent(int width, int height)
|
||||||
|
{
|
||||||
|
return new PixelBitmapContent<T>(width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private abstract class GeneralOutputHandler : OutputHandlerBase
|
||||||
|
{
|
||||||
|
TextureContent outputTextureContent;
|
||||||
|
|
||||||
|
byte[] tempBitmapData;
|
||||||
|
|
||||||
|
int dataWidth = -1;
|
||||||
|
int dataHeight = -1;
|
||||||
|
int dataSize = -1;
|
||||||
|
|
||||||
|
int faceIndex = -1;
|
||||||
|
int mipIndex = -1;
|
||||||
|
int dataIndex = 0;
|
||||||
|
|
||||||
|
public TextureContent OutputTextureContent
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
CommitLevel();
|
||||||
|
return outputTextureContent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected GeneralOutputHandler(TextureType textureType)
|
||||||
|
{
|
||||||
|
switch (textureType)
|
||||||
|
{
|
||||||
|
case TextureType.Texture2D:
|
||||||
|
outputTextureContent = new Texture2DContent();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureType.TextureCube:
|
||||||
|
outputTextureContent = new TextureCubeContent();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new NotSupportedException("Unknown texture type: " + textureType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void BeginImage(int size, int width, int height, int depth, int face, int miplevel)
|
||||||
|
{
|
||||||
|
CommitLevel();
|
||||||
|
|
||||||
|
dataIndex = 0;
|
||||||
|
mipIndex = miplevel;
|
||||||
|
faceIndex = face;
|
||||||
|
|
||||||
|
dataWidth = width;
|
||||||
|
dataHeight = height;
|
||||||
|
dataSize = size;
|
||||||
|
|
||||||
|
tempBitmapData = new byte[size];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void WriteData(byte[] dataBuffer, int startIndex, int count)
|
||||||
|
{
|
||||||
|
Array.Copy(dataBuffer, startIndex, tempBitmapData, dataIndex, count);
|
||||||
|
dataIndex += count;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract BitmapContent CreateBitmapContent(int width, int height);
|
||||||
|
|
||||||
|
private void CommitLevel()
|
||||||
|
{
|
||||||
|
if (faceIndex >= 0)
|
||||||
|
{
|
||||||
|
BitmapContent newBitmap = CreateBitmapContent(dataWidth, dataHeight);
|
||||||
|
|
||||||
|
newBitmap.SetPixelData(tempBitmapData);
|
||||||
|
|
||||||
|
outputTextureContent.Faces[faceIndex].Add(newBitmap);
|
||||||
|
|
||||||
|
dataSize = -1;
|
||||||
|
dataWidth = dataHeight = -1;
|
||||||
|
faceIndex = -1;
|
||||||
|
mipIndex = -1;
|
||||||
|
dataIndex = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,122 @@
|
|||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectGuid>{F4446AE2-B5E1-4D17-B33C-275A6770FD50}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>NvidiaTextureToolsProcessor</RootNamespace>
|
||||||
|
<AssemblyName>NvidiaTextureToolsProcessor</AssemblyName>
|
||||||
|
<XnaFrameworkVersion>v3.1</XnaFrameworkVersion>
|
||||||
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<XnaPlatform>Windows</XnaPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<XnaPlatform>Windows</XnaPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Xbox 360' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Xbox 360\Debug</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<XnaPlatform>Xbox 360</XnaPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Xbox 360' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Xbox 360\Release</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<XnaPlatform>Xbox 360</XnaPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Zune' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Zune\Debug</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<XnaPlatform>Zune</XnaPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Zune' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Zune\Release</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<XnaPlatform>Zune</XnaPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=x86">
|
||||||
|
<Private>False</Private>
|
||||||
|
<SpecificVersion>True</SpecificVersion>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework.Game, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL">
|
||||||
|
<Private>False</Private>
|
||||||
|
<SpecificVersion>True</SpecificVersion>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=x86">
|
||||||
|
<Private>False</Private>
|
||||||
|
<SpecificVersion>true</SpecificVersion>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Core">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml.Linq">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="..\Nvidia.TextureTools\TextureTools.cs">
|
||||||
|
<Link>TextureTools.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="NvidiaTextureProcessor.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.ContentPipelineExtensions.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
|
# Visual C# Express 2008
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NvidiaTextureToolsProcessor", "NvidiaTextureToolsProcessor.csproj", "{F4446AE2-B5E1-4D17-B33C-275A6770FD50}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Debug|Xbox 360 = Debug|Xbox 360
|
||||||
|
Debug|Zune = Debug|Zune
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
Release|Xbox 360 = Release|Xbox 360
|
||||||
|
Release|Zune = Release|Zune
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Debug|Xbox 360.Build.0 = Debug|Xbox 360
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Debug|Zune.ActiveCfg = Debug|Zune
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Debug|Zune.Build.0 = Debug|Zune
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Release|x86.Build.0 = Release|x86
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Release|Xbox 360.Build.0 = Release|Xbox 360
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Release|Zune.ActiveCfg = Release|Zune
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Release|Zune.Build.0 = Release|Zune
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
@ -0,0 +1,33 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("NvidiaTextureToolsProcessor")]
|
||||||
|
[assembly: AssemblyDescription("An XNA Content Processor for use with GameStudio 3.1")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("NvidiaTextureToolsProcessor")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2010")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("6c0942a6-4e6a-411b-9275-d2676f9720d3")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -71,12 +71,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "NVIDIA Corporation"
|
VALUE "CompanyName", "NVIDIA Corporation"
|
||||||
VALUE "FileDescription", "NVIDIA Texture Tools Dynamic Link Library"
|
VALUE "FileDescription", "NVIDIA Texture Tools Dynamic Link Library"
|
||||||
VALUE "FileVersion", "2, 0, 6, 0"
|
VALUE "FileVersion", "2, 0, 8, 0"
|
||||||
VALUE "InternalName", "nvtt"
|
VALUE "InternalName", "nvtt"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2007"
|
VALUE "LegalCopyright", "Copyright (C) 2007-2010"
|
||||||
VALUE "OriginalFilename", "nvtt.dll"
|
VALUE "OriginalFilename", "nvtt.dll"
|
||||||
VALUE "ProductName", "NVIDIA Texture Tools Dynamic Link Library"
|
VALUE "ProductName", "NVIDIA Texture Tools Dynamic Link Library"
|
||||||
VALUE "ProductVersion", "2, 0, 6, 0"
|
VALUE "ProductVersion", "2, 0, 8, 0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -179,6 +179,8 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Copying header files..."
|
||||||
|
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
@ -344,6 +346,8 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Copying header files..."
|
||||||
|
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
@ -503,6 +507,8 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Copying header files..."
|
||||||
|
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
@ -664,6 +670,8 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Copying header files..."
|
||||||
|
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
|
52
project/vc9/Nvidia.TextureTools/Nvidia.TextureTools.csproj
Normal file
52
project/vc9/Nvidia.TextureTools/Nvidia.TextureTools.csproj
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProductVersion>8.0.50727</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{CAB55C39-8FA9-4912-98D9-E52669C8911D}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>Nvidia.TextureTools</RootNamespace>
|
||||||
|
<AssemblyName>Nvidia.TextureTools</AssemblyName>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
<OldToolsVersion>2.0</OldToolsVersion>
|
||||||
|
<UpgradeBackupLocation>
|
||||||
|
</UpgradeBackupLocation>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="TextureTools.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
35
project/vc9/Nvidia.TextureTools/Properties/AssemblyInfo.cs
Normal file
35
project/vc9/Nvidia.TextureTools/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("Nvidia.TextureTools")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("NVIDIA Corporation")]
|
||||||
|
[assembly: AssemblyProduct("Nvidia.TextureTools")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © NVIDIA 2008")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("5fa03fb3-b7a3-4ba8-90e7-545929731356")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
526
project/vc9/Nvidia.TextureTools/TextureTools.cs
Normal file
526
project/vc9/Nvidia.TextureTools/TextureTools.cs
Normal file
@ -0,0 +1,526 @@
|
|||||||
|
using System;
|
||||||
|
using System.Security;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace Nvidia.TextureTools
|
||||||
|
{
|
||||||
|
#region Enums
|
||||||
|
|
||||||
|
#region public enum Format
|
||||||
|
/// <summary>
|
||||||
|
/// Compression format.
|
||||||
|
/// </summary>
|
||||||
|
public enum Format
|
||||||
|
{
|
||||||
|
// No compression.
|
||||||
|
RGB,
|
||||||
|
RGBA = RGB,
|
||||||
|
|
||||||
|
// DX9 formats.
|
||||||
|
DXT1,
|
||||||
|
DXT1a,
|
||||||
|
DXT3,
|
||||||
|
DXT5,
|
||||||
|
DXT5n,
|
||||||
|
|
||||||
|
// DX10 formats.
|
||||||
|
BC1 = DXT1,
|
||||||
|
BC1a = DXT1a,
|
||||||
|
BC2 = DXT3,
|
||||||
|
BC3 = DXT5,
|
||||||
|
BC3n = DXT5n,
|
||||||
|
BC4,
|
||||||
|
BC5,
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public enum Quality
|
||||||
|
/// <summary>
|
||||||
|
/// Quality modes.
|
||||||
|
/// </summary>
|
||||||
|
public enum Quality
|
||||||
|
{
|
||||||
|
Fastest,
|
||||||
|
Normal,
|
||||||
|
Production,
|
||||||
|
Highest,
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public enum WrapMode
|
||||||
|
/// <summary>
|
||||||
|
/// Wrap modes.
|
||||||
|
/// </summary>
|
||||||
|
public enum WrapMode
|
||||||
|
{
|
||||||
|
Clamp,
|
||||||
|
Repeat,
|
||||||
|
Mirror,
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public enum TextureType
|
||||||
|
/// <summary>
|
||||||
|
/// Texture types.
|
||||||
|
/// </summary>
|
||||||
|
public enum TextureType
|
||||||
|
{
|
||||||
|
Texture2D,
|
||||||
|
TextureCube,
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public enum InputFormat
|
||||||
|
/// <summary>
|
||||||
|
/// Input formats.
|
||||||
|
/// </summary>
|
||||||
|
public enum InputFormat
|
||||||
|
{
|
||||||
|
BGRA_8UB
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public enum MipmapFilter
|
||||||
|
/// <summary>
|
||||||
|
/// Mipmap downsampling filters.
|
||||||
|
/// </summary>
|
||||||
|
public enum MipmapFilter
|
||||||
|
{
|
||||||
|
Box,
|
||||||
|
Triangle,
|
||||||
|
Kaiser
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public enum ColorTransform
|
||||||
|
/// <summary>
|
||||||
|
/// Color transformation.
|
||||||
|
/// </summary>
|
||||||
|
public enum ColorTransform
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
Linear
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public enum RoundMode
|
||||||
|
/// <summary>
|
||||||
|
/// Extents rounding mode.
|
||||||
|
/// </summary>
|
||||||
|
public enum RoundMode
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
ToNextPowerOfTwo,
|
||||||
|
ToNearestPowerOfTwo,
|
||||||
|
ToPreviousPowerOfTwo
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public enum AlphaMode
|
||||||
|
/// <summary>
|
||||||
|
/// Alpha mode.
|
||||||
|
/// </summary>
|
||||||
|
public enum AlphaMode
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
Transparency,
|
||||||
|
Premultiplied
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public enum Error
|
||||||
|
/// <summary>
|
||||||
|
/// Error codes.
|
||||||
|
/// </summary>
|
||||||
|
public enum Error
|
||||||
|
{
|
||||||
|
InvalidInput,
|
||||||
|
UserInterruption,
|
||||||
|
UnsupportedFeature,
|
||||||
|
CudaError,
|
||||||
|
Unknown,
|
||||||
|
FileOpen,
|
||||||
|
FileWrite,
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public class InputOptions
|
||||||
|
/// <summary>
|
||||||
|
/// Input options.
|
||||||
|
/// </summary>
|
||||||
|
public class InputOptions
|
||||||
|
{
|
||||||
|
#region Bindings
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static IntPtr nvttCreateInputOptions();
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttDestroyInputOptions(IntPtr inputOptions);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsTextureLayout(IntPtr inputOptions, TextureType type, int w, int h, int d);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttResetInputOptionsTextureLayout(IntPtr inputOptions);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static bool nvttSetInputOptionsMipmapData(IntPtr inputOptions, IntPtr data, int w, int h, int d, int face, int mipmap);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsFormat(IntPtr inputOptions, InputFormat format);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsAlphaMode(IntPtr inputOptions, AlphaMode alphaMode);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsGamma(IntPtr inputOptions, float inputGamma, float outputGamma);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsWrapMode(IntPtr inputOptions, WrapMode mode);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsMipmapFilter(IntPtr inputOptions, MipmapFilter filter);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsMipmapGeneration(IntPtr inputOptions, bool generateMipmaps, int maxLevel);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsKaiserParameters(IntPtr inputOptions, float width, float alpha, float stretch);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsNormalMap(IntPtr inputOptions, bool b);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsConvertToNormalMap(IntPtr inputOptions, bool convert);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsHeightEvaluation(IntPtr inputOptions, float redScale, float greenScale, float blueScale, float alphaScale);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsNormalFilter(IntPtr inputOptions, float small, float medium, float big, float large);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsNormalizeMipmaps(IntPtr inputOptions, bool b);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsColorTransform(IntPtr inputOptions, ColorTransform t);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsLinearTransfrom(IntPtr inputOptions, int channel, float w0, float w1, float w2, float w3);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsMaxExtents(IntPtr inputOptions, int d);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetInputOptionsRoundMode(IntPtr inputOptions, RoundMode mode);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
internal IntPtr options;
|
||||||
|
|
||||||
|
public InputOptions()
|
||||||
|
{
|
||||||
|
options = nvttCreateInputOptions();
|
||||||
|
}
|
||||||
|
~InputOptions()
|
||||||
|
{
|
||||||
|
nvttDestroyInputOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetTextureLayout(TextureType type, int w, int h, int d)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsTextureLayout(options, type, w, h, d);
|
||||||
|
}
|
||||||
|
public void ResetTextureLayout()
|
||||||
|
{
|
||||||
|
nvttResetInputOptionsTextureLayout(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetMipmapData(IntPtr data, int width, int height, int depth, int face, int mipmap)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsMipmapData(options, data, width, height, depth, face, mipmap);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetFormat(InputFormat format)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsFormat(options, format);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetAlphaMode(AlphaMode alphaMode)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsAlphaMode(options, alphaMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetGamma(float inputGamma, float outputGamma)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsGamma(options, inputGamma, outputGamma);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetWrapMode(WrapMode wrapMode)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsWrapMode(options, wrapMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetMipmapFilter(MipmapFilter filter)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsMipmapFilter(options, filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetMipmapGeneration(bool enabled)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsMipmapGeneration(options, enabled, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetMipmapGeneration(bool enabled, int maxLevel)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsMipmapGeneration(options, enabled, maxLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetKaiserParameters(float width, float alpha, float stretch)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsKaiserParameters(options, width, alpha, stretch);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetNormalMap(bool b)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsNormalMap(options, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetConvertToNormalMap(bool convert)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsConvertToNormalMap(options, convert);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetHeightEvaluation(float redScale, float greenScale, float blueScale, float alphaScale)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsHeightEvaluation(options, redScale, greenScale, blueScale, alphaScale);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetNormalFilter(float small, float medium, float big, float large)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsNormalFilter(options, small, medium, big, large);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetNormalizeMipmaps(bool b)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsNormalizeMipmaps(options, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetColorTransform(ColorTransform t)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsColorTransform(options, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetLinearTransfrom(int channel, float w0, float w1, float w2, float w3)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsLinearTransfrom(options, channel, w0, w1, w2, w3);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetMaxExtents(int dim)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsMaxExtents(options, dim);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetRoundMode(RoundMode mode)
|
||||||
|
{
|
||||||
|
nvttSetInputOptionsRoundMode(options, mode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public class CompressionOptions
|
||||||
|
/// <summary>
|
||||||
|
/// Compression options.
|
||||||
|
/// </summary>
|
||||||
|
public class CompressionOptions
|
||||||
|
{
|
||||||
|
#region Bindings
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static IntPtr nvttCreateCompressionOptions();
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttDestroyCompressionOptions(IntPtr compressionOptions);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetCompressionOptionsFormat(IntPtr compressionOptions, Format format);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetCompressionOptionsQuality(IntPtr compressionOptions, Quality quality);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetCompressionOptionsColorWeights(IntPtr compressionOptions, float red, float green, float blue, float alpha);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetCompressionOptionsPixelFormat(IntPtr compressionOptions, uint bitcount, uint rmask, uint gmask, uint bmask, uint amask);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetCompressionOptionsQuantization(IntPtr compressionOptions, bool colorDithering, bool alphaDithering, bool binaryAlpha, int alphaThreshold);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
internal IntPtr options;
|
||||||
|
|
||||||
|
public CompressionOptions()
|
||||||
|
{
|
||||||
|
options = nvttCreateCompressionOptions();
|
||||||
|
}
|
||||||
|
~CompressionOptions()
|
||||||
|
{
|
||||||
|
nvttDestroyCompressionOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetFormat(Format format)
|
||||||
|
{
|
||||||
|
nvttSetCompressionOptionsFormat(options, format);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetQuality(Quality quality)
|
||||||
|
{
|
||||||
|
nvttSetCompressionOptionsQuality(options, quality);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetColorWeights(float red, float green, float blue)
|
||||||
|
{
|
||||||
|
nvttSetCompressionOptionsColorWeights(options, red, green, blue, 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetColorWeights(float red, float green, float blue, float alpha)
|
||||||
|
{
|
||||||
|
nvttSetCompressionOptionsColorWeights(options, red, green, blue, alpha);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask)
|
||||||
|
{
|
||||||
|
nvttSetCompressionOptionsPixelFormat(options, bitcount, rmask, gmask, bmask, amask);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetQuantization(bool colorDithering, bool alphaDithering, bool binaryAlpha)
|
||||||
|
{
|
||||||
|
nvttSetCompressionOptionsQuantization(options, colorDithering, alphaDithering, binaryAlpha, 127);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetQuantization(bool colorDithering, bool alphaDithering, bool binaryAlpha, int alphaThreshold)
|
||||||
|
{
|
||||||
|
nvttSetCompressionOptionsQuantization(options, colorDithering, alphaDithering, binaryAlpha, alphaThreshold);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public class OutputOptions
|
||||||
|
/// <summary>
|
||||||
|
/// Output options.
|
||||||
|
/// </summary>
|
||||||
|
public class OutputOptions
|
||||||
|
{
|
||||||
|
#region Delegates
|
||||||
|
public delegate void ErrorHandler(Error error);
|
||||||
|
private delegate void WriteDataDelegate(IntPtr data, int size);
|
||||||
|
private delegate void ImageDelegate(int size, int width, int height, int depth, int face, int miplevel);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Bindings
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static IntPtr nvttCreateOutputOptions();
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttDestroyOutputOptions(IntPtr outputOptions);
|
||||||
|
|
||||||
|
[DllImport("nvtt", CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetOutputOptionsFileName(IntPtr outputOptions, string fileName);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetOutputOptionsErrorHandler(IntPtr outputOptions, ErrorHandler errorHandler);
|
||||||
|
|
||||||
|
private void ErrorCallback(Error error)
|
||||||
|
{
|
||||||
|
if (Error != null) Error(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttSetOutputOptionsOutputHeader(IntPtr outputOptions, bool b);
|
||||||
|
|
||||||
|
//[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
//private extern static void nvttSetOutputOptionsOutputHandler(IntPtr outputOptions, WriteDataDelegate writeData, ImageDelegate image);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
internal IntPtr options;
|
||||||
|
|
||||||
|
public OutputOptions()
|
||||||
|
{
|
||||||
|
options = nvttCreateOutputOptions();
|
||||||
|
nvttSetOutputOptionsErrorHandler(options, new ErrorHandler(ErrorCallback));
|
||||||
|
}
|
||||||
|
~OutputOptions()
|
||||||
|
{
|
||||||
|
nvttDestroyOutputOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetFileName(string fileName)
|
||||||
|
{
|
||||||
|
nvttSetOutputOptionsFileName(options, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public event ErrorHandler Error;
|
||||||
|
|
||||||
|
public void SetOutputHeader(bool b)
|
||||||
|
{
|
||||||
|
nvttSetOutputOptionsOutputHeader(options, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@ Add OutputHandler interface.
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region public static class Compressor
|
||||||
|
public class Compressor
|
||||||
|
{
|
||||||
|
#region Bindings
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static IntPtr nvttCreateCompressor();
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static void nvttDestroyCompressor(IntPtr compressor);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static bool nvttCompress(IntPtr compressor, IntPtr inputOptions, IntPtr compressionOptions, IntPtr outputOptions);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private extern static int nvttEstimateSize(IntPtr compressor, IntPtr inputOptions, IntPtr compressionOptions);
|
||||||
|
|
||||||
|
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||||
|
private static extern IntPtr nvttErrorString(Error error);
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
internal IntPtr compressor;
|
||||||
|
|
||||||
|
public Compressor()
|
||||||
|
{
|
||||||
|
compressor = nvttCreateCompressor();
|
||||||
|
}
|
||||||
|
|
||||||
|
~Compressor()
|
||||||
|
{
|
||||||
|
nvttDestroyCompressor(compressor);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Compress(InputOptions input, CompressionOptions compression, OutputOptions output)
|
||||||
|
{
|
||||||
|
return nvttCompress(compressor, input.options, compression.options, output.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int EstimateSize(InputOptions input, CompressionOptions compression)
|
||||||
|
{
|
||||||
|
return nvttEstimateSize(compressor, input.options, compression.options);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ErrorString(Error error)
|
||||||
|
{
|
||||||
|
return Marshal.PtrToStringAnsi(nvttErrorString(error));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
} // Nvidia.TextureTools namespace
|
@ -0,0 +1,482 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
|
using Microsoft.Xna.Framework.Content.Pipeline;
|
||||||
|
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
|
||||||
|
using Microsoft.Xna.Framework.Content.Pipeline.Processors;
|
||||||
|
using Nvidia.TextureTools;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
|
||||||
|
namespace NvidiaTextureToolsProcessor
|
||||||
|
{
|
||||||
|
|
||||||
|
[ContentProcessor(DisplayName = "NvidiaTextureProcessor")]
|
||||||
|
public class NvidiaTextureProcessor : ContentProcessor<TextureContent, TextureContent>
|
||||||
|
{
|
||||||
|
// Note: We dont expose all of Texture Tools formats since XNA does not support the custom formats(eg ATI1 / ATI2 etc).
|
||||||
|
// Plus we can use some friendlier/more consistant names
|
||||||
|
public enum TextureOutputFormat
|
||||||
|
{
|
||||||
|
Colour,
|
||||||
|
Normals,
|
||||||
|
|
||||||
|
DXT1,
|
||||||
|
DXT1a, // With 1 bit alpha
|
||||||
|
DXT3,
|
||||||
|
DXT5,
|
||||||
|
DXT5n, // Compressed Normals HILO: R=1, G=y, B=0, A=x
|
||||||
|
}
|
||||||
|
|
||||||
|
bool convertToNormalMap = false;
|
||||||
|
|
||||||
|
bool generateMipmaps = true;
|
||||||
|
int maxMipLevel = -1;
|
||||||
|
|
||||||
|
float inputGamma = 2.2f;
|
||||||
|
float outputGamma = 2.2f;
|
||||||
|
|
||||||
|
TextureOutputFormat textureFormat = TextureOutputFormat.DXT1;
|
||||||
|
Quality quality = Quality.Normal;
|
||||||
|
WrapMode wrapMode = WrapMode.Mirror;
|
||||||
|
MipmapFilter mipMapFilter = MipmapFilter.Box;
|
||||||
|
RoundMode roundMode = RoundMode.None;
|
||||||
|
AlphaMode alphaMode = AlphaMode.None;
|
||||||
|
|
||||||
|
bool enableCuda = true;
|
||||||
|
|
||||||
|
[DisplayName("Convert To Normal Map")]
|
||||||
|
[DefaultValue(false)]
|
||||||
|
[Description("When true the input data is converted from colour/height data into a normal map if the output is a normal map.")]
|
||||||
|
[Category("Input")]
|
||||||
|
public bool ConvertToNormalMap
|
||||||
|
{
|
||||||
|
get { return convertToNormalMap; }
|
||||||
|
set { convertToNormalMap = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Generate Mip Maps")]
|
||||||
|
[DefaultValue(true)]
|
||||||
|
[Description("When set to true the processor will generate mip maps")]
|
||||||
|
[Category("Mip Mapping")]
|
||||||
|
public bool GenerateMipmaps
|
||||||
|
{
|
||||||
|
get { return generateMipmaps; }
|
||||||
|
set { generateMipmaps = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Max Mip Map Level")]
|
||||||
|
[DefaultValue(-1)]
|
||||||
|
[Description("Setting the max mip map level allows partial mip map chains to be generated. -1 generates all levels if mip map generation is enabled.")]
|
||||||
|
[Category("Mip Mapping")]
|
||||||
|
public int MaxMipMapLevel
|
||||||
|
{
|
||||||
|
get { return maxMipLevel; }
|
||||||
|
set { maxMipLevel = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Input Gamma")]
|
||||||
|
[DefaultValue(2.2f)]
|
||||||
|
[Description("The gamma conversion performed before mip map generation, for best results mip maps should be generated in linear colour space.")]
|
||||||
|
[Category("Gamma")]
|
||||||
|
public float InputGamma
|
||||||
|
{
|
||||||
|
get { return inputGamma; }
|
||||||
|
set { inputGamma = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Output Gamma")]
|
||||||
|
[DefaultValue(2.2f)]
|
||||||
|
[Description("The gamma conversion applied during output. In general this should be left at 2.2 for LDR images.")]
|
||||||
|
[Category("Gamma")]
|
||||||
|
public float OutputGamma
|
||||||
|
{
|
||||||
|
get { return outputGamma; }
|
||||||
|
set { outputGamma = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Texture Output Format")]
|
||||||
|
[DefaultValue(TextureOutputFormat.DXT1)]
|
||||||
|
[Description("The format which the processor generates, Color means no compression, DXT1 if useful for textures with no alpha, DXT5 for textures with alpha and DXT5n for normal maps.")]
|
||||||
|
[Category("Output")]
|
||||||
|
public TextureOutputFormat TextureFormat
|
||||||
|
{
|
||||||
|
get { return textureFormat; }
|
||||||
|
set { textureFormat = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Compression Quality")]
|
||||||
|
[DefaultValue(Quality.Normal)]
|
||||||
|
[Description("Specifies the amount of time the processor will spend trying to find the best quality compression. Highest should only be used for testing as it uses a brute force approach.")]
|
||||||
|
[Category("Output")]
|
||||||
|
public Quality Quality
|
||||||
|
{
|
||||||
|
get { return quality; }
|
||||||
|
set { quality = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Wrap Mode")]
|
||||||
|
[DefaultValue(WrapMode.Mirror)]
|
||||||
|
[Description("Specifying the wrap mode used for the texture can sometimes improve the quality of filtering. In general Mirror should give good results.")]
|
||||||
|
[Category("Input")]
|
||||||
|
public WrapMode WrapMode
|
||||||
|
{
|
||||||
|
get { return wrapMode; }
|
||||||
|
set { wrapMode = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Mip Map Filter")]
|
||||||
|
[DefaultValue(MipmapFilter.Box)]
|
||||||
|
[Description("Specifies which filter to use for down sampling mip maps. Box generally gives good results, Triangle will often appear blurry and Kaiser is the slowest but best quality.")]
|
||||||
|
[Category("Mip Mapping")]
|
||||||
|
public MipmapFilter MipMapFilter
|
||||||
|
{
|
||||||
|
get { return mipMapFilter; }
|
||||||
|
set { mipMapFilter = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Texture Size Rounding Mode")]
|
||||||
|
[DefaultValue(RoundMode.None)]
|
||||||
|
[Description("Setting the rounding mode allows the texture to be resized to a power of 2, often needed for less capable hardware.")]
|
||||||
|
[Category("Input")]
|
||||||
|
public RoundMode TextureRoundingMode
|
||||||
|
{
|
||||||
|
get { return roundMode; }
|
||||||
|
set { roundMode = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Alpha Mode")]
|
||||||
|
[DefaultValue(AlphaMode.None)]
|
||||||
|
[Description("Setting the alpha mode allows improved quality when generating mip maps.")]
|
||||||
|
[Category("Input")]
|
||||||
|
public AlphaMode AlphaMode
|
||||||
|
{
|
||||||
|
get { return alphaMode; }
|
||||||
|
set { alphaMode = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
[DisplayName("Enable Cuda")]
|
||||||
|
[DefaultValue(true)]
|
||||||
|
[Description("When true Cuda will be utilised if available.")]
|
||||||
|
[Category("Compressor")]
|
||||||
|
public bool EnableCuda
|
||||||
|
{
|
||||||
|
get { return enableCuda; }
|
||||||
|
set { enableCuda = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public override TextureContent Process(TextureContent input, ContentProcessorContext context)
|
||||||
|
{
|
||||||
|
//System.Diagnostics.Debugger.Launch();
|
||||||
|
|
||||||
|
input.Validate();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
using (CompressorOptionsBundle compressor = new CompressorOptionsBundle())
|
||||||
|
{
|
||||||
|
compressor.InputOptions.ResetTextureLayout();
|
||||||
|
|
||||||
|
TextureType textureType = FindTextureType(input);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set options
|
||||||
|
*/
|
||||||
|
|
||||||
|
compressor.InputOptions.SetTextureLayout(textureType, input.Faces[0][0].Width, input.Faces[0][0].Height, 1);
|
||||||
|
compressor.InputOptions.SetFormat(InputFormat.BGRA_8UB);
|
||||||
|
compressor.InputOptions.SetAlphaMode(AlphaMode);
|
||||||
|
compressor.InputOptions.SetMipmapFilter(MipMapFilter);
|
||||||
|
compressor.InputOptions.SetMipmapGeneration(GenerateMipmaps, MaxMipMapLevel);
|
||||||
|
compressor.InputOptions.SetRoundMode(TextureRoundingMode);
|
||||||
|
compressor.InputOptions.SetWrapMode(WrapMode);
|
||||||
|
|
||||||
|
compressor.InputOptions.SetGamma(InputGamma, OutputGamma);
|
||||||
|
compressor.InputOptions.SetNormalizeMipmaps(false);
|
||||||
|
compressor.InputOptions.SetNormalMap(false);
|
||||||
|
compressor.InputOptions.SetConvertToNormalMap(false);
|
||||||
|
|
||||||
|
compressor.CompressionOptions.SetQuality(Quality);
|
||||||
|
|
||||||
|
GeneralOutputHandler outputHandler;
|
||||||
|
|
||||||
|
switch (TextureFormat)
|
||||||
|
{
|
||||||
|
case TextureOutputFormat.Colour:
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.RGBA);
|
||||||
|
outputHandler = new PixelOutputHandler<Color>(textureType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureOutputFormat.Normals:
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.RGBA);
|
||||||
|
outputHandler = new PixelOutputHandler<Color>(textureType);
|
||||||
|
|
||||||
|
compressor.InputOptions.SetNormalizeMipmaps(true);
|
||||||
|
compressor.InputOptions.SetNormalMap(true);
|
||||||
|
compressor.InputOptions.SetConvertToNormalMap(ConvertToNormalMap);
|
||||||
|
compressor.InputOptions.SetGamma(1.0f, 1.0f);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureOutputFormat.DXT1:
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.DXT1);
|
||||||
|
outputHandler = new Dxt1OutputHandler(textureType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureOutputFormat.DXT1a:
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.DXT1a);
|
||||||
|
outputHandler = new Dxt1OutputHandler(textureType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureOutputFormat.DXT3:
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.DXT3);
|
||||||
|
outputHandler = new Dxt3OutputHandler(textureType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureOutputFormat.DXT5:
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.DXT5);
|
||||||
|
outputHandler = new Dxt5OutputHandler(textureType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureOutputFormat.DXT5n:
|
||||||
|
//FIXME: We force fastest quality since the normal compression mode is _very_ slow.
|
||||||
|
compressor.CompressionOptions.SetQuality(Quality.Fastest);
|
||||||
|
|
||||||
|
compressor.CompressionOptions.SetFormat(Format.DXT5n);
|
||||||
|
|
||||||
|
compressor.InputOptions.SetNormalizeMipmaps(true);
|
||||||
|
compressor.InputOptions.SetNormalMap(true);
|
||||||
|
compressor.InputOptions.SetConvertToNormalMap(ConvertToNormalMap);
|
||||||
|
compressor.InputOptions.SetGamma(1.0f, 1.0f);
|
||||||
|
|
||||||
|
outputHandler = new Dxt5OutputHandler(textureType);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new NotSupportedException("Unknown texture output format: " + TextureFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set input data
|
||||||
|
*/
|
||||||
|
|
||||||
|
//TODO: Use a float format when texture tools support it.
|
||||||
|
input.ConvertBitmapType(typeof(PixelBitmapContent<Color>));
|
||||||
|
|
||||||
|
for (int i = 0; i < input.Faces.Count; i++)
|
||||||
|
{
|
||||||
|
MipmapChain mipChain = input.Faces[i];
|
||||||
|
|
||||||
|
for (int j = 0; j < mipChain.Count; j++)
|
||||||
|
{
|
||||||
|
BitmapContent bitmap = mipChain[j];
|
||||||
|
|
||||||
|
byte[] bitmapData = bitmap.GetPixelData();
|
||||||
|
|
||||||
|
//FIXME: When we move to XNA 4 the layout of Color will change, hence we need to swizzle the input.
|
||||||
|
compressor.InputOptions.SetMipmapData(bitmapData, bitmap.Width, bitmap.Height, 1, i, j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Setup output
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
compressor.OutputOptions.SetOutputHandler(outputHandler);
|
||||||
|
compressor.OutputOptions.SetOutputHeader(false);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Go!
|
||||||
|
*/
|
||||||
|
compressor.Compressor.SetEnableCuda(EnableCuda);
|
||||||
|
|
||||||
|
compressor.Compress();
|
||||||
|
/*
|
||||||
|
* Check the output makes sense.
|
||||||
|
*/
|
||||||
|
|
||||||
|
outputHandler.OutputTextureContent.Validate();
|
||||||
|
|
||||||
|
return outputHandler.OutputTextureContent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (TextureToolsException ttexcept)
|
||||||
|
{
|
||||||
|
throw ConvertException(ttexcept);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private TextureType FindTextureType(TextureContent input)
|
||||||
|
{
|
||||||
|
if (input is Texture2DContent)
|
||||||
|
return TextureType.Texture2D;
|
||||||
|
else if (input is TextureCubeContent)
|
||||||
|
return TextureType.TextureCube;
|
||||||
|
else
|
||||||
|
throw new InvalidContentException("Invalid texture type, cube maps are not supported", input.Identity);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private Exception ConvertException(TextureToolsException ttexcept)
|
||||||
|
{
|
||||||
|
switch (ttexcept.ErrorCode)
|
||||||
|
{
|
||||||
|
case Error.UnsupportedFeature:
|
||||||
|
return new NotSupportedException("Attempt to use a unsupported feature of NVIDIA Texture Tools",ttexcept);
|
||||||
|
|
||||||
|
case Error.InvalidInput:
|
||||||
|
return new InvalidContentException("Invalid input to NVIDIA texture tools", ttexcept);
|
||||||
|
|
||||||
|
case Error.CudaError:
|
||||||
|
case Error.Unknown:
|
||||||
|
return new InvalidOperationException("NVIDIA Texture Tools returned the following error: " + ttexcept.Message, ttexcept);
|
||||||
|
|
||||||
|
case Error.FileOpen:
|
||||||
|
case Error.FileWrite:
|
||||||
|
return new IOException("NVIDIA Texture Tools returned the following error: " + ttexcept.Message, ttexcept);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return new InvalidOperationException("NVIDIA Texture Tools returned an unknown error: " + ttexcept.Message, ttexcept);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class Dxt1OutputHandler : GeneralOutputHandler
|
||||||
|
{
|
||||||
|
public Dxt1OutputHandler(TextureType textureType) : base(textureType)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override BitmapContent CreateBitmapContent(int width, int height)
|
||||||
|
{
|
||||||
|
return new Dxt1BitmapContent(width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class Dxt3OutputHandler : GeneralOutputHandler
|
||||||
|
{
|
||||||
|
public Dxt3OutputHandler(TextureType textureType)
|
||||||
|
: base(textureType)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override BitmapContent CreateBitmapContent(int width, int height)
|
||||||
|
{
|
||||||
|
return new Dxt3BitmapContent(width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class Dxt5OutputHandler : GeneralOutputHandler
|
||||||
|
{
|
||||||
|
public Dxt5OutputHandler(TextureType textureType)
|
||||||
|
: base(textureType)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override BitmapContent CreateBitmapContent(int width, int height)
|
||||||
|
{
|
||||||
|
return new Dxt5BitmapContent(width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class PixelOutputHandler<T> : GeneralOutputHandler
|
||||||
|
where T : struct, System.IEquatable<T>
|
||||||
|
{
|
||||||
|
public PixelOutputHandler(TextureType textureType)
|
||||||
|
: base(textureType)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override BitmapContent CreateBitmapContent(int width, int height)
|
||||||
|
{
|
||||||
|
return new PixelBitmapContent<T>(width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private abstract class GeneralOutputHandler : OutputHandlerBase
|
||||||
|
{
|
||||||
|
TextureContent outputTextureContent;
|
||||||
|
|
||||||
|
byte[] tempBitmapData;
|
||||||
|
|
||||||
|
int dataWidth = -1;
|
||||||
|
int dataHeight = -1;
|
||||||
|
int dataSize = -1;
|
||||||
|
|
||||||
|
int faceIndex = -1;
|
||||||
|
int mipIndex = -1;
|
||||||
|
int dataIndex = 0;
|
||||||
|
|
||||||
|
public TextureContent OutputTextureContent
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
CommitLevel();
|
||||||
|
return outputTextureContent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected GeneralOutputHandler(TextureType textureType)
|
||||||
|
{
|
||||||
|
switch (textureType)
|
||||||
|
{
|
||||||
|
case TextureType.Texture2D:
|
||||||
|
outputTextureContent = new Texture2DContent();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TextureType.TextureCube:
|
||||||
|
outputTextureContent = new TextureCubeContent();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new NotSupportedException("Unknown texture type: " + textureType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void BeginImage(int size, int width, int height, int depth, int face, int miplevel)
|
||||||
|
{
|
||||||
|
CommitLevel();
|
||||||
|
|
||||||
|
dataIndex = 0;
|
||||||
|
mipIndex = miplevel;
|
||||||
|
faceIndex = face;
|
||||||
|
|
||||||
|
dataWidth = width;
|
||||||
|
dataHeight = height;
|
||||||
|
dataSize = size;
|
||||||
|
|
||||||
|
tempBitmapData = new byte[size];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void WriteData(byte[] dataBuffer, int startIndex, int count)
|
||||||
|
{
|
||||||
|
Array.Copy(dataBuffer, startIndex, tempBitmapData, dataIndex, count);
|
||||||
|
dataIndex += count;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract BitmapContent CreateBitmapContent(int width, int height);
|
||||||
|
|
||||||
|
private void CommitLevel()
|
||||||
|
{
|
||||||
|
if (faceIndex >= 0)
|
||||||
|
{
|
||||||
|
BitmapContent newBitmap = CreateBitmapContent(dataWidth, dataHeight);
|
||||||
|
|
||||||
|
newBitmap.SetPixelData(tempBitmapData);
|
||||||
|
|
||||||
|
outputTextureContent.Faces[faceIndex].Add(newBitmap);
|
||||||
|
|
||||||
|
dataSize = -1;
|
||||||
|
dataWidth = dataHeight = -1;
|
||||||
|
faceIndex = -1;
|
||||||
|
mipIndex = -1;
|
||||||
|
dataIndex = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,122 @@
|
|||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectGuid>{F4446AE2-B5E1-4D17-B33C-275A6770FD50}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>NvidiaTextureToolsProcessor</RootNamespace>
|
||||||
|
<AssemblyName>NvidiaTextureToolsProcessor</AssemblyName>
|
||||||
|
<XnaFrameworkVersion>v3.1</XnaFrameworkVersion>
|
||||||
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<XnaPlatform>Windows</XnaPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<XnaPlatform>Windows</XnaPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Xbox 360' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Xbox 360\Debug</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<XnaPlatform>Xbox 360</XnaPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Xbox 360' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Xbox 360\Release</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<XnaPlatform>Xbox 360</XnaPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Zune' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Zune\Debug</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<XnaPlatform>Zune</XnaPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Zune' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Zune\Release</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<XnaPlatform>Zune</XnaPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=x86">
|
||||||
|
<Private>False</Private>
|
||||||
|
<SpecificVersion>True</SpecificVersion>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework.Game, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL">
|
||||||
|
<Private>False</Private>
|
||||||
|
<SpecificVersion>True</SpecificVersion>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=x86">
|
||||||
|
<Private>False</Private>
|
||||||
|
<SpecificVersion>true</SpecificVersion>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml">
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Core">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml.Linq">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="..\Nvidia.TextureTools\TextureTools.cs">
|
||||||
|
<Link>TextureTools.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="NvidiaTextureProcessor.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.ContentPipelineExtensions.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
|
# Visual C# Express 2008
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NvidiaTextureToolsProcessor", "NvidiaTextureToolsProcessor.csproj", "{F4446AE2-B5E1-4D17-B33C-275A6770FD50}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Debug|Xbox 360 = Debug|Xbox 360
|
||||||
|
Debug|Zune = Debug|Zune
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
Release|Xbox 360 = Release|Xbox 360
|
||||||
|
Release|Zune = Release|Zune
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Debug|Xbox 360.Build.0 = Debug|Xbox 360
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Debug|Zune.ActiveCfg = Debug|Zune
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Debug|Zune.Build.0 = Debug|Zune
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Release|x86.Build.0 = Release|x86
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Release|Xbox 360.ActiveCfg = Release|Xbox 360
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Release|Xbox 360.Build.0 = Release|Xbox 360
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Release|Zune.ActiveCfg = Release|Zune
|
||||||
|
{F4446AE2-B5E1-4D17-B33C-275A6770FD50}.Release|Zune.Build.0 = Release|Zune
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
@ -0,0 +1,33 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("NvidiaTextureToolsProcessor")]
|
||||||
|
[assembly: AssemblyDescription("An XNA Content Processor for use with GameStudio 3.1")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("NvidiaTextureToolsProcessor")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2010")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("6c0942a6-4e6a-411b-9275-d2676f9720d3")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
BIN
project/vc9/nvassemble/nvassemble.rc
Normal file
BIN
project/vc9/nvassemble/nvassemble.rc
Normal file
Binary file not shown.
359
project/vc9/nvassemble/nvassemble.vcproj
Normal file
359
project/vc9/nvassemble/nvassemble.vcproj
Normal file
@ -0,0 +1,359 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="nvassemble"
|
||||||
|
ProjectGUID="{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
LinkTimeCodeGeneration="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\tools\assemble.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\tools\cmdline.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\resource.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvassemble.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvidia.ico"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
BIN
project/vc9/nvassemble/nvidia.ico
Normal file
BIN
project/vc9/nvassemble/nvidia.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
16
project/vc9/nvassemble/resource.h
Normal file
16
project/vc9/nvassemble/resource.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by nvcompress.rc
|
||||||
|
//
|
||||||
|
#define IDI_ICON1 101
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
#endif
|
||||||
|
#endif
|
BIN
project/vc9/nvcompress/nvcompress.rc
Normal file
BIN
project/vc9/nvcompress/nvcompress.rc
Normal file
Binary file not shown.
686
project/vc9/nvcompress/nvcompress.vcproj
Normal file
686
project/vc9/nvcompress/nvcompress.vcproj
Normal file
@ -0,0 +1,686 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="nvcompress"
|
||||||
|
ProjectGUID="{88079E38-83AA-4E8A-B18A-66A78D1B058B}"
|
||||||
|
RootNamespace="nvcompress"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVDXT_SHARED"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="1"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVDXT_SHARED"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug (no cuda)|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug (no cuda)|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVDXT_SHARED"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release (no cuda)|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release (no cuda)|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVDXT_SHARED"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
LinkTimeCodeGeneration="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\tools\compress.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\tools\cmdline.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\resource.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvcompress.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvidia.ico"
|
||||||
|
DeploymentContent="true"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
BIN
project/vc9/nvcompress/nvidia.ico
Normal file
BIN
project/vc9/nvcompress/nvidia.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
16
project/vc9/nvcompress/resource.h
Normal file
16
project/vc9/nvcompress/resource.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by nvcompress.rc
|
||||||
|
//
|
||||||
|
#define IDI_ICON1 101
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
#endif
|
||||||
|
#endif
|
16
project/vc9/nvconfig.h
Normal file
16
project/vc9/nvconfig.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef NV_CONFIG
|
||||||
|
#define NV_CONFIG
|
||||||
|
|
||||||
|
//#cmakedefine HAVE_UNISTD_H
|
||||||
|
#define HAVE_STDARG_H
|
||||||
|
//#cmakedefine HAVE_SIGNAL_H
|
||||||
|
//#cmakedefine HAVE_EXECINFO_H
|
||||||
|
#define HAVE_MALLOC_H
|
||||||
|
|
||||||
|
#if !defined(_M_X64)
|
||||||
|
#define HAVE_PNG
|
||||||
|
#define HAVE_JPEG
|
||||||
|
//#define HAVE_TIFF
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // NV_CONFIG
|
355
project/vc9/nvcore/nvcore.vcproj
Normal file
355
project/vc9/nvcore/nvcore.vcproj
Normal file
@ -0,0 +1,355 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="nvcore"
|
||||||
|
ProjectGUID="{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}"
|
||||||
|
RootNamespace="nvcore"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="0"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="0"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\Debug.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\Library.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\Memory.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\StrLib.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\TextReader.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\TextWriter.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\Containers.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\Debug.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\DefsVcWin32.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\Library.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\Memory.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\nvconfig.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\nvcore.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\Ptr.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvcore\StrLib.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
BIN
project/vc9/nvddsinfo/nvddsinfo.rc
Normal file
BIN
project/vc9/nvddsinfo/nvddsinfo.rc
Normal file
Binary file not shown.
358
project/vc9/nvddsinfo/nvddsinfo.vcproj
Normal file
358
project/vc9/nvddsinfo/nvddsinfo.vcproj
Normal file
@ -0,0 +1,358 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="nvddsinfo"
|
||||||
|
ProjectGUID="{841B73C5-C679-4EEF-A50A-7D6106642B49}"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
LinkTimeCodeGeneration="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\tools\ddsinfo.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\tools\cmdline.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\resource.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvddsinfo.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvidia.ico"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
BIN
project/vc9/nvddsinfo/nvidia.ico
Normal file
BIN
project/vc9/nvddsinfo/nvidia.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
16
project/vc9/nvddsinfo/resource.h
Normal file
16
project/vc9/nvddsinfo/resource.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by nvcompress.rc
|
||||||
|
//
|
||||||
|
#define IDI_ICON1 101
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
#endif
|
||||||
|
#endif
|
BIN
project/vc9/nvdecompress/nvdecompress.rc
Normal file
BIN
project/vc9/nvdecompress/nvdecompress.rc
Normal file
Binary file not shown.
379
project/vc9/nvdecompress/nvdecompress.vcproj
Normal file
379
project/vc9/nvdecompress/nvdecompress.vcproj
Normal file
@ -0,0 +1,379 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="nvdecompress"
|
||||||
|
ProjectGUID="{75A0527D-BFC9-49C3-B46B-CD1A901D5927}"
|
||||||
|
RootNamespace="nvdecompress"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVDXT_SHARED"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="1"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVDXT_SHARED"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\tools\decompress.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\tools\cmdline.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\resource.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvdecompress.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvidia.ico"
|
||||||
|
DeploymentContent="true"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
BIN
project/vc9/nvdecompress/nvidia.ico
Normal file
BIN
project/vc9/nvdecompress/nvidia.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
16
project/vc9/nvdecompress/resource.h
Normal file
16
project/vc9/nvdecompress/resource.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by nvcompress.rc
|
||||||
|
//
|
||||||
|
#define IDI_ICON1 101
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
#endif
|
||||||
|
#endif
|
383
project/vc9/nvimage/nvimage.vcproj
Normal file
383
project/vc9/nvimage/nvimage.vcproj
Normal file
@ -0,0 +1,383 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="nvimage"
|
||||||
|
ProjectGUID="{4046F392-A18B-4C66-9639-3EABFFF5D531}"
|
||||||
|
RootNamespace="nvimage"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="0"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="0"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\BlockDXT.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\ColorBlock.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\DirectDrawSurface.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\Filter.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\FloatImage.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\Image.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\ImageIO.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\NormalMap.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\Quantize.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\BlockDXT.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\ColorBlock.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\DirectDrawSurface.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\Filter.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\FloatImage.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\Image.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\ImageIO.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\NormalMap.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\nvimage.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\PixelFormat.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\PsdFile.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\Quantize.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvimage\TgaFile.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
BIN
project/vc9/nvimgdiff/nvidia.ico
Normal file
BIN
project/vc9/nvimgdiff/nvidia.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
project/vc9/nvimgdiff/nvimgdiff.rc
Normal file
BIN
project/vc9/nvimgdiff/nvimgdiff.rc
Normal file
Binary file not shown.
379
project/vc9/nvimgdiff/nvimgdiff.vcproj
Normal file
379
project/vc9/nvimgdiff/nvimgdiff.vcproj
Normal file
@ -0,0 +1,379 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="nvimgdiff"
|
||||||
|
ProjectGUID="{05A59E8B-EA70-4F22-89E8-E0927BA13064}"
|
||||||
|
RootNamespace="nvimgdiff"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVDXT_SHARED"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="1"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVDXT_SHARED"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\tools\imgdiff.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\tools\cmdline.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\resource.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvidia.ico"
|
||||||
|
DeploymentContent="true"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvimgdiff.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
16
project/vc9/nvimgdiff/resource.h
Normal file
16
project/vc9/nvimgdiff/resource.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by nvcompress.rc
|
||||||
|
//
|
||||||
|
#define IDI_ICON1 101
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
#endif
|
||||||
|
#endif
|
319
project/vc9/nvmath/nvmath.vcproj
Normal file
319
project/vc9/nvmath/nvmath.vcproj
Normal file
@ -0,0 +1,319 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="nvmath"
|
||||||
|
ProjectGUID="{50C465FE-B308-42BC-894D-89484482AF06}"
|
||||||
|
RootNamespace="nvmath"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="0"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="0"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvmath\Plane.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvmath\Box.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvmath\Color.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvmath\Matrix.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvmath\Plane.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvmath\Vector.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
321
project/vc9/nvtt.sln
Normal file
321
project/vc9/nvtt.sln
Normal file
@ -0,0 +1,321 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
|
# Visual Studio 2008
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvtt", "nvtt\nvtt.vcproj", "{1AEB7681-57D8-48EE-813D-5C41CC38B647}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38} = {CE017322-01FC-4851-9C8B-64E9A8E26C38}
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531}
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvcompress", "nvcompress\nvcompress.vcproj", "{88079E38-83AA-4E8A-B18A-66A78D1B058B}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647} = {1AEB7681-57D8-48EE-813D-5C41CC38B647}
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531}
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvimage", "nvimage\nvimage.vcproj", "{4046F392-A18B-4C66-9639-3EABFFF5D531}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvcore", "nvcore\nvcore.vcproj", "{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvmath", "nvmath\nvmath.vcproj", "{50C465FE-B308-42BC-894D-89484482AF06}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "squish", "squish\squish.vcproj", "{CE017322-01FC-4851-9C8B-64E9A8E26C38}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvddsinfo", "nvddsinfo\nvddsinfo.vcproj", "{841B73C5-C679-4EEF-A50A-7D6106642B49}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06}
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531}
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvdecompress", "nvdecompress\nvdecompress.vcproj", "{75A0527D-BFC9-49C3-B46B-CD1A901D5927}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531}
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvimgdiff", "nvimgdiff\nvimgdiff.vcproj", "{05A59E8B-EA70-4F22-89E8-E0927BA13064}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06}
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvassemble", "nvassemble\nvassemble.vcproj", "{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06}
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531}
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvzoom", "nvzoom\nvzoom.vcproj", "{51999D3E-EF22-4BDD-965F-4201034D3DCE}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531}
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nvidia.TextureTools", "Nvidia.TextureTools\Nvidia.TextureTools.csproj", "{CAB55C39-8FA9-4912-98D9-E52669C8911D}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug (no cuda)|Any CPU = Debug (no cuda)|Any CPU
|
||||||
|
Debug (no cuda)|Win32 = Debug (no cuda)|Win32
|
||||||
|
Debug (no cuda)|x64 = Debug (no cuda)|x64
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Release (no cuda)|Any CPU = Release (no cuda)|Any CPU
|
||||||
|
Release (no cuda)|Win32 = Release (no cuda)|Win32
|
||||||
|
Release (no cuda)|x64 = Release (no cuda)|x64
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug (no cuda)|Any CPU.ActiveCfg = Debug (no cuda)|x64
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug (no cuda)|Win32.ActiveCfg = Debug (no cuda)|Win32
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug (no cuda)|Win32.Build.0 = Debug (no cuda)|Win32
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug (no cuda)|x64.ActiveCfg = Debug (no cuda)|x64
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug (no cuda)|x64.Build.0 = Debug (no cuda)|x64
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release (no cuda)|Any CPU.ActiveCfg = Release (no cuda)|x64
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release (no cuda)|Win32.ActiveCfg = Release (no cuda)|Win32
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release (no cuda)|Win32.Build.0 = Release (no cuda)|Win32
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release (no cuda)|x64.ActiveCfg = Release (no cuda)|x64
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release (no cuda)|x64.Build.0 = Release (no cuda)|x64
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release|x64.Build.0 = Release|x64
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug (no cuda)|Any CPU.ActiveCfg = Debug (no cuda)|x64
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug (no cuda)|Win32.ActiveCfg = Debug (no cuda)|Win32
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug (no cuda)|Win32.Build.0 = Debug (no cuda)|Win32
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug (no cuda)|x64.ActiveCfg = Debug (no cuda)|x64
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug (no cuda)|x64.Build.0 = Debug (no cuda)|x64
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release (no cuda)|Any CPU.ActiveCfg = Release (no cuda)|x64
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release (no cuda)|Win32.ActiveCfg = Release (no cuda)|Win32
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release (no cuda)|Win32.Build.0 = Release (no cuda)|Win32
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release (no cuda)|x64.ActiveCfg = Release (no cuda)|x64
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release (no cuda)|x64.Build.0 = Release (no cuda)|x64
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release|x64.Build.0 = Release|x64
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug (no cuda)|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug (no cuda)|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug (no cuda)|Win32.Build.0 = Debug|Win32
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug (no cuda)|x64.ActiveCfg = Debug|x64
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug (no cuda)|x64.Build.0 = Debug|x64
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Release (no cuda)|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Release (no cuda)|Win32.ActiveCfg = Release|Win32
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Release (no cuda)|Win32.Build.0 = Release|Win32
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Release (no cuda)|x64.ActiveCfg = Release|x64
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Release (no cuda)|x64.Build.0 = Release|x64
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{4046F392-A18B-4C66-9639-3EABFFF5D531}.Release|x64.Build.0 = Release|x64
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug (no cuda)|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug (no cuda)|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug (no cuda)|Win32.Build.0 = Debug|Win32
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug (no cuda)|x64.ActiveCfg = Debug|x64
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug (no cuda)|x64.Build.0 = Debug|x64
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release (no cuda)|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release (no cuda)|Win32.ActiveCfg = Release|Win32
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release (no cuda)|Win32.Build.0 = Release|Win32
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release (no cuda)|x64.ActiveCfg = Release|x64
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release (no cuda)|x64.Build.0 = Release|x64
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release|x64.Build.0 = Release|x64
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Debug (no cuda)|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Debug (no cuda)|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Debug (no cuda)|Win32.Build.0 = Debug|Win32
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Debug (no cuda)|x64.ActiveCfg = Debug|x64
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Debug (no cuda)|x64.Build.0 = Debug|x64
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Release (no cuda)|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Release (no cuda)|Win32.ActiveCfg = Release|Win32
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Release (no cuda)|Win32.Build.0 = Release|Win32
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Release (no cuda)|x64.ActiveCfg = Release|x64
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Release (no cuda)|x64.Build.0 = Release|x64
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{50C465FE-B308-42BC-894D-89484482AF06}.Release|x64.Build.0 = Release|x64
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug (no cuda)|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug (no cuda)|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug (no cuda)|Win32.Build.0 = Debug|Win32
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug (no cuda)|x64.ActiveCfg = Debug|x64
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug (no cuda)|x64.Build.0 = Debug|x64
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release (no cuda)|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release (no cuda)|Win32.ActiveCfg = Release|Win32
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release (no cuda)|Win32.Build.0 = Release|Win32
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release (no cuda)|x64.ActiveCfg = Release|x64
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release (no cuda)|x64.Build.0 = Release|x64
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release|x64.Build.0 = Release|x64
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug (no cuda)|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug (no cuda)|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug (no cuda)|Win32.Build.0 = Debug|Win32
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug (no cuda)|x64.ActiveCfg = Debug|x64
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug (no cuda)|x64.Build.0 = Debug|x64
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Release (no cuda)|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Release (no cuda)|Win32.ActiveCfg = Release|Win32
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Release (no cuda)|Win32.Build.0 = Release|Win32
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Release (no cuda)|x64.ActiveCfg = Release|x64
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Release (no cuda)|x64.Build.0 = Release|x64
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{841B73C5-C679-4EEF-A50A-7D6106642B49}.Release|x64.Build.0 = Release|x64
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug (no cuda)|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug (no cuda)|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug (no cuda)|Win32.Build.0 = Debug|Win32
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug (no cuda)|x64.ActiveCfg = Debug|x64
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug (no cuda)|x64.Build.0 = Debug|x64
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release (no cuda)|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release (no cuda)|Win32.ActiveCfg = Release|Win32
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release (no cuda)|Win32.Build.0 = Release|Win32
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release (no cuda)|x64.ActiveCfg = Release|x64
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release (no cuda)|x64.Build.0 = Release|x64
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release|x64.Build.0 = Release|x64
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug (no cuda)|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug (no cuda)|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug (no cuda)|Win32.Build.0 = Debug|Win32
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug (no cuda)|x64.ActiveCfg = Debug|x64
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug (no cuda)|x64.Build.0 = Debug|x64
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release (no cuda)|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release (no cuda)|Win32.ActiveCfg = Release|Win32
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release (no cuda)|Win32.Build.0 = Release|Win32
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release (no cuda)|x64.ActiveCfg = Release|x64
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release (no cuda)|x64.Build.0 = Release|x64
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release|x64.Build.0 = Release|x64
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug (no cuda)|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug (no cuda)|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug (no cuda)|Win32.Build.0 = Debug|Win32
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug (no cuda)|x64.ActiveCfg = Debug|x64
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug (no cuda)|x64.Build.0 = Debug|x64
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release (no cuda)|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release (no cuda)|Win32.ActiveCfg = Release|Win32
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release (no cuda)|Win32.Build.0 = Release|Win32
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release (no cuda)|x64.ActiveCfg = Release|x64
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release (no cuda)|x64.Build.0 = Release|x64
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release|x64.Build.0 = Release|x64
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug (no cuda)|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug (no cuda)|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug (no cuda)|Win32.Build.0 = Debug|Win32
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug (no cuda)|x64.ActiveCfg = Debug|x64
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug (no cuda)|x64.Build.0 = Debug|x64
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release (no cuda)|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release (no cuda)|Win32.ActiveCfg = Release|Win32
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release (no cuda)|Win32.Build.0 = Release|Win32
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release (no cuda)|x64.ActiveCfg = Release|x64
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release (no cuda)|x64.Build.0 = Release|x64
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release|x64.Build.0 = Release|x64
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug (no cuda)|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug (no cuda)|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug (no cuda)|Win32.ActiveCfg = Debug|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug (no cuda)|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release (no cuda)|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release (no cuda)|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release (no cuda)|Win32.ActiveCfg = Release|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release (no cuda)|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||||
|
{CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
102
project/vc9/nvtt/nvtt.rc
Normal file
102
project/vc9/nvtt/nvtt.rc
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
// Microsoft Visual C++ generated resource script.
|
||||||
|
//
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
|
//
|
||||||
|
#include "afxres.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// English (U.S.) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TEXTINCLUDE
|
||||||
|
//
|
||||||
|
|
||||||
|
1 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"resource.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"#include ""afxres.h""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Version
|
||||||
|
//
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION 2,0,6,0
|
||||||
|
PRODUCTVERSION 2,0,6,0
|
||||||
|
FILEFLAGSMASK 0x17L
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS 0x1L
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS 0x4L
|
||||||
|
FILETYPE 0x2L
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "NVIDIA Corporation"
|
||||||
|
VALUE "FileDescription", "NVIDIA Texture Tools Dynamic Link Library"
|
||||||
|
VALUE "FileVersion", "2, 0, 6, 0"
|
||||||
|
VALUE "InternalName", "nvtt"
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) 2007"
|
||||||
|
VALUE "OriginalFilename", "nvtt.dll"
|
||||||
|
VALUE "ProductName", "NVIDIA Texture Tools Dynamic Link Library"
|
||||||
|
VALUE "ProductVersion", "2, 0, 6, 0"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // English (U.S.) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
953
project/vc9/nvtt/nvtt.vcproj
Normal file
953
project/vc9/nvtt/nvtt.vcproj
Normal file
@ -0,0 +1,953 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="nvtt"
|
||||||
|
ProjectGUID="{1AEB7681-57D8-48EE-813D-5C41CC38B647}"
|
||||||
|
RootNamespace="nvtt"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include;$(CUDA_INC_PATH)"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;NVTT_EXPORTS;NVTT_SHARED;HAVE_CUDA;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib cudart.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib;"$(CUDA_LIB_PATH)\..\lib""
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
ImportLibrary="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\lib\$(ProjectName).lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Copying header files..."
|
||||||
|
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="0"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include;$(CUDA_INC_PATH)"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;NVTT_EXPORTS;NVTT_SHARED;HAVE_CUDA;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="cudart.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib;"$(CUDA_LIB_PATH)""
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
ImportLibrary="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\lib\$(ProjectName).lib"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Copying header files..."
|
||||||
|
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include;$(CUDA_INC_PATH)"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;NVTT_EXPORTS;NVTT_SHARED;HAVE_CUDA;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib cudart.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib;"$(CUDA_LIB_PATH)\..\lib""
|
||||||
|
SubSystem="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
ImportLibrary="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\lib\$(ProjectName).lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Copying header files..."
|
||||||
|
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="0"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include;$(CUDA_INC_PATH)"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;NVTT_EXPORTS;NVTT_SHARED;HAVE_CUDA;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="cudart.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib;"$(CUDA_LIB_PATH)""
|
||||||
|
SubSystem="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
ImportLibrary="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\lib\$(ProjectName).lib"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Copying header files..."
|
||||||
|
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug (no cuda)|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="0"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include;"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;NVTT_EXPORTS;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib;"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
ImportLibrary="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\lib\$(ProjectName).lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Copying header files..."
|
||||||
|
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug (no cuda)|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;NVTT_EXPORTS;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
ImportLibrary="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\lib\$(ProjectName).lib"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Copying header files..."
|
||||||
|
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release (no cuda)|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="0"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include;"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;NVTT_EXPORTS;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="0"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib;"
|
||||||
|
SubSystem="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
ImportLibrary="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\lib\$(ProjectName).lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Copying header files..."
|
||||||
|
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release (no cuda)|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;NVTT_EXPORTS;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
LinkTimeCodeGeneration="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
ImportLibrary="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\lib\$(ProjectName).lib"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Copying header files..."
|
||||||
|
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\CompressDXT.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\CompressionOptions.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\cuda\CompressKernel.cu"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine=""$(CUDA_BIN_PATH)\nvcc.exe" -m32 -ccbin "$(VCInstallDir)bin" -c -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/RTC1,/MDd -I"$(CUDA_INC_PATH)" -I./ -o $(IntDir)\$(InputName).obj ..\\..\\..\\src\\nvtt\\cuda\\CompressKernel.cu
"
|
||||||
|
AdditionalDependencies="CudaMath.h"
|
||||||
|
Outputs="$(IntDir)\$(InputName).obj"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine=""$(CUDA_BIN_PATH)\nvcc.exe" -m64 -ccbin "$(VCInstallDir)bin" -c -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/RTC1,/MDd -I"$(CUDA_INC_PATH)" -I./ -o $(IntDir)\$(InputName).obj ..\\..\\..\\src\\nvtt\\cuda\\CompressKernel.cu
"
|
||||||
|
AdditionalDependencies="CudaMath.h"
|
||||||
|
Outputs="$(IntDir)\$(InputName).obj"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine=""$(CUDA_BIN_PATH)\nvcc.exe" -m32 -ccbin "$(VCInstallDir)bin" -c -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/O2,/Zi,/MD -I"$(CUDA_INC_PATH)" -I./ -o $(IntDir)\$(InputName).obj ..\\..\\..\\src\\nvtt\\cuda\\CompressKernel.cu
"
|
||||||
|
AdditionalDependencies="CudaMath.h"
|
||||||
|
Outputs="$(IntDir)\$(InputName).obj"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine=""$(CUDA_BIN_PATH)\nvcc.exe" -m64 -ccbin "$(VCInstallDir)bin" -c -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/O2,/Zi,/MD -I"$(CUDA_INC_PATH)" -I./ -o $(IntDir)\$(InputName).obj ..\\..\\..\\src\\nvtt\\cuda\\CompressKernel.cu
"
|
||||||
|
AdditionalDependencies="CudaMath.h"
|
||||||
|
Outputs="$(IntDir)\$(InputName).obj"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug (no cuda)|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine="$(CUDA_BIN_PATH)\nvcc.exe -ccbin "$(VCInstallDir)bin" -c -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/RTC1,/MDd -I"$(CUDA_INC_PATH)" -I./ -o $(IntDir)\$(InputName).obj ..\\..\\..\\src\\nvtt\\cuda\\CompressKernel.cu
"
|
||||||
|
AdditionalDependencies="CudaMath.h"
|
||||||
|
Outputs="$(IntDir)\$(InputName).obj"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug (no cuda)|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release (no cuda)|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
CommandLine="$(CUDA_BIN_PATH)\nvcc.exe -ccbin "$(VCInstallDir)bin" -c -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/O2,/Zi,/MD -I"$(CUDA_INC_PATH)" -I./ -o $(IntDir)\$(InputName).obj ..\\..\\..\\src\\nvtt\\cuda\\CompressKernel.cu
"
|
||||||
|
AdditionalDependencies="CudaMath.h"
|
||||||
|
Outputs="$(IntDir)\$(InputName).obj"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release (no cuda)|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\Compressor.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\CompressRGB.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\cuda\ConvolveKernel.cu"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug (no cuda)|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug (no cuda)|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release (no cuda)|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release (no cuda)|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\cuda\CudaCompressDXT.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\cuda\CudaUtils.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\InputOptions.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\nvtt.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\nvtt_wrapper.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\OptimalCompressDXT.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\OutputOptions.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\QuickCompressDXT.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\cuda\Bitmaps.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\CompressDXT.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\CompressionOptions.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\Compressor.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\CompressRGB.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\cuda\CudaCompressDXT.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\cuda\CudaMath.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\cuda\CudaUtils.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\InputOptions.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\nvtt.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\nvtt_wrapper.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\OptimalCompressDXT.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\OutputOptions.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\QuickCompressDXT.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\resource.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvtt.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
14
project/vc9/nvtt/resource.h
Normal file
14
project/vc9/nvtt/resource.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by nvtt.rc
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
#endif
|
||||||
|
#endif
|
BIN
project/vc9/nvzoom/nvidia.ico
Normal file
BIN
project/vc9/nvzoom/nvidia.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
project/vc9/nvzoom/nvzoom.rc
Normal file
BIN
project/vc9/nvzoom/nvzoom.rc
Normal file
Binary file not shown.
379
project/vc9/nvzoom/nvzoom.vcproj
Normal file
379
project/vc9/nvzoom/nvzoom.vcproj
Normal file
@ -0,0 +1,379 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="nvzoom"
|
||||||
|
ProjectGUID="{51999D3E-EF22-4BDD-965F-4201034D3DCE}"
|
||||||
|
RootNamespace="nvzoom"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NVDXT_SHARED"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVTT_SHARED;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="libpng.lib jpeg.lib tiff.lib"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="1"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NVDXT_SHARED"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
OutputFile="$(SolutionDir)\$(ConfigurationName).$(PlatformName)\bin\$(ProjectName).exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\gnuwin32\lib"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\tools\resize.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\tools\cmdline.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\resource.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvidia.ico"
|
||||||
|
DeploymentContent="true"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\nvzoom.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
16
project/vc9/nvzoom/resource.h
Normal file
16
project/vc9/nvzoom/resource.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by nvcompress.rc
|
||||||
|
//
|
||||||
|
#define IDI_ICON1 101
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
#endif
|
||||||
|
#endif
|
487
project/vc9/squish/squish.vcproj
Normal file
487
project/vc9/squish/squish.vcproj
Normal file
@ -0,0 +1,487 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="squish"
|
||||||
|
ProjectGUID="{CE017322-01FC-4851-9C8B-64E9A8E26C38}"
|
||||||
|
RootNamespace="squish"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="0"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableEnhancedInstructionSet="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
OutputDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)\$(PlatformName)"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="0"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
TargetEnvironment="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="3"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="..;..\..\..\src;..\..\..\gnuwin32\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__SSE2__;__SSE__;__MMX__"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\clusterfit.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\colourblock.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\colourfit.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\colourset.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\fastclusterfit.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\maths.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\weightedclusterfit.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\clusterfit.h"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\colourblock.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\colourfit.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\colourset.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\fastclusterfit.h"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
ExcludedFromBuild="true"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\maths.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\simd.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\simd_sse.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\src\nvtt\squish\weightedclusterfit.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
@ -105,7 +105,9 @@ ENDIF(OPENEXR_FOUND)
|
|||||||
FIND_PACKAGE(Qt4)
|
FIND_PACKAGE(Qt4)
|
||||||
|
|
||||||
# Threads
|
# Threads
|
||||||
FIND_PACKAGE(Threads)
|
FIND_PACKAGE(Threads REQUIRED)
|
||||||
|
MESSAGE(STATUS "Use thread library: ${CMAKE_THREAD_LIBS_INIT}")
|
||||||
|
SET(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
||||||
# configuration file
|
# configuration file
|
||||||
INCLUDE(CheckIncludeFiles)
|
INCLUDE(CheckIncludeFiles)
|
||||||
|
@ -33,6 +33,7 @@ IF(UNIX)
|
|||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
IF(NVCORE_SHARED)
|
IF(NVCORE_SHARED)
|
||||||
|
ADD_DEFINITIONS(-DNVCORE_SHARED=1)
|
||||||
ADD_LIBRARY(nvcore SHARED ${CORE_SRCS})
|
ADD_LIBRARY(nvcore SHARED ${CORE_SRCS})
|
||||||
ELSE(NVCORE_SHARED)
|
ELSE(NVCORE_SHARED)
|
||||||
ADD_LIBRARY(nvcore ${CORE_SRCS})
|
ADD_LIBRARY(nvcore ${CORE_SRCS})
|
||||||
|
@ -16,9 +16,9 @@ Do not use memmove in insert & remove, use copy ctors instead.
|
|||||||
|
|
||||||
|
|
||||||
// nvcore
|
// nvcore
|
||||||
#include <nvcore/nvcore.h>
|
#include "nvcore.h"
|
||||||
#include <nvcore/Memory.h>
|
#include "Memory.h"
|
||||||
#include <nvcore/Debug.h>
|
#include "Debug.h"
|
||||||
|
|
||||||
#include <string.h> // memmove
|
#include <string.h> // memmove
|
||||||
#include <new> // for placement new
|
#include <new> // for placement new
|
||||||
@ -589,15 +589,15 @@ namespace nv
|
|||||||
// free the buffer.
|
// free the buffer.
|
||||||
if( m_buffer_size == 0 ) {
|
if( m_buffer_size == 0 ) {
|
||||||
if( m_buffer ) {
|
if( m_buffer ) {
|
||||||
mem::free( m_buffer );
|
free( m_buffer );
|
||||||
m_buffer = NULL;
|
m_buffer = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// realloc the buffer
|
// realloc the buffer
|
||||||
else {
|
else {
|
||||||
if( m_buffer ) m_buffer = (T *) mem::realloc( m_buffer, sizeof(T) * m_buffer_size );
|
if( m_buffer ) m_buffer = (T *) realloc(m_buffer, sizeof(T) * m_buffer_size);
|
||||||
else m_buffer = (T *) mem::malloc( sizeof(T) * m_buffer_size );
|
else m_buffer = (T *) ::malloc(sizeof(T) * m_buffer_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -778,7 +778,7 @@ namespace nv
|
|||||||
e->clear();
|
e->clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mem::free(table);
|
free(table);
|
||||||
table = NULL;
|
table = NULL;
|
||||||
entry_count = 0;
|
entry_count = 0;
|
||||||
size_mask = -1;
|
size_mask = -1;
|
||||||
@ -1001,7 +1001,7 @@ namespace nv
|
|||||||
new_size = nextPowerOfTwo(new_size);
|
new_size = nextPowerOfTwo(new_size);
|
||||||
|
|
||||||
HashMap<T, U, hash_functor> new_hash;
|
HashMap<T, U, hash_functor> new_hash;
|
||||||
new_hash.table = (Entry *) mem::malloc(sizeof(Entry) * new_size);
|
new_hash.table = (Entry *) ::malloc(sizeof(Entry) * new_size);
|
||||||
nvDebugCheck(new_hash.table != NULL);
|
nvDebugCheck(new_hash.table != NULL);
|
||||||
|
|
||||||
new_hash.entry_count = 0;
|
new_hash.entry_count = 0;
|
||||||
@ -1026,7 +1026,7 @@ namespace nv
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete our old data buffer.
|
// Delete our old data buffer.
|
||||||
mem::free(table);
|
free(table);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Steal new_hash's data.
|
// Steal new_hash's data.
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
# include <unistd.h> // getpid
|
# include <unistd.h> // getpid
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <sys/sysctl.h> // sysctl
|
# include <sys/sysctl.h> // sysctl
|
||||||
# include <ucontext.h>
|
# include <sys/ucontext.h>
|
||||||
# undef HAVE_EXECINFO_H
|
# undef HAVE_EXECINFO_H
|
||||||
# if defined(HAVE_EXECINFO_H) // only after OSX 10.5
|
# if defined(HAVE_EXECINFO_H) // only after OSX 10.5
|
||||||
# include <execinfo.h> // backtrace
|
# include <execinfo.h> // backtrace
|
||||||
|
@ -115,6 +115,7 @@ namespace nv
|
|||||||
{
|
{
|
||||||
NVCORE_API void dumpInfo();
|
NVCORE_API void dumpInfo();
|
||||||
|
|
||||||
|
// These functions are not thread safe.
|
||||||
NVCORE_API void setMessageHandler( MessageHandler * messageHandler );
|
NVCORE_API void setMessageHandler( MessageHandler * messageHandler );
|
||||||
NVCORE_API void resetMessageHandler();
|
NVCORE_API void resetMessageHandler();
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#error "Do not include this file directly."
|
#error "Do not include this file directly."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdint.h> // uint8_t, int8_t, ...
|
//#include <stdint.h> // uint8_t, int8_t, ...
|
||||||
|
|
||||||
// Function linkage
|
// Function linkage
|
||||||
#define DLL_IMPORT
|
#define DLL_IMPORT
|
||||||
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
#define restrict __restrict__
|
#define restrict __restrict__
|
||||||
|
|
||||||
|
/*
|
||||||
// Type definitions
|
// Type definitions
|
||||||
typedef uint8_t uint8;
|
typedef uint8_t uint8;
|
||||||
typedef int8_t int8;
|
typedef int8_t int8;
|
||||||
@ -64,3 +64,4 @@ typedef int64_t int64;
|
|||||||
|
|
||||||
// Aliases
|
// Aliases
|
||||||
typedef uint32 uint;
|
typedef uint32 uint;
|
||||||
|
*/
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
#define restrict __restrict__
|
#define restrict __restrict__
|
||||||
|
|
||||||
|
/*
|
||||||
// Type definitions
|
// Type definitions
|
||||||
typedef unsigned char uint8;
|
typedef unsigned char uint8;
|
||||||
typedef signed char int8;
|
typedef signed char int8;
|
||||||
@ -63,3 +63,4 @@ typedef signed long long int64;
|
|||||||
|
|
||||||
// Aliases
|
// Aliases
|
||||||
typedef uint32 uint;
|
typedef uint32 uint;
|
||||||
|
*/
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#define restrict __restrict__
|
#define restrict __restrict__
|
||||||
|
|
||||||
|
/*
|
||||||
// Type definitions
|
// Type definitions
|
||||||
typedef unsigned char uint8;
|
typedef unsigned char uint8;
|
||||||
typedef signed char int8;
|
typedef signed char int8;
|
||||||
@ -57,3 +57,4 @@ typedef signed long long int64;
|
|||||||
|
|
||||||
// Aliases
|
// Aliases
|
||||||
typedef uint32 uint;
|
typedef uint32 uint;
|
||||||
|
*/
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#define __FUNC__ __FUNCTION__
|
#define __FUNC__ __FUNCTION__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
// Type definitions
|
// Type definitions
|
||||||
typedef unsigned char uint8;
|
typedef unsigned char uint8;
|
||||||
typedef signed char int8;
|
typedef signed char int8;
|
||||||
@ -55,7 +55,7 @@ typedef signed __int64 int64;
|
|||||||
|
|
||||||
// Aliases
|
// Aliases
|
||||||
typedef uint32 uint;
|
typedef uint32 uint;
|
||||||
|
*/
|
||||||
|
|
||||||
// Unwanted VC++ warnings to disable.
|
// Unwanted VC++ warnings to disable.
|
||||||
/*
|
/*
|
||||||
|
@ -1,36 +1,118 @@
|
|||||||
|
// This code is in the public domain -- Ignacio Casta<74>o <castano@gmail.com>
|
||||||
|
|
||||||
#include "Memory.h"
|
#include "Memory.h"
|
||||||
#include "Debug.h"
|
#include "Debug.h"
|
||||||
|
|
||||||
//#if HAVE_MALLOC_H
|
|
||||||
//#include <malloc.h>
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define USE_EFENCE 0
|
||||||
|
|
||||||
|
#if USE_EFENCE
|
||||||
|
extern "C" void *EF_malloc(size_t size);
|
||||||
|
extern "C" void *EF_realloc(void * oldBuffer, size_t newSize);
|
||||||
|
extern "C" void EF_free(void * address);
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace nv;
|
using namespace nv;
|
||||||
|
|
||||||
void * nv::mem::malloc(size_t size)
|
#if NV_OVERRIDE_ALLOC
|
||||||
|
|
||||||
|
void * malloc(size_t size)
|
||||||
{
|
{
|
||||||
return ::malloc(size);
|
#if USE_EFENCE
|
||||||
|
return EF_malloc(size);
|
||||||
|
#else
|
||||||
|
return ::malloc(size);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void * nv::mem::malloc(size_t size, const char * file, int line)
|
void * debug_malloc(size_t size, const char * file, int line)
|
||||||
{
|
{
|
||||||
NV_UNUSED(file);
|
NV_UNUSED(file);
|
||||||
NV_UNUSED(line);
|
NV_UNUSED(line);
|
||||||
return ::malloc(size);
|
#if USE_EFENCE
|
||||||
|
return EF_malloc(size);
|
||||||
|
#else
|
||||||
|
return ::malloc(size);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void nv::mem::free(const void * ptr)
|
void free(void * ptr)
|
||||||
{
|
{
|
||||||
::free(const_cast<void *>(ptr));
|
#if USE_EFENCE
|
||||||
|
return EF_free(const_cast<void *>(ptr));
|
||||||
|
#else
|
||||||
|
::free(const_cast<void *>(ptr));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void * nv::mem::realloc(void * ptr, size_t size)
|
void * realloc(void * ptr, size_t size)
|
||||||
{
|
{
|
||||||
nvDebugCheck(ptr != NULL || size != 0); // undefined realloc behavior.
|
nvDebugCheck(ptr != NULL || size != 0); // undefined realloc behavior.
|
||||||
return ::realloc(ptr, size);
|
#if USE_EFENCE
|
||||||
|
return EF_realloc(ptr, size);
|
||||||
|
#else
|
||||||
|
return ::realloc(ptr, size);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* No need to override this unless we want line info.
|
||||||
|
void * operator new (size_t size) throw()
|
||||||
|
{
|
||||||
|
return malloc(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void operator delete (void *p) throw()
|
||||||
|
{
|
||||||
|
free(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
void * operator new [] (size_t size) throw()
|
||||||
|
{
|
||||||
|
return malloc(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void operator delete [] (void * p) throw()
|
||||||
|
{
|
||||||
|
free(p);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if 0 // Code from Apple:
|
||||||
|
void* operator new(std::size_t sz) throw (std::bad_alloc)
|
||||||
|
{
|
||||||
|
void *result = std::malloc (sz == 0 ? 1 : sz);
|
||||||
|
if (result == NULL)
|
||||||
|
throw std::bad_alloc();
|
||||||
|
gNewCounter++;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
void operator delete(void* p) throw()
|
||||||
|
{
|
||||||
|
if (p == NULL)
|
||||||
|
return;
|
||||||
|
std::free (p);
|
||||||
|
gDeleteCounter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* These are the 'nothrow' versions of the above operators.
|
||||||
|
The system version will try to call a std::new_handler if they
|
||||||
|
fail, but your overriding versions are not required to do this. */
|
||||||
|
void* operator new(std::size_t sz, const std::nothrow_t&) throw()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
void * result = ::operator new (sz); // calls our overridden operator new
|
||||||
|
return result;
|
||||||
|
} catch (std::bad_alloc &) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void operator delete(void* p, const std::nothrow_t&) throw()
|
||||||
|
{
|
||||||
|
::operator delete (p);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // 0
|
||||||
|
|
||||||
|
|
||||||
|
#endif // NV_OVERRIDE_ALLOC
|
||||||
|
@ -1,186 +1,52 @@
|
|||||||
// This code is in the public domain -- castanyo@yahoo.es
|
// This code is in the public domain -- Ignacio Castaño <castano@gmail.com>
|
||||||
|
|
||||||
|
#pragma once
|
||||||
#ifndef NV_CORE_MEMORY_H
|
#ifndef NV_CORE_MEMORY_H
|
||||||
#define NV_CORE_MEMORY_H
|
#define NV_CORE_MEMORY_H
|
||||||
|
|
||||||
#include <nvcore/nvcore.h>
|
#include "nvcore.h"
|
||||||
|
|
||||||
#include <stdlib.h> // malloc(), realloc() and free()
|
#include <stdlib.h> // malloc(), realloc() and free()
|
||||||
#include <stddef.h> // size_t
|
#include <stddef.h> // size_t
|
||||||
|
|
||||||
#include <new> // new and delete
|
#include <new> // new and delete
|
||||||
|
|
||||||
|
#define NV_OVERRIDE_ALLOC 0
|
||||||
|
|
||||||
|
#if NV_OVERRIDE_ALLOC
|
||||||
|
|
||||||
// Custom memory allocator
|
// Custom memory allocator
|
||||||
namespace nv
|
extern "C" {
|
||||||
{
|
NVCORE_API void * malloc(size_t size);
|
||||||
namespace mem
|
NVCORE_API void * debug_malloc(size_t size, const char * file, int line);
|
||||||
{
|
NVCORE_API void free(void * ptr);
|
||||||
NVCORE_API void * malloc(size_t size);
|
NVCORE_API void * realloc(void * ptr, size_t size);
|
||||||
NVCORE_API void * malloc(size_t size, const char * file, int line);
|
|
||||||
|
|
||||||
NVCORE_API void free(const void * ptr);
|
|
||||||
NVCORE_API void * realloc(void * ptr, size_t size);
|
|
||||||
|
|
||||||
} // mem namespace
|
|
||||||
|
|
||||||
} // nv namespace
|
|
||||||
|
|
||||||
|
|
||||||
// Override new/delete
|
|
||||||
|
|
||||||
inline void * operator new (size_t size) throw()
|
|
||||||
{
|
|
||||||
return nv::mem::malloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void operator delete (void *p) throw()
|
|
||||||
{
|
|
||||||
nv::mem::free(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void * operator new [] (size_t size) throw()
|
|
||||||
{
|
|
||||||
return nv::mem::malloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void operator delete [] (void * p) throw()
|
|
||||||
{
|
|
||||||
nv::mem::free(p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#define new new(__FILE__, __LINE__)
|
#define new new(__FILE__, __LINE__)
|
||||||
#define malloc(i) malloc(i, __FILE__, __LINE__)
|
#define malloc(i) debug_malloc(i, __FILE__, __LINE__)
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0
|
#endif
|
||||||
/*
|
|
||||||
File: main.cpp
|
|
||||||
|
|
||||||
Version: 1.0
|
namespace nv {
|
||||||
|
|
||||||
Abstract: Overrides the C++ 'operator new' and 'operator delete'.
|
// C++ helpers.
|
||||||
|
template <typename T> T * malloc(size_t count) {
|
||||||
|
return (T *)::malloc(sizeof(T) * count);
|
||||||
|
}
|
||||||
|
|
||||||
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
|
template <typename T> T * realloc(T * ptr, size_t count) {
|
||||||
("Apple") in consideration of your agreement to the following terms, and your
|
return (T *)::realloc(ptr, sizeof(T) * count);
|
||||||
use, installation, modification or redistribution of this Apple software
|
}
|
||||||
constitutes acceptance of these terms. If you do not agree with these terms,
|
|
||||||
please do not use, install, modify or redistribute this Apple software.
|
|
||||||
|
|
||||||
In consideration of your agreement to abide by the following terms, and subject
|
template <typename T> void free(const T * ptr) {
|
||||||
to these terms, Apple grants you a personal, non-exclusive license, under Apple’s
|
::free((void *)ptr);
|
||||||
copyrights in this original Apple software (the "Apple Software"), to use,
|
}
|
||||||
reproduce, modify and redistribute the Apple Software, with or without
|
|
||||||
modifications, in source and/or binary forms; provided that if you redistribute
|
|
||||||
the Apple Software in its entirety and without modifications, you must retain
|
|
||||||
this notice and the following text and disclaimers in all such redistributions of
|
|
||||||
the Apple Software. Neither the name, trademarks, service marks or logos of
|
|
||||||
Apple Computer, Inc. may be used to endorse or promote products derived from the
|
|
||||||
Apple Software without specific prior written permission from Apple. Except as
|
|
||||||
expressly stated in this notice, no other rights or licenses, express or implied,
|
|
||||||
are granted by Apple herein, including but not limited to any patent rights that
|
|
||||||
may be infringed by your derivative works or by other works in which the Apple
|
|
||||||
Software may be incorporated.
|
|
||||||
|
|
||||||
The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
|
} // nv namespace
|
||||||
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
|
|
||||||
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
|
|
||||||
COMBINATION WITH YOUR PRODUCTS.
|
|
||||||
|
|
||||||
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
|
|
||||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
|
||||||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
|
|
||||||
OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
|
|
||||||
(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
|
|
||||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
Copyright © 2006 Apple Computer, Inc., All Rights Reserved
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* This sample shows how to override the C++ global 'new' and 'delete' operators. */
|
|
||||||
#include <new>
|
|
||||||
#include <iostream>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <locale>
|
|
||||||
|
|
||||||
/* Some variables and code to make the example do something. */
|
|
||||||
namespace {
|
|
||||||
unsigned long long gNewCounter; // number of times 'new' was called
|
|
||||||
unsigned long long gDeleteCounter; // number of times 'delete' was called
|
|
||||||
|
|
||||||
void printCounters() // print the counters above
|
|
||||||
{
|
|
||||||
std::cout << "new was called " << gNewCounter << " times and delete was called " << gDeleteCounter << " times\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* These are the overridden new and delete routines.
|
|
||||||
Most applications will want to override at least these four versions of new/delete if they override any of them.
|
|
||||||
|
|
||||||
In Mac OS, it's not necessary to override the array versions of operator new and delete if all
|
|
||||||
they would do is call the non-array versions; the C++ standard library, as an extension
|
|
||||||
to the C++ standard, does this for you.
|
|
||||||
|
|
||||||
Developers should consult the section [lib.support.dynamic] in the C++ standard to see the requirements
|
|
||||||
on the generic operators new and delete; the system may expect that your overridden operators meet all these
|
|
||||||
requirements.
|
|
||||||
|
|
||||||
Your operators may be called by the system, even early in start-up before constructors have been executed. */
|
|
||||||
void* operator new(std::size_t sz) throw (std::bad_alloc)
|
|
||||||
{
|
|
||||||
void *result = std::malloc (sz == 0 ? 1 : sz);
|
|
||||||
if (result == NULL)
|
|
||||||
throw std::bad_alloc();
|
|
||||||
gNewCounter++;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
void operator delete(void* p) throw()
|
|
||||||
{
|
|
||||||
if (p == NULL)
|
|
||||||
return;
|
|
||||||
std::free (p);
|
|
||||||
gDeleteCounter++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* These are the 'nothrow' versions of the above operators.
|
|
||||||
The system version will try to call a std::new_handler if they
|
|
||||||
fail, but your overriding versions are not required to do this. */
|
|
||||||
void* operator new(std::size_t sz, const std::nothrow_t&) throw()
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
void * result = ::operator new (sz); // calls our overridden operator new
|
|
||||||
return result;
|
|
||||||
} catch (std::bad_alloc &) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void operator delete(void* p, const std::nothrow_t&) throw()
|
|
||||||
{
|
|
||||||
::operator delete (p);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Bug 4067110 is that if your program has no weak symbols at all, the linker will not set the
|
|
||||||
WEAK_DEFINES bit in the Mach-O header and as a result the new and delete operators above won't
|
|
||||||
be seen by system libraries. This is mostly a problem for test programs and small examples,
|
|
||||||
since almost all real C++ programs complicated enough to override new and delete will have at
|
|
||||||
least one weak symbol. However, this is a small example, so: */
|
|
||||||
void __attribute__((weak, visibility("default"))) workaroundFor4067110 () { }
|
|
||||||
|
|
||||||
/* This is a simple test program that causes the runtime library to call new and delete. */
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
atexit (printCounters);
|
|
||||||
try {
|
|
||||||
std::locale example("does_not_exist");
|
|
||||||
} catch (std::runtime_error &x) {
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif // 0
|
|
||||||
|
|
||||||
#endif // NV_CORE_MEMORY_H
|
#endif // NV_CORE_MEMORY_H
|
||||||
|
@ -50,7 +50,7 @@ public:
|
|||||||
virtual void seek( uint pos )
|
virtual void seek( uint pos )
|
||||||
{
|
{
|
||||||
nvDebugCheck(m_fp != NULL);
|
nvDebugCheck(m_fp != NULL);
|
||||||
nvDebugCheck(pos < size());
|
nvDebugCheck(pos <= size());
|
||||||
fseek(m_fp, pos, SEEK_SET);
|
fseek(m_fp, pos, SEEK_SET);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,17 +21,17 @@ namespace
|
|||||||
{
|
{
|
||||||
static char * strAlloc(uint size)
|
static char * strAlloc(uint size)
|
||||||
{
|
{
|
||||||
return static_cast<char *>(mem::malloc(size));
|
return static_cast<char *>(::malloc(size));
|
||||||
}
|
}
|
||||||
|
|
||||||
static char * strReAlloc(char * str, uint size)
|
static char * strReAlloc(char * str, uint size)
|
||||||
{
|
{
|
||||||
return static_cast<char *>(mem::realloc(str, size));
|
return static_cast<char *>(::realloc(str, size));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void strFree(const char * str)
|
static void strFree(const char * str)
|
||||||
{
|
{
|
||||||
return mem::free(const_cast<char *>(str));
|
return ::free(const_cast<char *>(str));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*static char * strDup( const char * str )
|
/*static char * strDup( const char * str )
|
||||||
@ -545,8 +545,6 @@ const char * Path::extension(const char * str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// static
|
|
||||||
String String::s_null(String::null);
|
|
||||||
|
|
||||||
/// Clone this string
|
/// Clone this string
|
||||||
String String::clone() const
|
String String::clone() const
|
||||||
@ -557,13 +555,13 @@ String String::clone() const
|
|||||||
|
|
||||||
void String::setString(const char * str)
|
void String::setString(const char * str)
|
||||||
{
|
{
|
||||||
if( str == NULL ) {
|
if (str == NULL) {
|
||||||
data = s_null.data;
|
data = NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
allocString( str );
|
allocString( str );
|
||||||
|
addRef();
|
||||||
}
|
}
|
||||||
addRef();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void String::setString(const char * str, int length)
|
void String::setString(const char * str, int length)
|
||||||
@ -576,11 +574,11 @@ void String::setString(const char * str, int length)
|
|||||||
|
|
||||||
void String::setString(const StringBuilder & str)
|
void String::setString(const StringBuilder & str)
|
||||||
{
|
{
|
||||||
if( str.str() == NULL ) {
|
if (str.str() == NULL) {
|
||||||
data = s_null.data;
|
data = NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
allocString(str);
|
allocString(str);
|
||||||
|
addRef();
|
||||||
}
|
}
|
||||||
addRef();
|
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ namespace nv
|
|||||||
/// String hash based on Bernstein's hash.
|
/// String hash based on Bernstein's hash.
|
||||||
inline uint strHash(const char * data, uint h = 5381)
|
inline uint strHash(const char * data, uint h = 5381)
|
||||||
{
|
{
|
||||||
uint i;
|
uint i = 0;
|
||||||
while(data[i] != 0) {
|
while(data[i] != 0) {
|
||||||
h = (33 * h) ^ uint(data[i]);
|
h = (33 * h) ^ uint(data[i]);
|
||||||
i++;
|
i++;
|
||||||
@ -151,15 +151,14 @@ namespace nv
|
|||||||
/// Constructs a null string. @sa isNull()
|
/// Constructs a null string. @sa isNull()
|
||||||
String()
|
String()
|
||||||
{
|
{
|
||||||
data = s_null.data;
|
data = NULL;
|
||||||
addRef();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Constructs a shared copy of str.
|
/// Constructs a shared copy of str.
|
||||||
String(const String & str)
|
String(const String & str)
|
||||||
{
|
{
|
||||||
data = str.data;
|
data = str.data;
|
||||||
addRef();
|
if (data != NULL) addRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Constructs a shared string from a standard string.
|
/// Constructs a shared string from a standard string.
|
||||||
@ -183,7 +182,6 @@ namespace nv
|
|||||||
/// Dtor.
|
/// Dtor.
|
||||||
~String()
|
~String()
|
||||||
{
|
{
|
||||||
nvDebugCheck(data != NULL);
|
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,43 +218,49 @@ namespace nv
|
|||||||
/// Equal operator.
|
/// Equal operator.
|
||||||
bool operator==( const String & str ) const
|
bool operator==( const String & str ) const
|
||||||
{
|
{
|
||||||
nvDebugCheck(data != NULL);
|
|
||||||
nvDebugCheck(str.data != NULL);
|
|
||||||
if( str.data == data ) {
|
if( str.data == data ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if ((data == NULL) != (str.data == NULL)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return strcmp(data, str.data) == 0;
|
return strcmp(data, str.data) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Equal operator.
|
/// Equal operator.
|
||||||
bool operator==( const char * str ) const
|
bool operator==( const char * str ) const
|
||||||
{
|
{
|
||||||
nvDebugCheck(data != NULL);
|
|
||||||
nvCheck(str != NULL); // Use isNull!
|
nvCheck(str != NULL); // Use isNull!
|
||||||
|
if (data == NULL) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return strcmp(data, str) == 0;
|
return strcmp(data, str) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Not equal operator.
|
/// Not equal operator.
|
||||||
bool operator!=( const String & str ) const
|
bool operator!=( const String & str ) const
|
||||||
{
|
{
|
||||||
nvDebugCheck(data != NULL);
|
|
||||||
nvDebugCheck(str.data != NULL);
|
|
||||||
if( str.data == data ) {
|
if( str.data == data ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if ((data == NULL) != (str.data == NULL)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return strcmp(data, str.data) != 0;
|
return strcmp(data, str.data) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Not equal operator.
|
/// Not equal operator.
|
||||||
bool operator!=( const char * str ) const
|
bool operator!=( const char * str ) const
|
||||||
{
|
{
|
||||||
nvDebugCheck(data != NULL);
|
|
||||||
nvCheck(str != NULL); // Use isNull!
|
nvCheck(str != NULL); // Use isNull!
|
||||||
|
if (data == NULL) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return strcmp(data, str) != 0;
|
return strcmp(data, str) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns true if this string is the null string.
|
/// Returns true if this string is the null string.
|
||||||
bool isNull() const { nvDebugCheck(data != NULL); return data == s_null.data; }
|
bool isNull() const { return data == NULL; }
|
||||||
|
|
||||||
/// Return the exact length.
|
/// Return the exact length.
|
||||||
uint length() const { nvDebugCheck(data != NULL); return uint(strlen(data)); }
|
uint length() const { nvDebugCheck(data != NULL); return uint(strlen(data)); }
|
||||||
@ -265,44 +269,45 @@ namespace nv
|
|||||||
uint hash() const { nvDebugCheck(data != NULL); return strHash(data); }
|
uint hash() const { nvDebugCheck(data != NULL); return strHash(data); }
|
||||||
|
|
||||||
/// const char * cast operator.
|
/// const char * cast operator.
|
||||||
operator const char * () const { nvDebugCheck(data != NULL); return data; }
|
operator const char * () const { return data; }
|
||||||
|
|
||||||
/// Get string pointer.
|
/// Get string pointer.
|
||||||
const char * str() const { nvDebugCheck(data != NULL); return data; }
|
const char * str() const { return data; }
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
enum null_t { null };
|
|
||||||
|
|
||||||
// Private constructor for null string.
|
|
||||||
String(null_t) {
|
|
||||||
setString("");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add reference count.
|
// Add reference count.
|
||||||
void addRef() {
|
void addRef()
|
||||||
nvDebugCheck(data != NULL);
|
{
|
||||||
setRefCount(getRefCount() + 1);
|
if (data != NULL)
|
||||||
}
|
{
|
||||||
|
setRefCount(getRefCount() + 1);
|
||||||
// Decrease reference count.
|
|
||||||
void release() {
|
|
||||||
nvDebugCheck(data != NULL);
|
|
||||||
|
|
||||||
const uint16 count = getRefCount();
|
|
||||||
setRefCount(count - 1);
|
|
||||||
if( count - 1 == 0 ) {
|
|
||||||
mem::free(data - 2);
|
|
||||||
data = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 getRefCount() const {
|
// Decrease reference count.
|
||||||
|
void release()
|
||||||
|
{
|
||||||
|
if (data != NULL)
|
||||||
|
{
|
||||||
|
const uint16 count = getRefCount();
|
||||||
|
setRefCount(count - 1);
|
||||||
|
if (count - 1 == 0) {
|
||||||
|
free(data - 2);
|
||||||
|
data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16 getRefCount() const
|
||||||
|
{
|
||||||
|
nvDebugCheck(data != NULL);
|
||||||
return *reinterpret_cast<const uint16 *>(data - 2);
|
return *reinterpret_cast<const uint16 *>(data - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setRefCount(uint16 count) {
|
void setRefCount(uint16 count) {
|
||||||
|
nvDebugCheck(data != NULL);
|
||||||
nvCheck(count < 0xFFFF);
|
nvCheck(count < 0xFFFF);
|
||||||
*reinterpret_cast<uint16 *>(const_cast<char *>(data - 2)) = uint16(count);
|
*reinterpret_cast<uint16 *>(const_cast<char *>(data - 2)) = uint16(count);
|
||||||
}
|
}
|
||||||
@ -318,7 +323,7 @@ namespace nv
|
|||||||
|
|
||||||
void allocString(const char * str, int len)
|
void allocString(const char * str, int len)
|
||||||
{
|
{
|
||||||
const char * ptr = static_cast<const char *>(mem::malloc(2 + len + 1));
|
const char * ptr = static_cast<const char *>(::malloc(2 + len + 1));
|
||||||
|
|
||||||
setData( ptr );
|
setData( ptr );
|
||||||
setRefCount( 0 );
|
setRefCount( 0 );
|
||||||
@ -341,8 +346,6 @@ namespace nv
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
NVCORE_API static String s_null;
|
|
||||||
|
|
||||||
const char * data;
|
const char * data;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -99,6 +99,23 @@
|
|||||||
#define NV_ENDIAN_STRING POSH_ENDIAN_STRING
|
#define NV_ENDIAN_STRING POSH_ENDIAN_STRING
|
||||||
|
|
||||||
|
|
||||||
|
// Type definitions:
|
||||||
|
typedef posh_u8_t uint8;
|
||||||
|
typedef posh_i8_t int8;
|
||||||
|
|
||||||
|
typedef posh_u16_t uint16;
|
||||||
|
typedef posh_i16_t int16;
|
||||||
|
|
||||||
|
typedef posh_u32_t uint32;
|
||||||
|
typedef posh_i32_t int32;
|
||||||
|
|
||||||
|
typedef posh_u64_t uint64;
|
||||||
|
typedef posh_i64_t int64;
|
||||||
|
|
||||||
|
// Aliases
|
||||||
|
typedef uint32 uint;
|
||||||
|
|
||||||
|
|
||||||
// Version string:
|
// Version string:
|
||||||
#define NV_VERSION_STRING \
|
#define NV_VERSION_STRING \
|
||||||
NV_OS_STRING "/" NV_CC_STRING "/" NV_CPU_STRING"/" \
|
NV_OS_STRING "/" NV_CC_STRING "/" NV_CPU_STRING"/" \
|
||||||
|
@ -53,6 +53,7 @@ ENDIF(OPENEXR_FOUND)
|
|||||||
ADD_DEFINITIONS(-DNVIMAGE_EXPORTS)
|
ADD_DEFINITIONS(-DNVIMAGE_EXPORTS)
|
||||||
|
|
||||||
IF(NVIMAGE_SHARED)
|
IF(NVIMAGE_SHARED)
|
||||||
|
ADD_DEFINITIONS(-DNVIMAGE_SHARED=1)
|
||||||
ADD_LIBRARY(nvimage SHARED ${IMAGE_SRCS})
|
ADD_LIBRARY(nvimage SHARED ${IMAGE_SRCS})
|
||||||
ELSE(NVIMAGE_SHARED)
|
ELSE(NVIMAGE_SHARED)
|
||||||
ADD_LIBRARY(nvimage ${IMAGE_SRCS})
|
ADD_LIBRARY(nvimage ${IMAGE_SRCS})
|
||||||
|
@ -113,9 +113,12 @@ void ColorBlock::splatY()
|
|||||||
/// Returns true if the block has a single color.
|
/// Returns true if the block has a single color.
|
||||||
bool ColorBlock::isSingleColor() const
|
bool ColorBlock::isSingleColor() const
|
||||||
{
|
{
|
||||||
for(int i = 1; i < 16; i++)
|
Color32 mask(0xFF, 0xFF, 0xFF, 0x00);
|
||||||
|
uint u = m_color[0].u & mask.u;
|
||||||
|
|
||||||
|
for (int i = 1; i < 16; i++)
|
||||||
{
|
{
|
||||||
if (m_color[0] != m_color[i])
|
if (u != (m_color[i].u & mask.u))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -406,10 +406,14 @@ namespace nv
|
|||||||
s << pf.flags;
|
s << pf.flags;
|
||||||
s << pf.fourcc;
|
s << pf.fourcc;
|
||||||
s << pf.bitcount;
|
s << pf.bitcount;
|
||||||
s << pf.rmask;
|
s.serialize(&pf.rmask, sizeof(pf.rmask));
|
||||||
s << pf.gmask;
|
s.serialize(&pf.gmask, sizeof(pf.gmask));
|
||||||
s << pf.bmask;
|
s.serialize(&pf.bmask, sizeof(pf.bmask));
|
||||||
s << pf.amask;
|
s.serialize(&pf.amask, sizeof(pf.amask));
|
||||||
|
// s << pf.rmask;
|
||||||
|
// s << pf.gmask;
|
||||||
|
// s << pf.bmask;
|
||||||
|
// s << pf.amask;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,7 +449,9 @@ namespace nv
|
|||||||
s << header.pitch;
|
s << header.pitch;
|
||||||
s << header.depth;
|
s << header.depth;
|
||||||
s << header.mipmapcount;
|
s << header.mipmapcount;
|
||||||
s.serialize(header.reserved, 11 * sizeof(uint));
|
for (int i = 0; i < 11; i++) {
|
||||||
|
s << header.reserved[i];
|
||||||
|
}
|
||||||
s << header.pf;
|
s << header.pf;
|
||||||
s << header.caps;
|
s << header.caps;
|
||||||
s << header.notused;
|
s << header.notused;
|
||||||
@ -532,7 +538,7 @@ DDSHeader::DDSHeader()
|
|||||||
|
|
||||||
// Store version information on the reserved header attributes.
|
// Store version information on the reserved header attributes.
|
||||||
this->reserved[9] = MAKEFOURCC('N', 'V', 'T', 'T');
|
this->reserved[9] = MAKEFOURCC('N', 'V', 'T', 'T');
|
||||||
this->reserved[10] = (2 << 16) | (0 << 8) | (6); // major.minor.revision
|
this->reserved[10] = (2 << 16) | (0 << 8) | (8); // major.minor.revision
|
||||||
|
|
||||||
this->pf.size = 32;
|
this->pf.size = 32;
|
||||||
this->pf.flags = 0;
|
this->pf.flags = 0;
|
||||||
@ -569,8 +575,8 @@ void DDSHeader::setHeight(uint h)
|
|||||||
|
|
||||||
void DDSHeader::setDepth(uint d)
|
void DDSHeader::setDepth(uint d)
|
||||||
{
|
{
|
||||||
this->flags |= DDSD_DEPTH;
|
this->flags |= DDSD_DEPTH;
|
||||||
this->height = d;
|
this->depth = d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DDSHeader::setMipmapCount(uint count)
|
void DDSHeader::setMipmapCount(uint count)
|
||||||
@ -598,14 +604,16 @@ void DDSHeader::setMipmapCount(uint count)
|
|||||||
|
|
||||||
void DDSHeader::setTexture2D()
|
void DDSHeader::setTexture2D()
|
||||||
{
|
{
|
||||||
this->header10.resourceDimension = D3D10_RESOURCE_DIMENSION_TEXTURE2D;
|
this->header10.resourceDimension = D3D10_RESOURCE_DIMENSION_TEXTURE2D;
|
||||||
|
this->header10.arraySize = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DDSHeader::setTexture3D()
|
void DDSHeader::setTexture3D()
|
||||||
{
|
{
|
||||||
this->caps.caps2 = DDSCAPS2_VOLUME;
|
this->caps.caps2 = DDSCAPS2_VOLUME;
|
||||||
|
|
||||||
this->header10.resourceDimension = D3D10_RESOURCE_DIMENSION_TEXTURE3D;
|
this->header10.resourceDimension = D3D10_RESOURCE_DIMENSION_TEXTURE3D;
|
||||||
|
this->header10.arraySize = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DDSHeader::setTextureCube()
|
void DDSHeader::setTextureCube()
|
||||||
@ -662,11 +670,25 @@ void DDSHeader::setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask
|
|||||||
nvCheck((gmask & amask) == 0);
|
nvCheck((gmask & amask) == 0);
|
||||||
nvCheck((bmask & amask) == 0);
|
nvCheck((bmask & amask) == 0);
|
||||||
|
|
||||||
this->pf.flags = DDPF_RGB;
|
if (rmask != 0 || gmask != 0 || bmask != 0)
|
||||||
|
{
|
||||||
|
if (gmask == 0 && bmask == 0)
|
||||||
|
{
|
||||||
|
this->pf.flags = DDPF_LUMINANCE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this->pf.flags = DDPF_RGB;
|
||||||
|
}
|
||||||
|
|
||||||
if (amask != 0) {
|
if (amask != 0) {
|
||||||
this->pf.flags |= DDPF_ALPHAPIXELS;
|
this->pf.flags |= DDPF_ALPHAPIXELS;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (amask != 0)
|
||||||
|
{
|
||||||
|
this->pf.flags |= DDPF_ALPHA;
|
||||||
|
}
|
||||||
|
|
||||||
if (bitcount == 0)
|
if (bitcount == 0)
|
||||||
{
|
{
|
||||||
@ -816,9 +838,9 @@ bool DirectDrawSurface::isSupported() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (header.pf.flags & DDPF_RGB)
|
else if ((header.pf.flags & DDPF_RGB) || (header.pf.flags & DDPF_LUMINANCE))
|
||||||
{
|
{
|
||||||
// All RGB formats are supported now.
|
// All RGB and luminance formats are supported now.
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -937,7 +959,7 @@ void DirectDrawSurface::mipmap(Image * img, uint face, uint mipmap)
|
|||||||
|
|
||||||
img->allocate(w, h);
|
img->allocate(w, h);
|
||||||
|
|
||||||
if (header.pf.flags & DDPF_RGB)
|
if ((header.pf.flags & DDPF_RGB) || (header.pf.flags & DDPF_LUMINANCE))
|
||||||
{
|
{
|
||||||
readLinearImage(img);
|
readLinearImage(img);
|
||||||
}
|
}
|
||||||
@ -1172,15 +1194,11 @@ uint DirectDrawSurface::mipmapSize(uint mipmap) const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nvDebugCheck(header.pf.flags & DDPF_RGB);
|
nvDebugCheck((header.pf.flags & DDPF_RGB) || (header.pf.flags & DDPF_LUMINANCE));
|
||||||
|
|
||||||
// Align pixels to bytes.
|
uint pitch = computePitch(w, header.pf.bitcount, 8); // Asuming 8 bit alignment, which is the same D3DX expects.
|
||||||
uint byteCount = (header.pf.bitcount + 7) / 8;
|
|
||||||
|
|
||||||
// Align pitch to 4 bytes.
|
return pitch * h * d;
|
||||||
uint pitch = 4 * ((w * byteCount + 3) / 4);
|
|
||||||
|
|
||||||
return pitch * h * d;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1242,6 +1260,7 @@ void DirectDrawSurface::printInfo() const
|
|||||||
printf("Pixel Format:\n");
|
printf("Pixel Format:\n");
|
||||||
printf("\tFlags: 0x%.8X\n", header.pf.flags);
|
printf("\tFlags: 0x%.8X\n", header.pf.flags);
|
||||||
if (header.pf.flags & DDPF_RGB) printf("\t\tDDPF_RGB\n");
|
if (header.pf.flags & DDPF_RGB) printf("\t\tDDPF_RGB\n");
|
||||||
|
if (header.pf.flags & DDPF_LUMINANCE) printf("\t\tDDPF_LUMINANCE\n");
|
||||||
if (header.pf.flags & DDPF_FOURCC) printf("\t\tDDPF_FOURCC\n");
|
if (header.pf.flags & DDPF_FOURCC) printf("\t\tDDPF_FOURCC\n");
|
||||||
if (header.pf.flags & DDPF_ALPHAPIXELS) printf("\t\tDDPF_ALPHAPIXELS\n");
|
if (header.pf.flags & DDPF_ALPHAPIXELS) printf("\t\tDDPF_ALPHAPIXELS\n");
|
||||||
if (header.pf.flags & DDPF_ALPHA) printf("\t\tDDPF_ALPHA\n");
|
if (header.pf.flags & DDPF_ALPHA) printf("\t\tDDPF_ALPHA\n");
|
||||||
|
@ -32,14 +32,17 @@ namespace
|
|||||||
return f - floor(f);
|
return f - floor(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mirror(int x, int w)
|
static int mirror(int x, int w)
|
||||||
{
|
{
|
||||||
x = abs(x);
|
if (w == 1) return 0;
|
||||||
while (x >= w) {
|
|
||||||
x = 2 * w - x - 2;
|
x = abs(x);
|
||||||
}
|
while (x >= w) {
|
||||||
return x;
|
x = abs(w + w - x - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return x;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -148,13 +151,13 @@ void FloatImage::allocate(uint c, uint w, uint h)
|
|||||||
m_height = h;
|
m_height = h;
|
||||||
m_componentNum = c;
|
m_componentNum = c;
|
||||||
m_count = w * h * c;
|
m_count = w * h * c;
|
||||||
m_mem = reinterpret_cast<float *>(nv::mem::malloc(m_count * sizeof(float)));
|
m_mem = reinterpret_cast<float *>(::malloc(m_count * sizeof(float)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Free the image, but don't clear the members.
|
/// Free the image, but don't clear the members.
|
||||||
void FloatImage::free()
|
void FloatImage::free()
|
||||||
{
|
{
|
||||||
nv::mem::free( reinterpret_cast<void *>(m_mem) );
|
::free( reinterpret_cast<void *>(m_mem) );
|
||||||
m_mem = NULL;
|
m_mem = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,8 +467,8 @@ FloatImage * FloatImage::fastDownSample() const
|
|||||||
|
|
||||||
float f = 0.0f;
|
float f = 0.0f;
|
||||||
f += v0 * (w0 * src[0 * m_width + 2 * x] + w1 * src[0 * m_width + 2 * x + 1] + w2 * src[0 * m_width + 2 * x + 2]);
|
f += v0 * (w0 * src[0 * m_width + 2 * x] + w1 * src[0 * m_width + 2 * x + 1] + w2 * src[0 * m_width + 2 * x + 2]);
|
||||||
f += v1 * (w0 * src[1 * m_width + 2 * x] + w1 * src[1 * m_width + 2 * x + 1] + w2 * src[0 * m_width + 2 * x + 2]);
|
f += v1 * (w0 * src[1 * m_width + 2 * x] + w1 * src[1 * m_width + 2 * x + 1] + w2 * src[1 * m_width + 2 * x + 2]);
|
||||||
f += v2 * (w0 * src[2 * m_width + 2 * x] + w1 * src[2 * m_width + 2 * x + 1] + w2 * src[0 * m_width + 2 * x + 2]);
|
f += v2 * (w0 * src[2 * m_width + 2 * x] + w1 * src[2 * m_width + 2 * x + 1] + w2 * src[2 * m_width + 2 * x + 2]);
|
||||||
|
|
||||||
*dst = f * scale;
|
*dst = f * scale;
|
||||||
dst++;
|
dst++;
|
||||||
|
@ -266,7 +266,7 @@ Image * nv::ImageIO::loadTGA(Stream & s)
|
|||||||
// Read palette
|
// Read palette
|
||||||
uint8 palette[768];
|
uint8 palette[768];
|
||||||
if( pal ) {
|
if( pal ) {
|
||||||
nvDebugCheck(tga.colormap_length < 256);
|
nvDebugCheck(tga.colormap_length <= 256);
|
||||||
s.serialize(palette, 3 * tga.colormap_length);
|
s.serialize(palette, 3 * tga.colormap_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -954,7 +954,7 @@ FloatImage * nv::ImageIO::loadFloatTIFF(const char * fileName, Stream & s)
|
|||||||
fimage->allocate(spp, width, height);
|
fimage->allocate(spp, width, height);
|
||||||
|
|
||||||
int linesize = TIFFScanlineSize(tif);
|
int linesize = TIFFScanlineSize(tif);
|
||||||
tdata_t buf = (::uint8 *)nv::mem::malloc(linesize);
|
tdata_t buf = (::uint8 *)::malloc(linesize);
|
||||||
|
|
||||||
for (uint y = 0; y < height; y++)
|
for (uint y = 0; y < height; y++)
|
||||||
{
|
{
|
||||||
@ -991,7 +991,7 @@ FloatImage * nv::ImageIO::loadFloatTIFF(const char * fileName, Stream & s)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nv::mem::free(buf);
|
::free(buf);
|
||||||
|
|
||||||
TIFFClose(tif);
|
TIFFClose(tif);
|
||||||
|
|
||||||
|
@ -19,4 +19,14 @@
|
|||||||
#define NVIMAGE_CLASS
|
#define NVIMAGE_CLASS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
// Some utility functions:
|
||||||
|
|
||||||
|
inline uint computePitch(uint w, uint bitsize, uint alignment)
|
||||||
|
{
|
||||||
|
return ((w * bitsize + 8 * alignment - 1) / (8 * alignment)) * alignment;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // NV_IMAGE_H
|
#endif // NV_IMAGE_H
|
||||||
|
@ -19,6 +19,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
|||||||
ADD_DEFINITIONS(-DNVMATH_EXPORTS)
|
ADD_DEFINITIONS(-DNVMATH_EXPORTS)
|
||||||
|
|
||||||
IF(NVMATH_SHARED)
|
IF(NVMATH_SHARED)
|
||||||
|
ADD_DEFINITIONS(-DNVMATH_SHARED=1)
|
||||||
ADD_LIBRARY(nvmath SHARED ${MATH_SRCS})
|
ADD_LIBRARY(nvmath SHARED ${MATH_SRCS})
|
||||||
ELSE(NVMATH_SHARED)
|
ELSE(NVMATH_SHARED)
|
||||||
ADD_LIBRARY(nvmath ${MATH_SRCS})
|
ADD_LIBRARY(nvmath ${MATH_SRCS})
|
||||||
|
@ -332,7 +332,7 @@ inline Matrix transpose(Matrix::Arg m)
|
|||||||
Matrix r;
|
Matrix r;
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < 4; i++)
|
for (int j = 0; j < 4; j++)
|
||||||
{
|
{
|
||||||
r(i, j) = m(j, i);
|
r(i, j) = m(j, i);
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ public:
|
|||||||
scalar y() const;
|
scalar y() const;
|
||||||
scalar z() const;
|
scalar z() const;
|
||||||
|
|
||||||
const Vector2 & xy() const;
|
Vector2 xy() const;
|
||||||
|
|
||||||
scalar component(uint idx) const;
|
scalar component(uint idx) const;
|
||||||
|
|
||||||
@ -111,8 +111,8 @@ public:
|
|||||||
scalar z() const;
|
scalar z() const;
|
||||||
scalar w() const;
|
scalar w() const;
|
||||||
|
|
||||||
const Vector2 & xy() const;
|
Vector2 xy() const;
|
||||||
const Vector3 & xyz() const;
|
Vector3 xyz() const;
|
||||||
|
|
||||||
scalar component(uint idx) const;
|
scalar component(uint idx) const;
|
||||||
|
|
||||||
@ -231,9 +231,9 @@ inline scalar Vector3::x() const { return m_x; }
|
|||||||
inline scalar Vector3::y() const { return m_y; }
|
inline scalar Vector3::y() const { return m_y; }
|
||||||
inline scalar Vector3::z() const { return m_z; }
|
inline scalar Vector3::z() const { return m_z; }
|
||||||
|
|
||||||
inline const Vector2 & Vector3::xy() const
|
inline Vector2 Vector3::xy() const
|
||||||
{
|
{
|
||||||
return *(Vector2 *)this;
|
return Vector2(x(), y());
|
||||||
}
|
}
|
||||||
|
|
||||||
inline scalar Vector3::component(uint idx) const
|
inline scalar Vector3::component(uint idx) const
|
||||||
@ -332,14 +332,14 @@ inline scalar Vector4::y() const { return m_y; }
|
|||||||
inline scalar Vector4::z() const { return m_z; }
|
inline scalar Vector4::z() const { return m_z; }
|
||||||
inline scalar Vector4::w() const { return m_w; }
|
inline scalar Vector4::w() const { return m_w; }
|
||||||
|
|
||||||
inline const Vector2 & Vector4::xy() const
|
inline Vector2 Vector4::xy() const
|
||||||
{
|
{
|
||||||
return *(Vector2 *)this;
|
return Vector2(x(), y());
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const Vector3 & Vector4::xyz() const
|
inline Vector3 Vector4::xyz() const
|
||||||
{
|
{
|
||||||
return *(Vector3 *)this;
|
return Vector3(x(), y(), z());
|
||||||
}
|
}
|
||||||
|
|
||||||
inline scalar Vector4::component(uint idx) const
|
inline scalar Vector4::component(uint idx) const
|
||||||
|
@ -205,9 +205,9 @@ void nv::SlowCompressor::compressDXT1(const CompressionOptions::Private & compre
|
|||||||
ColorBlock rgba;
|
ColorBlock rgba;
|
||||||
BlockDXT1 block;
|
BlockDXT1 block;
|
||||||
|
|
||||||
//squish::WeightedClusterFit fit;
|
squish::WeightedClusterFit fit;
|
||||||
//squish::ClusterFit fit;
|
//squish::ClusterFit fit;
|
||||||
squish::FastClusterFit fit;
|
//squish::FastClusterFit fit;
|
||||||
fit.SetMetric(compressionOptions.colorWeight.x(), compressionOptions.colorWeight.y(), compressionOptions.colorWeight.z());
|
fit.SetMetric(compressionOptions.colorWeight.x(), compressionOptions.colorWeight.y(), compressionOptions.colorWeight.z());
|
||||||
|
|
||||||
for (uint y = 0; y < h; y += 4) {
|
for (uint y = 0; y < h; y += 4) {
|
||||||
@ -221,7 +221,7 @@ void nv::SlowCompressor::compressDXT1(const CompressionOptions::Private & compre
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
squish::ColourSet colours((uint8 *)rgba.colors(), 0);
|
squish::ColourSet colours((uint8 *)rgba.colors(), 0, true);
|
||||||
fit.SetColourSet(&colours, squish::kDxt1);
|
fit.SetColourSet(&colours, squish::kDxt1);
|
||||||
fit.Compress(&block);
|
fit.Compress(&block);
|
||||||
}
|
}
|
||||||
@ -255,7 +255,7 @@ void nv::SlowCompressor::compressDXT1a(const CompressionOptions::Private & compr
|
|||||||
|
|
||||||
for (uint i = 0; i < 16; i++)
|
for (uint i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
if (rgba.color(i).a < 128) anyAlpha = true;
|
if (rgba.color(i).a == 0) anyAlpha = true;
|
||||||
else allAlpha = false;
|
else allAlpha = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,23 +37,15 @@ using namespace nvtt;
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
inline uint computePitch(uint w, uint bitsize)
|
inline void convert_to_a8r8g8b8(const void * src, void * dst, uint w)
|
||||||
{
|
{
|
||||||
uint p = w * ((bitsize + 7) / 8);
|
memcpy(dst, src, 4 * w);
|
||||||
|
}
|
||||||
|
|
||||||
// Align to 32 bits.
|
inline void convert_to_x8r8g8b8(const void * src, void * dst, uint w)
|
||||||
return ((p + 3) / 4) * 4;
|
{
|
||||||
}
|
memcpy(dst, src, 4 * w);
|
||||||
|
}
|
||||||
inline void convert_to_a8r8g8b8(const void * src, void * dst, uint w)
|
|
||||||
{
|
|
||||||
memcpy(dst, src, 4 * w);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void convert_to_x8r8g8b8(const void * src, void * dst, uint w)
|
|
||||||
{
|
|
||||||
memcpy(dst, src, 4 * w);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
@ -61,80 +53,80 @@ namespace
|
|||||||
// Pixel format converter.
|
// Pixel format converter.
|
||||||
void nv::compressRGB(const Image * image, const OutputOptions::Private & outputOptions, const CompressionOptions::Private & compressionOptions)
|
void nv::compressRGB(const Image * image, const OutputOptions::Private & outputOptions, const CompressionOptions::Private & compressionOptions)
|
||||||
{
|
{
|
||||||
nvCheck(image != NULL);
|
nvCheck(image != NULL);
|
||||||
|
|
||||||
const uint w = image->width();
|
const uint w = image->width();
|
||||||
const uint h = image->height();
|
const uint h = image->height();
|
||||||
|
|
||||||
const uint bitCount = compressionOptions.bitcount;
|
const uint bitCount = compressionOptions.bitcount;
|
||||||
nvCheck(bitCount == 8 || bitCount == 16 || bitCount == 24 || bitCount == 32);
|
nvCheck(bitCount == 8 || bitCount == 16 || bitCount == 24 || bitCount == 32);
|
||||||
|
|
||||||
const uint byteCount = bitCount / 8;
|
const uint byteCount = bitCount / 8;
|
||||||
|
|
||||||
const uint rmask = compressionOptions.rmask;
|
const uint rmask = compressionOptions.rmask;
|
||||||
uint rshift, rsize;
|
uint rshift, rsize;
|
||||||
PixelFormat::maskShiftAndSize(rmask, &rshift, &rsize);
|
PixelFormat::maskShiftAndSize(rmask, &rshift, &rsize);
|
||||||
|
|
||||||
const uint gmask = compressionOptions.gmask;
|
const uint gmask = compressionOptions.gmask;
|
||||||
uint gshift, gsize;
|
uint gshift, gsize;
|
||||||
PixelFormat::maskShiftAndSize(gmask, &gshift, &gsize);
|
PixelFormat::maskShiftAndSize(gmask, &gshift, &gsize);
|
||||||
|
|
||||||
const uint bmask = compressionOptions.bmask;
|
const uint bmask = compressionOptions.bmask;
|
||||||
uint bshift, bsize;
|
uint bshift, bsize;
|
||||||
PixelFormat::maskShiftAndSize(bmask, &bshift, &bsize);
|
PixelFormat::maskShiftAndSize(bmask, &bshift, &bsize);
|
||||||
|
|
||||||
const uint amask = compressionOptions.amask;
|
const uint amask = compressionOptions.amask;
|
||||||
uint ashift, asize;
|
uint ashift, asize;
|
||||||
PixelFormat::maskShiftAndSize(amask, &ashift, &asize);
|
PixelFormat::maskShiftAndSize(amask, &ashift, &asize);
|
||||||
|
|
||||||
// Determine pitch.
|
// Determine pitch.
|
||||||
uint pitch = computePitch(w, compressionOptions.bitcount);
|
uint pitch = computePitch(w, compressionOptions.bitcount, 8);
|
||||||
|
|
||||||
uint8 * dst = (uint8 *)mem::malloc(pitch + 4);
|
uint8 * dst = (uint8 *)::malloc(pitch + 4);
|
||||||
|
|
||||||
for (uint y = 0; y < h; y++)
|
for (uint y = 0; y < h; y++)
|
||||||
{
|
{
|
||||||
const Color32 * src = image->scanline(y);
|
const Color32 * src = image->scanline(y);
|
||||||
|
|
||||||
if (bitCount == 32 && rmask == 0xFF0000 && gmask == 0xFF00 && bmask == 0xFF && amask == 0xFF000000)
|
if (bitCount == 32 && rmask == 0xFF0000 && gmask == 0xFF00 && bmask == 0xFF && amask == 0xFF000000)
|
||||||
{
|
{
|
||||||
convert_to_a8r8g8b8(src, dst, w);
|
convert_to_a8r8g8b8(src, dst, w);
|
||||||
}
|
}
|
||||||
else if (bitCount == 32 && rmask == 0xFF0000 && gmask == 0xFF00 && bmask == 0xFF && amask == 0)
|
else if (bitCount == 32 && rmask == 0xFF0000 && gmask == 0xFF00 && bmask == 0xFF && amask == 0)
|
||||||
{
|
{
|
||||||
convert_to_x8r8g8b8(src, dst, w);
|
convert_to_x8r8g8b8(src, dst, w);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Generic pixel format conversion.
|
// Generic pixel format conversion.
|
||||||
for (uint x = 0; x < w; x++)
|
for (uint x = 0; x < w; x++)
|
||||||
{
|
{
|
||||||
uint c = 0;
|
uint c = 0;
|
||||||
c |= PixelFormat::convert(src[x].r, 8, rsize) << rshift;
|
c |= PixelFormat::convert(src[x].r, 8, rsize) << rshift;
|
||||||
c |= PixelFormat::convert(src[x].g, 8, gsize) << gshift;
|
c |= PixelFormat::convert(src[x].g, 8, gsize) << gshift;
|
||||||
c |= PixelFormat::convert(src[x].b, 8, bsize) << bshift;
|
c |= PixelFormat::convert(src[x].b, 8, bsize) << bshift;
|
||||||
c |= PixelFormat::convert(src[x].a, 8, asize) << ashift;
|
c |= PixelFormat::convert(src[x].a, 8, asize) << ashift;
|
||||||
|
|
||||||
// Output one byte at a time.
|
// Output one byte at a time.
|
||||||
for (uint i = 0; i < byteCount; i++)
|
for (uint i = 0; i < byteCount; i++)
|
||||||
{
|
{
|
||||||
*(dst + x * byteCount + i) = (c >> (i * 8)) & 0xFF;
|
*(dst + x * byteCount + i) = (c >> (i * 8)) & 0xFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Zero padding.
|
// Zero padding.
|
||||||
for (uint x = w * byteCount; x < pitch; x++)
|
for (uint x = w * byteCount; x < pitch; x++)
|
||||||
{
|
{
|
||||||
*(dst + x) = 0;
|
*(dst + x) = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (outputOptions.outputHandler != NULL)
|
if (outputOptions.outputHandler != NULL)
|
||||||
{
|
{
|
||||||
outputOptions.outputHandler->writeData(dst, pitch);
|
outputOptions.outputHandler->writeData(dst, pitch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mem::free(dst);
|
::free(dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,18 +74,10 @@ namespace
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint computePitch(uint w, uint bitsize)
|
|
||||||
{
|
|
||||||
uint p = w * ((bitsize + 7) / 8);
|
|
||||||
|
|
||||||
// Align to 32 bits.
|
|
||||||
return ((p + 3) / 4) * 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int computeImageSize(uint w, uint h, uint d, uint bitCount, Format format)
|
static int computeImageSize(uint w, uint h, uint d, uint bitCount, Format format)
|
||||||
{
|
{
|
||||||
if (format == Format_RGBA) {
|
if (format == Format_RGBA) {
|
||||||
return d * h * computePitch(w, bitCount);
|
return d * h * computePitch(w, bitCount, 8);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// @@ Handle 3D textures. DXT and VTC have different behaviors.
|
// @@ Handle 3D textures. DXT and VTC have different behaviors.
|
||||||
@ -126,10 +118,8 @@ namespace nvtt
|
|||||||
// Convert linear float image to fixed image ready for compression.
|
// Convert linear float image to fixed image ready for compression.
|
||||||
void toFixedImage(const InputOptions::Private & inputOptions)
|
void toFixedImage(const InputOptions::Private & inputOptions)
|
||||||
{
|
{
|
||||||
if (this->asFixedImage() == NULL)
|
if (m_floatImage != NULL) // apfaffe - We should check that we have a float image, if so convert it!
|
||||||
{
|
{
|
||||||
nvDebugCheck(m_floatImage != NULL);
|
|
||||||
|
|
||||||
if (inputOptions.isNormalMap || inputOptions.outputGamma == 1.0f)
|
if (inputOptions.isNormalMap || inputOptions.outputGamma == 1.0f)
|
||||||
{
|
{
|
||||||
m_fixedImage = m_floatImage->createImage();
|
m_fixedImage = m_floatImage->createImage();
|
||||||
@ -153,7 +143,7 @@ namespace nvtt
|
|||||||
if (inputOptions.isNormalMap)
|
if (inputOptions.isNormalMap)
|
||||||
{
|
{
|
||||||
// Expand normals to [-1, 1] range.
|
// Expand normals to [-1, 1] range.
|
||||||
// floatImage->expandNormals(0);
|
// floatImage->expandNormals(0);
|
||||||
}
|
}
|
||||||
else if (inputOptions.inputGamma != 1.0f)
|
else if (inputOptions.inputGamma != 1.0f)
|
||||||
{
|
{
|
||||||
@ -175,11 +165,12 @@ namespace nvtt
|
|||||||
|
|
||||||
const Image * asFixedImage() const
|
const Image * asFixedImage() const
|
||||||
{
|
{
|
||||||
if (m_inputImage != NULL)
|
// - apfaffe - switched logic to return the 'processed image' rather than the input!
|
||||||
|
if (m_fixedImage != NULL && m_fixedImage.ptr() != NULL)
|
||||||
{
|
{
|
||||||
return m_inputImage;
|
return m_fixedImage.ptr();
|
||||||
}
|
}
|
||||||
return m_fixedImage.ptr();
|
return m_inputImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
Image * asMutableFixedImage()
|
Image * asMutableFixedImage()
|
||||||
@ -207,28 +198,16 @@ Compressor::Compressor() : m(*new Compressor::Private())
|
|||||||
{
|
{
|
||||||
// CUDA initialization.
|
// CUDA initialization.
|
||||||
m.cudaSupported = cuda::isHardwarePresent();
|
m.cudaSupported = cuda::isHardwarePresent();
|
||||||
m.cudaEnabled = m.cudaSupported;
|
m.cudaEnabled = false;
|
||||||
|
m.cudaDevice = -1;
|
||||||
|
|
||||||
if (m.cudaEnabled)
|
enableCudaAcceleration(m.cudaSupported);
|
||||||
{
|
|
||||||
// Select fastest CUDA device.
|
|
||||||
int device = cuda::getFastestDevice();
|
|
||||||
cuda::setDevice(device);
|
|
||||||
|
|
||||||
m.cuda = new CudaCompressor();
|
|
||||||
|
|
||||||
if (!m.cuda->isValid())
|
|
||||||
{
|
|
||||||
m.cudaEnabled = false;
|
|
||||||
m.cuda = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Compressor::~Compressor()
|
Compressor::~Compressor()
|
||||||
{
|
{
|
||||||
|
enableCudaAcceleration(false);
|
||||||
delete &m;
|
delete &m;
|
||||||
cuda::exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -237,21 +216,33 @@ void Compressor::enableCudaAcceleration(bool enable)
|
|||||||
{
|
{
|
||||||
if (m.cudaSupported)
|
if (m.cudaSupported)
|
||||||
{
|
{
|
||||||
m.cudaEnabled = enable;
|
if (m.cudaEnabled && !enable)
|
||||||
}
|
|
||||||
|
|
||||||
if (m.cudaEnabled && m.cuda == NULL)
|
|
||||||
{
|
|
||||||
// Select fastest CUDA device.
|
|
||||||
int device = cuda::getFastestDevice();
|
|
||||||
cuda::setDevice(device);
|
|
||||||
|
|
||||||
m.cuda = new CudaCompressor();
|
|
||||||
|
|
||||||
if (!m.cuda->isValid())
|
|
||||||
{
|
{
|
||||||
m.cudaEnabled = false;
|
m.cudaEnabled = false;
|
||||||
m.cuda = NULL;
|
m.cuda = NULL;
|
||||||
|
|
||||||
|
if (m.cudaDevice != -1)
|
||||||
|
{
|
||||||
|
// Exit device.
|
||||||
|
cuda::exitDevice();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!m.cudaEnabled && enable)
|
||||||
|
{
|
||||||
|
// Init the CUDA device. This may return -1 if CUDA was already initialized by the app.
|
||||||
|
m.cudaEnabled = cuda::initDevice(&m.cudaDevice);
|
||||||
|
|
||||||
|
if (m.cudaEnabled)
|
||||||
|
{
|
||||||
|
// Create compressor if initialization succeeds.
|
||||||
|
m.cuda = new CudaCompressor();
|
||||||
|
|
||||||
|
// But cleanup if failed.
|
||||||
|
if (!m.cuda->isValid())
|
||||||
|
{
|
||||||
|
enableCudaAcceleration(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -341,13 +332,13 @@ bool Compressor::Private::outputHeader(const InputOptions::Private & inputOption
|
|||||||
header.setTextureCube();
|
header.setTextureCube();
|
||||||
}
|
}
|
||||||
/*else if (inputOptions.textureType == TextureType_3D) {
|
/*else if (inputOptions.textureType == TextureType_3D) {
|
||||||
header.setTexture3D();
|
header.setTexture3D();
|
||||||
header.setDepth(inputOptions.targetDepth);
|
header.setDepth(inputOptions.targetDepth);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (compressionOptions.format == Format_RGBA)
|
if (compressionOptions.format == Format_RGBA)
|
||||||
{
|
{
|
||||||
header.setPitch(computePitch(inputOptions.targetWidth, compressionOptions.bitcount));
|
header.setPitch(computePitch(inputOptions.targetWidth, compressionOptions.bitcount, 8));
|
||||||
header.setPixelFormat(compressionOptions.bitcount, compressionOptions.rmask, compressionOptions.gmask, compressionOptions.bmask, compressionOptions.amask);
|
header.setPixelFormat(compressionOptions.bitcount, compressionOptions.rmask, compressionOptions.gmask, compressionOptions.bmask, compressionOptions.amask);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -715,29 +706,29 @@ bool Compressor::Private::compressMipmap(const Mipmap & mipmap, const InputOptio
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_ATITC)
|
#if defined(HAVE_ATITC)
|
||||||
if (compressionOptions.externalCompressor == "ati")
|
if (compressionOptions.externalCompressor == "ati")
|
||||||
{
|
|
||||||
atiCompressDXT1(image, outputOptions);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
if (compressionOptions.quality == Quality_Fastest)
|
|
||||||
{
|
|
||||||
fast.compressDXT1(outputOptions);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (useCuda)
|
|
||||||
{
|
{
|
||||||
nvDebugCheck(cudaSupported);
|
atiCompressDXT1(image, outputOptions);
|
||||||
cuda->setImage(image, inputOptions.alphaMode);
|
|
||||||
cuda->compressDXT1(compressionOptions, outputOptions);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
#endif
|
||||||
slow.compressDXT1(compressionOptions, outputOptions);
|
if (compressionOptions.quality == Quality_Fastest)
|
||||||
}
|
{
|
||||||
}
|
fast.compressDXT1(outputOptions);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (useCuda)
|
||||||
|
{
|
||||||
|
nvDebugCheck(cudaSupported);
|
||||||
|
cuda->setImage(image, inputOptions.alphaMode);
|
||||||
|
cuda->compressDXT1(compressionOptions, outputOptions);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
slow.compressDXT1(compressionOptions, outputOptions);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (compressionOptions.format == Format_DXT1a)
|
else if (compressionOptions.format == Format_DXT1a)
|
||||||
{
|
{
|
||||||
|
@ -63,10 +63,12 @@ namespace nvtt
|
|||||||
bool compressMipmap(const Mipmap & mipmap, const InputOptions::Private & inputOptions, const CompressionOptions::Private & compressionOptions, const OutputOptions::Private & outputOptions) const;
|
bool compressMipmap(const Mipmap & mipmap, const InputOptions::Private & inputOptions, const CompressionOptions::Private & compressionOptions, const OutputOptions::Private & outputOptions) const;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
bool cudaSupported;
|
bool cudaSupported;
|
||||||
bool cudaEnabled;
|
bool cudaEnabled;
|
||||||
|
int cudaDevice;
|
||||||
|
|
||||||
nv::AutoPtr<nv::CudaCompressor> cuda;
|
nv::AutoPtr<nv::CudaCompressor> cuda;
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ void InputOptions::reset()
|
|||||||
m.textureType = TextureType_2D;
|
m.textureType = TextureType_2D;
|
||||||
m.inputFormat = InputFormat_BGRA_8UB;
|
m.inputFormat = InputFormat_BGRA_8UB;
|
||||||
|
|
||||||
m.alphaMode = AlphaMode_Transparency;
|
m.alphaMode = AlphaMode_None;
|
||||||
|
|
||||||
m.inputGamma = 2.2f;
|
m.inputGamma = 2.2f;
|
||||||
m.outputGamma = 2.2f;
|
m.outputGamma = 2.2f;
|
||||||
|
@ -205,7 +205,7 @@ void OptimalCompress::compressDXT1(Color32 c, BlockDXT1 * dxtBlock)
|
|||||||
|
|
||||||
void OptimalCompress::compressDXT1a(Color32 rgba, BlockDXT1 * dxtBlock)
|
void OptimalCompress::compressDXT1a(Color32 rgba, BlockDXT1 * dxtBlock)
|
||||||
{
|
{
|
||||||
if (rgba.a < 128)
|
if (rgba.a == 0)
|
||||||
{
|
{
|
||||||
dxtBlock->col0.u = 0;
|
dxtBlock->col0.u = 0;
|
||||||
dxtBlock->col1.u = 0;
|
dxtBlock->col1.u = 0;
|
||||||
|
@ -28,6 +28,7 @@ using namespace nvtt;
|
|||||||
|
|
||||||
OutputOptions::OutputOptions() : m(*new OutputOptions::Private())
|
OutputOptions::OutputOptions() : m(*new OutputOptions::Private())
|
||||||
{
|
{
|
||||||
|
m.cWrapperProxy = NULL;
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +73,6 @@ void OutputOptions::setOutputHeader(bool outputHeader)
|
|||||||
m.outputHeader = outputHeader;
|
m.outputHeader = outputHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool OutputOptions::Private::openFile() const
|
bool OutputOptions::Private::openFile() const
|
||||||
{
|
{
|
||||||
if (!fileName.isNull())
|
if (!fileName.isNull())
|
||||||
|
@ -65,6 +65,8 @@ namespace nvtt
|
|||||||
ErrorHandler * errorHandler;
|
ErrorHandler * errorHandler;
|
||||||
bool outputHeader;
|
bool outputHeader;
|
||||||
|
|
||||||
|
void * cWrapperProxy;
|
||||||
|
|
||||||
bool openFile() const;
|
bool openFile() const;
|
||||||
void closeFile() const;
|
void closeFile() const;
|
||||||
};
|
};
|
||||||
|
@ -483,7 +483,7 @@ void QuickCompress::compressDXT1a(const ColorBlock & rgba, BlockDXT1 * dxtBlock)
|
|||||||
|
|
||||||
for (uint i = 0; i < 16; i++)
|
for (uint i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
if (rgba.color(i).a < 128) {
|
if (rgba.color(i).a == 0) {
|
||||||
hasAlpha = true;
|
hasAlpha = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ void CudaCompressor::compressDXT1(const CompressionOptions::Private & compressio
|
|||||||
const uint h = (m_image->height() + 3) / 4;
|
const uint h = (m_image->height() + 3) / 4;
|
||||||
|
|
||||||
uint imageSize = w * h * 16 * sizeof(Color32);
|
uint imageSize = w * h * 16 * sizeof(Color32);
|
||||||
uint * blockLinearImage = (uint *) malloc(imageSize);
|
uint * blockLinearImage = (uint *) ::malloc(imageSize);
|
||||||
convertToBlockLinear(m_image, blockLinearImage); // @@ Do this in parallel with the GPU, or in the GPU!
|
convertToBlockLinear(m_image, blockLinearImage); // @@ Do this in parallel with the GPU, or in the GPU!
|
||||||
|
|
||||||
const uint blockNum = w * h;
|
const uint blockNum = w * h;
|
||||||
@ -207,14 +207,14 @@ void CudaCompressor::compressDXT3(const CompressionOptions::Private & compressio
|
|||||||
const uint h = (m_image->height() + 3) / 4;
|
const uint h = (m_image->height() + 3) / 4;
|
||||||
|
|
||||||
uint imageSize = w * h * 16 * sizeof(Color32);
|
uint imageSize = w * h * 16 * sizeof(Color32);
|
||||||
uint * blockLinearImage = (uint *) malloc(imageSize);
|
uint * blockLinearImage = (uint *) ::malloc(imageSize);
|
||||||
convertToBlockLinear(m_image, blockLinearImage);
|
convertToBlockLinear(m_image, blockLinearImage);
|
||||||
|
|
||||||
const uint blockNum = w * h;
|
const uint blockNum = w * h;
|
||||||
const uint compressedSize = blockNum * 8;
|
const uint compressedSize = blockNum * 8;
|
||||||
|
|
||||||
AlphaBlockDXT3 * alphaBlocks = NULL;
|
AlphaBlockDXT3 * alphaBlocks = NULL;
|
||||||
alphaBlocks = (AlphaBlockDXT3 *)malloc(min(compressedSize, MAX_BLOCKS * 8U));
|
alphaBlocks = (AlphaBlockDXT3 *)::malloc(min(compressedSize, MAX_BLOCKS * 8U));
|
||||||
|
|
||||||
setupCompressKernel(compressionOptions.colorWeight.ptr());
|
setupCompressKernel(compressionOptions.colorWeight.ptr());
|
||||||
|
|
||||||
@ -298,14 +298,14 @@ void CudaCompressor::compressDXT5(const CompressionOptions::Private & compressio
|
|||||||
const uint h = (m_image->height() + 3) / 4;
|
const uint h = (m_image->height() + 3) / 4;
|
||||||
|
|
||||||
uint imageSize = w * h * 16 * sizeof(Color32);
|
uint imageSize = w * h * 16 * sizeof(Color32);
|
||||||
uint * blockLinearImage = (uint *) malloc(imageSize);
|
uint * blockLinearImage = (uint *) ::malloc(imageSize);
|
||||||
convertToBlockLinear(m_image, blockLinearImage);
|
convertToBlockLinear(m_image, blockLinearImage);
|
||||||
|
|
||||||
const uint blockNum = w * h;
|
const uint blockNum = w * h;
|
||||||
const uint compressedSize = blockNum * 8;
|
const uint compressedSize = blockNum * 8;
|
||||||
|
|
||||||
AlphaBlockDXT5 * alphaBlocks = NULL;
|
AlphaBlockDXT5 * alphaBlocks = NULL;
|
||||||
alphaBlocks = (AlphaBlockDXT5 *)malloc(min(compressedSize, MAX_BLOCKS * 8U));
|
alphaBlocks = (AlphaBlockDXT5 *)::malloc(min(compressedSize, MAX_BLOCKS * 8U));
|
||||||
|
|
||||||
setupCompressKernel(compressionOptions.colorWeight.ptr());
|
setupCompressKernel(compressionOptions.colorWeight.ptr());
|
||||||
|
|
||||||
|
@ -128,7 +128,20 @@ inline __device__ __host__ float3 firstEigenVector( float matrix[6] )
|
|||||||
{
|
{
|
||||||
// 8 iterations seems to be more than enough.
|
// 8 iterations seems to be more than enough.
|
||||||
|
|
||||||
float3 v = make_float3(1.0f, 1.0f, 1.0f);
|
float3 row0 = make_float3(matrix[0], matrix[1], matrix[2]);
|
||||||
|
float3 row1 = make_float3(matrix[1], matrix[3], matrix[4]);
|
||||||
|
float3 row2 = make_float3(matrix[2], matrix[4], matrix[5]);
|
||||||
|
|
||||||
|
float r0 = dot(row0, row0);
|
||||||
|
float r1 = dot(row1, row1);
|
||||||
|
float r2 = dot(row2, row2);
|
||||||
|
|
||||||
|
float3 v;
|
||||||
|
if (r0 > r1 && r0 > r2) v = row0;
|
||||||
|
else if (r1 > r2) v = row1;
|
||||||
|
else v = row2;
|
||||||
|
|
||||||
|
//float3 v = make_float3(1.0f, 1.0f, 1.0f);
|
||||||
for(int i = 0; i < 8; i++) {
|
for(int i = 0; i < 8; i++) {
|
||||||
float x = v.x * matrix[0] + v.y * matrix[1] + v.z * matrix[2];
|
float x = v.x * matrix[0] + v.y * matrix[1] + v.z * matrix[2];
|
||||||
float y = v.x * matrix[1] + v.y * matrix[3] + v.z * matrix[4];
|
float y = v.x * matrix[1] + v.y * matrix[3] + v.z * matrix[4];
|
||||||
|
@ -41,11 +41,11 @@ using namespace cuda;
|
|||||||
|
|
||||||
static bool isWindowsVista()
|
static bool isWindowsVista()
|
||||||
{
|
{
|
||||||
OSVERSIONINFO osvi;
|
OSVERSIONINFO osvi;
|
||||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||||
|
|
||||||
::GetVersionEx(&osvi);
|
::GetVersionEx(&osvi);
|
||||||
return osvi.dwMajorVersion >= 6;
|
return osvi.dwMajorVersion >= 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -53,20 +53,20 @@ typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
|
|||||||
|
|
||||||
static bool isWow32()
|
static bool isWow32()
|
||||||
{
|
{
|
||||||
LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle("kernel32"), "IsWow64Process");
|
LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle("kernel32"), "IsWow64Process");
|
||||||
|
|
||||||
BOOL bIsWow64 = FALSE;
|
BOOL bIsWow64 = FALSE;
|
||||||
|
|
||||||
if (NULL != fnIsWow64Process)
|
if (NULL != fnIsWow64Process)
|
||||||
{
|
{
|
||||||
if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64))
|
if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64))
|
||||||
{
|
{
|
||||||
// Assume 32 bits.
|
// Assume 32 bits.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return !bIsWow64;
|
return !bIsWow64;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -158,6 +158,8 @@ bool nv::cuda::isHardwarePresent()
|
|||||||
|
|
||||||
// @@ Make sure that warp size == 32
|
// @@ Make sure that warp size == 32
|
||||||
|
|
||||||
|
// @@ Make sure available GPU is faster than the CPU.
|
||||||
|
|
||||||
return count > 0;
|
return count > 0;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
@ -180,30 +182,59 @@ int nv::cuda::deviceCount()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Make sure device meets requirements:
|
||||||
|
// - Not an emulation device.
|
||||||
|
// - Not an integrated device?
|
||||||
|
// - Faster than CPU.
|
||||||
|
bool nv::cuda::isValidDevice(int i)
|
||||||
|
{
|
||||||
|
#if defined HAVE_CUDA
|
||||||
|
|
||||||
|
cudaDeviceProp device_properties;
|
||||||
|
cudaGetDeviceProperties(&device_properties, i);
|
||||||
|
int gflops = device_properties.multiProcessorCount * device_properties.clockRate;
|
||||||
|
|
||||||
|
if (device_properties.major == -1 || device_properties.minor == -1) {
|
||||||
|
// Emulation device.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if CUDART_VERSION >= 2030 // 2.3
|
||||||
|
/*if (device_properties.integrated)
|
||||||
|
{
|
||||||
|
// Integrated devices.
|
||||||
|
return false;
|
||||||
|
}*/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
int nv::cuda::getFastestDevice()
|
int nv::cuda::getFastestDevice()
|
||||||
{
|
{
|
||||||
int max_gflops_device = 0;
|
int max_gflops_device = -1;
|
||||||
#if defined HAVE_CUDA
|
#if defined HAVE_CUDA
|
||||||
int max_gflops = 0;
|
int max_gflops = 0;
|
||||||
|
|
||||||
const int device_count = deviceCount();
|
const int device_count = deviceCount();
|
||||||
int current_device = 0;
|
for (int i = 0; i < device_count; i++)
|
||||||
while (current_device < device_count)
|
|
||||||
{
|
{
|
||||||
cudaDeviceProp device_properties;
|
if (isValidDevice(i))
|
||||||
cudaGetDeviceProperties(&device_properties, current_device);
|
|
||||||
int gflops = device_properties.multiProcessorCount * device_properties.clockRate;
|
|
||||||
|
|
||||||
if (device_properties.major != -1 && device_properties.minor != -1)
|
|
||||||
{
|
{
|
||||||
if( gflops > max_gflops )
|
cudaDeviceProp device_properties;
|
||||||
|
cudaGetDeviceProperties(&device_properties, i);
|
||||||
|
int gflops = device_properties.multiProcessorCount * device_properties.clockRate;
|
||||||
|
|
||||||
|
if (gflops > max_gflops)
|
||||||
{
|
{
|
||||||
max_gflops = gflops;
|
max_gflops = gflops;
|
||||||
max_gflops_device = current_device;
|
max_gflops_device = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
current_device++;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return max_gflops_device;
|
return max_gflops_device;
|
||||||
@ -211,23 +242,53 @@ int nv::cuda::getFastestDevice()
|
|||||||
|
|
||||||
|
|
||||||
/// Activate the given devices.
|
/// Activate the given devices.
|
||||||
bool nv::cuda::setDevice(int i)
|
bool nv::cuda::initDevice(int * device_ptr)
|
||||||
{
|
{
|
||||||
nvCheck(i < deviceCount());
|
nvDebugCheck(device_ptr != NULL);
|
||||||
#if defined HAVE_CUDA
|
#if defined HAVE_CUDA
|
||||||
cudaError_t result = cudaSetDevice(i);
|
|
||||||
|
|
||||||
if (result != cudaSuccess) {
|
#if CUDART_VERSION >= 2030 // 2.3
|
||||||
nvDebug("*** CUDA Error: %s\n", cudaGetErrorString(result));
|
|
||||||
|
// Set device flags to yield in order to play nice with other threads and to find out if CUDA was already active.
|
||||||
|
cudaError_t resul = cudaSetDeviceFlags(cudaDeviceScheduleYield);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int device = getFastestDevice();
|
||||||
|
|
||||||
|
if (device == -1)
|
||||||
|
{
|
||||||
|
// No device is fast enough.
|
||||||
|
*device_ptr = -1;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result == cudaSuccess;
|
// Select CUDA device.
|
||||||
|
cudaError_t result = cudaSetDevice(device);
|
||||||
|
|
||||||
|
if (result == cudaErrorSetOnActiveProcess)
|
||||||
|
{
|
||||||
|
int device;
|
||||||
|
result = cudaGetDevice(&device);
|
||||||
|
|
||||||
|
*device_ptr = -1; // No device to cleanup.
|
||||||
|
return isValidDevice(device); // Return true if device is valid.
|
||||||
|
}
|
||||||
|
else if (result != cudaSuccess)
|
||||||
|
{
|
||||||
|
nvDebug("*** CUDA Error: %s\n", cudaGetErrorString(result));
|
||||||
|
*device_ptr = -1;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
*device_ptr = device;
|
||||||
|
return true;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void nv::cuda::exit()
|
void nv::cuda::exitDevice()
|
||||||
{
|
{
|
||||||
#if defined HAVE_CUDA
|
#if defined HAVE_CUDA
|
||||||
cudaError_t result = cudaThreadExit();
|
cudaError_t result = cudaThreadExit();
|
||||||
|
@ -32,8 +32,10 @@ namespace nv
|
|||||||
bool isHardwarePresent();
|
bool isHardwarePresent();
|
||||||
int deviceCount();
|
int deviceCount();
|
||||||
int getFastestDevice();
|
int getFastestDevice();
|
||||||
bool setDevice(int i);
|
bool isValidDevice(int i);
|
||||||
void exit();
|
|
||||||
|
bool initDevice(int * device_ptr);
|
||||||
|
void exitDevice();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // nv namespace
|
} // nv namespace
|
||||||
|
@ -73,7 +73,7 @@ namespace nvtt
|
|||||||
Format_DXT1a, // DXT1 with binary alpha.
|
Format_DXT1a, // DXT1 with binary alpha.
|
||||||
Format_DXT3,
|
Format_DXT3,
|
||||||
Format_DXT5,
|
Format_DXT5,
|
||||||
Format_DXT5n, // Compressed HILO: R=0, G=x, B=0, A=y
|
Format_DXT5n, // Compressed HILO: R=1, G=y, B=0, A=x
|
||||||
|
|
||||||
// DX10 formats.
|
// DX10 formats.
|
||||||
Format_BC1 = Format_DXT1,
|
Format_BC1 = Format_DXT1,
|
||||||
@ -194,7 +194,7 @@ namespace nvtt
|
|||||||
// Describe the format of the input.
|
// Describe the format of the input.
|
||||||
NVTT_API void setFormat(InputFormat format);
|
NVTT_API void setFormat(InputFormat format);
|
||||||
|
|
||||||
// Set the way the input alpha channel is interpreted. @@ Not implemented!
|
// Set the way the input alpha channel is interpreted.
|
||||||
NVTT_API void setAlphaMode(AlphaMode alphaMode);
|
NVTT_API void setAlphaMode(AlphaMode alphaMode);
|
||||||
|
|
||||||
// Set gamma settings.
|
// Set gamma settings.
|
||||||
|
@ -1,7 +1,49 @@
|
|||||||
|
#include <stdio.h> //For NULL...
|
||||||
|
|
||||||
#include "nvtt.h"
|
#include "nvtt.h"
|
||||||
#include "nvtt_wrapper.h"
|
#include "nvtt_wrapper.h"
|
||||||
|
|
||||||
|
#include "OutputOptions.h"
|
||||||
|
|
||||||
|
namespace nvttCWrap
|
||||||
|
{
|
||||||
|
//Simple class to re-route calls to the C++ interfaces to C functions
|
||||||
|
struct HandlerProxy : public nvtt::ErrorHandler, public nvtt::OutputHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
HandlerProxy()
|
||||||
|
{
|
||||||
|
errorFunc = NULL;
|
||||||
|
outputFunc = NULL;
|
||||||
|
imageFunc = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void error(nvtt::Error e)
|
||||||
|
{
|
||||||
|
if(errorFunc != NULL)
|
||||||
|
errorFunc((NvttError)e);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void beginImage(int size, int width, int height, int depth, int face, int miplevel)
|
||||||
|
{
|
||||||
|
if(imageFunc != NULL)
|
||||||
|
imageFunc(size, width, height, depth, face, miplevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool writeData(const void * data, int size)
|
||||||
|
{
|
||||||
|
if(outputFunc != NULL)
|
||||||
|
return (outputFunc(data, size) != NVTT_False);
|
||||||
|
else
|
||||||
|
return true; //Just say we succeed anyway... despite nothing being done, in case the user only set the beginImage() func.
|
||||||
|
}
|
||||||
|
|
||||||
|
nvttErrorHandler errorFunc;
|
||||||
|
nvttOutputHandler outputFunc;
|
||||||
|
nvttImageHandler imageFunc;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// InputOptions class.
|
// InputOptions class.
|
||||||
NvttInputOptions * nvttCreateInputOptions()
|
NvttInputOptions * nvttCreateInputOptions()
|
||||||
@ -110,6 +152,7 @@ void nvttSetInputOptionsRoundMode(NvttInputOptions * inputOptions, NvttRoundMode
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// CompressionOptions class.
|
// CompressionOptions class.
|
||||||
NvttCompressionOptions * nvttCreateCompressionOptions()
|
NvttCompressionOptions * nvttCreateCompressionOptions()
|
||||||
{
|
{
|
||||||
@ -136,11 +179,6 @@ void nvttSetCompressionOptionsColorWeights(NvttCompressionOptions * compressionO
|
|||||||
compressionOptions->setColorWeights(red, green, blue, alpha);
|
compressionOptions->setColorWeights(red, green, blue, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*void nvttEnableCompressionOptionsCudaCompression(NvttCompressionOptions * compressionOptions, NvttBoolean enable)
|
|
||||||
{
|
|
||||||
compressionOptions->enableCudaCompression(enable != NVTT_False);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
void nvttSetCompressionOptionsPixelFormat(NvttCompressionOptions * compressionOptions, unsigned int bitcount, unsigned int rmask, unsigned int gmask, unsigned int bmask, unsigned int amask)
|
void nvttSetCompressionOptionsPixelFormat(NvttCompressionOptions * compressionOptions, unsigned int bitcount, unsigned int rmask, unsigned int gmask, unsigned int bmask, unsigned int amask)
|
||||||
{
|
{
|
||||||
compressionOptions->setPixelFormat(bitcount, rmask, gmask, bmask, amask);
|
compressionOptions->setPixelFormat(bitcount, rmask, gmask, bmask, amask);
|
||||||
@ -151,16 +189,23 @@ void nvttSetCompressionOptionsQuantization(NvttCompressionOptions * compressionO
|
|||||||
compressionOptions->setQuantization(colorDithering != NVTT_False, alphaDithering != NVTT_False, binaryAlpha != NVTT_False, alphaThreshold);
|
compressionOptions->setQuantization(colorDithering != NVTT_False, alphaDithering != NVTT_False, binaryAlpha != NVTT_False, alphaThreshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// OutputOptions class.
|
// OutputOptions class.
|
||||||
NvttOutputOptions * nvttCreateOutputOptions()
|
NvttOutputOptions * nvttCreateOutputOptions()
|
||||||
{
|
{
|
||||||
return new nvtt::OutputOptions();
|
nvtt::OutputOptions * outputOptions = new nvtt::OutputOptions();
|
||||||
|
nvttCWrap::HandlerProxy * handlerProxy = new nvttCWrap::HandlerProxy();
|
||||||
|
|
||||||
|
outputOptions->m.cWrapperProxy = handlerProxy;
|
||||||
|
|
||||||
|
return outputOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nvttDestroyOutputOptions(NvttOutputOptions * outputOptions)
|
void nvttDestroyOutputOptions(NvttOutputOptions * outputOptions)
|
||||||
{
|
{
|
||||||
|
nvttCWrap::HandlerProxy * handlerProxy = (nvttCWrap::HandlerProxy *)outputOptions->m.cWrapperProxy;
|
||||||
|
|
||||||
delete outputOptions;
|
delete outputOptions;
|
||||||
|
delete handlerProxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nvttSetOutputOptionsFileName(NvttOutputOptions * outputOptions, const char * fileName)
|
void nvttSetOutputOptionsFileName(NvttOutputOptions * outputOptions, const char * fileName)
|
||||||
@ -172,19 +217,45 @@ void nvttSetOutputOptionsOutputHeader(NvttOutputOptions * outputOptions, NvttBoo
|
|||||||
{
|
{
|
||||||
outputOptions->setOutputHeader(b != NVTT_False);
|
outputOptions->setOutputHeader(b != NVTT_False);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
|
|
||||||
void nvttSetOutputOptionsErrorHandler(NvttOutputOptions * outputOptions, nvttErrorHandler errorHandler)
|
void nvttSetOutputOptionsErrorHandler(NvttOutputOptions * outputOptions, nvttErrorHandler errorHandler)
|
||||||
{
|
{
|
||||||
outputOptions->setErrorHandler(errorHandler);
|
nvttCWrap::HandlerProxy * handlerProxy = (nvttCWrap::HandlerProxy *)outputOptions->m.cWrapperProxy;
|
||||||
|
|
||||||
|
handlerProxy->errorFunc = errorHandler;
|
||||||
|
|
||||||
|
if(errorHandler == NULL)
|
||||||
|
outputOptions->setErrorHandler(NULL);
|
||||||
|
else
|
||||||
|
outputOptions->setErrorHandler(handlerProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nvttSetOutputOptionsOutputHandler(NvttOutputOptions * outputOptions, nvttOutputHandler outputHandler, nvttImageHandler imageHandler)
|
void nvttSetOutputOptionsOutputHandler(NvttOutputOptions * outputOptions, nvttOutputHandler outputHandler, nvttImageHandler imageHandler)
|
||||||
{
|
{
|
||||||
|
nvttCWrap::HandlerProxy * handlerProxy = (nvttCWrap::HandlerProxy *)outputOptions->m.cWrapperProxy;
|
||||||
|
|
||||||
|
handlerProxy->outputFunc = outputHandler;
|
||||||
|
handlerProxy->imageFunc = imageHandler;
|
||||||
|
|
||||||
|
if((outputHandler == NULL) && (imageHandler == NULL))
|
||||||
|
outputOptions->setOutputHandler(NULL);
|
||||||
|
else
|
||||||
|
outputOptions->setOutputHandler(handlerProxy);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// Compressor class.
|
// Compressor class.
|
||||||
|
NvttCompressor * nvttCreateCompressor()
|
||||||
|
{
|
||||||
|
return new nvtt::Compressor();
|
||||||
|
}
|
||||||
|
|
||||||
|
void nvttDestroyCompressor(NvttCompressor * compressor)
|
||||||
|
{
|
||||||
|
delete compressor;
|
||||||
|
}
|
||||||
|
|
||||||
NvttBoolean nvttCompress(const NvttCompressor * compressor, const NvttInputOptions * inputOptions, const NvttCompressionOptions * compressionOptions, const NvttOutputOptions * outputOptions)
|
NvttBoolean nvttCompress(const NvttCompressor * compressor, const NvttInputOptions * inputOptions, const NvttCompressionOptions * compressionOptions, const NvttOutputOptions * outputOptions)
|
||||||
{
|
{
|
||||||
return (NvttBoolean)compressor->process(*inputOptions, *compressionOptions, *outputOptions);
|
return (NvttBoolean)compressor->process(*inputOptions, *compressionOptions, *outputOptions);
|
||||||
@ -195,6 +266,11 @@ int nvttEstimateSize(const NvttCompressor * compressor, const NvttInputOptions *
|
|||||||
return compressor->estimateSize(*inputOptions, *compressionOptions);
|
return compressor->estimateSize(*inputOptions, *compressionOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nvttEnableCudaCompression(NvttCompressor * compressor, NvttBoolean enable)
|
||||||
|
{
|
||||||
|
compressor->enableCudaAcceleration(enable != NVTT_False);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Global functions.
|
// Global functions.
|
||||||
const char * nvttErrorString(NvttError e)
|
const char * nvttErrorString(NvttError e)
|
||||||
|
@ -149,11 +149,12 @@ typedef enum
|
|||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
NVTT_Error_Unknown,
|
||||||
NVTT_Error_InvalidInput,
|
NVTT_Error_InvalidInput,
|
||||||
NVTT_Error_UserInterruption,
|
|
||||||
NVTT_Error_UnsupportedFeature,
|
NVTT_Error_UnsupportedFeature,
|
||||||
NVTT_Error_CudaError,
|
NVTT_Error_CudaError,
|
||||||
NVTT_Error_Unknown,
|
|
||||||
NVTT_Error_FileOpen,
|
NVTT_Error_FileOpen,
|
||||||
NVTT_Error_FileWrite,
|
NVTT_Error_FileWrite,
|
||||||
} NvttError;
|
} NvttError;
|
||||||
@ -170,9 +171,9 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Callbacks
|
// Callbacks
|
||||||
//typedef void (* nvttErrorHandler)(NvttError e);
|
typedef void (* nvttErrorHandler)(NvttError e);
|
||||||
//typedef void (* nvttOutputHandler)(const void * data, int size);
|
typedef NvttBoolean (* nvttOutputHandler)(const void * data, int size);
|
||||||
//typedef void (* nvttImageHandler)(int size, int width, int height, int depth, int face, int miplevel);
|
typedef void (* nvttImageHandler)(int size, int width, int height, int depth, int face, int miplevel);
|
||||||
|
|
||||||
|
|
||||||
// InputOptions class.
|
// InputOptions class.
|
||||||
@ -199,7 +200,6 @@ NVTT_API void nvttSetInputOptionsLinearTransform(NvttInputOptions * inputOptions
|
|||||||
NVTT_API void nvttSetInputOptionsMaxExtents(NvttInputOptions * inputOptions, int dim);
|
NVTT_API void nvttSetInputOptionsMaxExtents(NvttInputOptions * inputOptions, int dim);
|
||||||
NVTT_API void nvttSetInputOptionsRoundMode(NvttInputOptions * inputOptions, NvttRoundMode mode);
|
NVTT_API void nvttSetInputOptionsRoundMode(NvttInputOptions * inputOptions, NvttRoundMode mode);
|
||||||
|
|
||||||
|
|
||||||
// CompressionOptions class.
|
// CompressionOptions class.
|
||||||
NVTT_API NvttCompressionOptions * nvttCreateCompressionOptions();
|
NVTT_API NvttCompressionOptions * nvttCreateCompressionOptions();
|
||||||
NVTT_API void nvttDestroyCompressionOptions(NvttCompressionOptions * compressionOptions);
|
NVTT_API void nvttDestroyCompressionOptions(NvttCompressionOptions * compressionOptions);
|
||||||
@ -210,16 +210,14 @@ NVTT_API void nvttSetCompressionOptionsColorWeights(NvttCompressionOptions * com
|
|||||||
NVTT_API void nvttSetCompressionOptionsPixelFormat(NvttCompressionOptions * compressionOptions, unsigned int bitcount, unsigned int rmask, unsigned int gmask, unsigned int bmask, unsigned int amask);
|
NVTT_API void nvttSetCompressionOptionsPixelFormat(NvttCompressionOptions * compressionOptions, unsigned int bitcount, unsigned int rmask, unsigned int gmask, unsigned int bmask, unsigned int amask);
|
||||||
NVTT_API void nvttSetCompressionOptionsQuantization(NvttCompressionOptions * compressionOptions, NvttBoolean colorDithering, NvttBoolean alphaDithering, NvttBoolean binaryAlpha, int alphaThreshold);
|
NVTT_API void nvttSetCompressionOptionsQuantization(NvttCompressionOptions * compressionOptions, NvttBoolean colorDithering, NvttBoolean alphaDithering, NvttBoolean binaryAlpha, int alphaThreshold);
|
||||||
|
|
||||||
|
|
||||||
// OutputOptions class.
|
// OutputOptions class.
|
||||||
NVTT_API NvttOutputOptions * nvttCreateOutputOptions();
|
NVTT_API NvttOutputOptions * nvttCreateOutputOptions();
|
||||||
NVTT_API void nvttDestroyOutputOptions(NvttOutputOptions * outputOptions);
|
NVTT_API void nvttDestroyOutputOptions(NvttOutputOptions * outputOptions);
|
||||||
|
|
||||||
NVTT_API void nvttSetOutputOptionsFileName(NvttOutputOptions * outputOptions, const char * fileName);
|
NVTT_API void nvttSetOutputOptionsFileName(NvttOutputOptions * outputOptions, const char * fileName);
|
||||||
NVTT_API void nvttSetOutputOptionsOutputHeader(NvttOutputOptions * outputOptions, NvttBoolean b);
|
NVTT_API void nvttSetOutputOptionsOutputHeader(NvttOutputOptions * outputOptions, NvttBoolean b);
|
||||||
//NVTT_API void nvttSetOutputOptionsErrorHandler(NvttOutputOptions * outputOptions, nvttErrorHandler errorHandler);
|
NVTT_API void nvttSetOutputOptionsErrorHandler(NvttOutputOptions * outputOptions, nvttErrorHandler errorHandler);
|
||||||
//NVTT_API void nvttSetOutputOptionsOutputHandler(NvttOutputOptions * outputOptions, nvttOutputHandler outputHandler, nvttImageHandler imageHandler);
|
NVTT_API void nvttSetOutputOptionsOutputHandler(NvttOutputOptions * outputOptions, nvttOutputHandler outputHandler, nvttImageHandler imageHandler);
|
||||||
|
|
||||||
|
|
||||||
// Compressor class.
|
// Compressor class.
|
||||||
NVTT_API NvttCompressor * nvttCreateCompressor();
|
NVTT_API NvttCompressor * nvttCreateCompressor();
|
||||||
@ -228,6 +226,7 @@ NVTT_API void nvttDestroyCompressor(NvttCompressor * compressor);
|
|||||||
NVTT_API NvttBoolean nvttCompress(const NvttCompressor * compressor, const NvttInputOptions * inputOptions, const NvttCompressionOptions * compressionOptions, const NvttOutputOptions * outputOptions);
|
NVTT_API NvttBoolean nvttCompress(const NvttCompressor * compressor, const NvttInputOptions * inputOptions, const NvttCompressionOptions * compressionOptions, const NvttOutputOptions * outputOptions);
|
||||||
NVTT_API int nvttEstimateSize(const NvttCompressor * compressor, const NvttInputOptions * inputOptions, const NvttCompressionOptions * compressionOptions);
|
NVTT_API int nvttEstimateSize(const NvttCompressor * compressor, const NvttInputOptions * inputOptions, const NvttCompressionOptions * compressionOptions);
|
||||||
|
|
||||||
|
NVTT_API void nvttEnableCudaCompression(NvttCompressor * compressor, NvttBoolean enable);
|
||||||
|
|
||||||
// Global functions.
|
// Global functions.
|
||||||
NVTT_API const char * nvttErrorString(NvttError e);
|
NVTT_API const char * nvttErrorString(NvttError e);
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
-------------------------------------------------------------------------- */
|
-------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "maths.h"
|
#include "maths.h"
|
||||||
|
#include "simd.h"
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
|
|
||||||
namespace squish {
|
namespace squish {
|
||||||
@ -60,12 +61,61 @@ Sym3x3 ComputeWeightedCovariance( int n, Vec3 const* points, float const* weight
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static Vec3 EstimatePrincipleComponent( Sym3x3 const& matrix )
|
||||||
|
{
|
||||||
|
Vec3 const row0(matrix[0], matrix[1], matrix[2]);
|
||||||
|
Vec3 const row1(matrix[1], matrix[3], matrix[4]);
|
||||||
|
Vec3 const row2(matrix[2], matrix[4], matrix[5]);
|
||||||
|
|
||||||
|
float r0 = Dot(row0, row0);
|
||||||
|
float r1 = Dot(row1, row1);
|
||||||
|
float r2 = Dot(row2, row2);
|
||||||
|
|
||||||
|
if (r0 > r1 && r0 > r2) return row0;
|
||||||
|
if (r1 > r2) return row1;
|
||||||
|
return row2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define POWER_ITERATION_COUNT 8
|
||||||
|
|
||||||
|
#if SQUISH_USE_SIMD
|
||||||
|
|
||||||
Vec3 ComputePrincipleComponent( Sym3x3 const& matrix )
|
Vec3 ComputePrincipleComponent( Sym3x3 const& matrix )
|
||||||
{
|
{
|
||||||
const int NUM = 8;
|
Vec4 const row0( matrix[0], matrix[1], matrix[2], 0.0f );
|
||||||
|
Vec4 const row1( matrix[1], matrix[3], matrix[4], 0.0f );
|
||||||
|
Vec4 const row2( matrix[2], matrix[4], matrix[5], 0.0f );
|
||||||
|
|
||||||
Vec3 v(1, 1, 1);
|
//Vec4 v = VEC4_CONST( 1.0f );
|
||||||
for(int i = 0; i < NUM; i++) {
|
//Vec4 v = row0; // row1, row2
|
||||||
|
|
||||||
|
Vec3 v3 = EstimatePrincipleComponent( matrix );
|
||||||
|
Vec4 v( v3.X(), v3.Y(), v3.Z(), 0.0f );
|
||||||
|
|
||||||
|
for( int i = 0; i < POWER_ITERATION_COUNT; ++i )
|
||||||
|
{
|
||||||
|
// matrix multiply
|
||||||
|
Vec4 w = row0*v.SplatX();
|
||||||
|
w = MultiplyAdd(row1, v.SplatY(), w);
|
||||||
|
w = MultiplyAdd(row2, v.SplatZ(), w);
|
||||||
|
|
||||||
|
// get max component from xyz in all channels
|
||||||
|
Vec4 a = Max(w.SplatX(), Max(w.SplatY(), w.SplatZ()));
|
||||||
|
|
||||||
|
// divide through and advance
|
||||||
|
v = w*Reciprocal(a);
|
||||||
|
}
|
||||||
|
return v.GetVec3();
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
Vec3 ComputePrincipleComponent( Sym3x3 const& matrix )
|
||||||
|
{
|
||||||
|
Vec3 v = EstimatePrincipleComponent( matrix );
|
||||||
|
for (int i = 0; i < POWER_ITERATION_COUNT; i++)
|
||||||
|
{
|
||||||
float x = v.X() * matrix[0] + v.Y() * matrix[1] + v.Z() * matrix[2];
|
float x = v.X() * matrix[0] + v.Y() * matrix[1] + v.Z() * matrix[2];
|
||||||
float y = v.X() * matrix[1] + v.Y() * matrix[3] + v.Z() * matrix[4];
|
float y = v.X() * matrix[1] + v.Y() * matrix[3] + v.Z() * matrix[4];
|
||||||
float z = v.X() * matrix[2] + v.Y() * matrix[4] + v.Z() * matrix[5];
|
float z = v.X() * matrix[2] + v.Y() * matrix[4] + v.Z() * matrix[5];
|
||||||
@ -82,5 +132,6 @@ Vec3 ComputePrincipleComponent( Sym3x3 const& matrix )
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace squish
|
} // namespace squish
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -87,7 +87,10 @@ struct MyErrorHandler : public nvtt::ErrorHandler
|
|||||||
{
|
{
|
||||||
virtual void error(nvtt::Error e)
|
virtual void error(nvtt::Error e)
|
||||||
{
|
{
|
||||||
|
#if _DEBUG
|
||||||
nvDebugBreak();
|
nvDebugBreak();
|
||||||
|
#endif
|
||||||
|
printf("Error: '%s'\n", nvtt::errorString(e));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -131,6 +134,7 @@ int main(int argc, char *argv[])
|
|||||||
MyAssertHandler assertHandler;
|
MyAssertHandler assertHandler;
|
||||||
MyMessageHandler messageHandler;
|
MyMessageHandler messageHandler;
|
||||||
|
|
||||||
|
bool alpha = false;
|
||||||
bool normal = false;
|
bool normal = false;
|
||||||
bool color2normal = false;
|
bool color2normal = false;
|
||||||
bool wrapRepeat = false;
|
bool wrapRepeat = false;
|
||||||
@ -139,6 +143,7 @@ int main(int argc, char *argv[])
|
|||||||
bool nocuda = false;
|
bool nocuda = false;
|
||||||
bool silent = false;
|
bool silent = false;
|
||||||
bool bc1n = false;
|
bool bc1n = false;
|
||||||
|
bool luminance = false;
|
||||||
nvtt::Format format = nvtt::Format_BC1;
|
nvtt::Format format = nvtt::Format_BC1;
|
||||||
|
|
||||||
const char * externalCompressor = NULL;
|
const char * externalCompressor = NULL;
|
||||||
@ -154,6 +159,10 @@ int main(int argc, char *argv[])
|
|||||||
if (strcmp("-color", argv[i]) == 0)
|
if (strcmp("-color", argv[i]) == 0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
else if (strcmp("-alpha", argv[i]) == 0)
|
||||||
|
{
|
||||||
|
alpha = true;
|
||||||
|
}
|
||||||
else if (strcmp("-normal", argv[i]) == 0)
|
else if (strcmp("-normal", argv[i]) == 0)
|
||||||
{
|
{
|
||||||
normal = true;
|
normal = true;
|
||||||
@ -187,6 +196,11 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
format = nvtt::Format_RGB;
|
format = nvtt::Format_RGB;
|
||||||
}
|
}
|
||||||
|
else if (strcmp("-lumi", argv[i]) == 0)
|
||||||
|
{
|
||||||
|
luminance = true;
|
||||||
|
format = nvtt::Format_RGB;
|
||||||
|
}
|
||||||
else if (strcmp("-bc1", argv[i]) == 0)
|
else if (strcmp("-bc1", argv[i]) == 0)
|
||||||
{
|
{
|
||||||
format = nvtt::Format_BC1;
|
format = nvtt::Format_BC1;
|
||||||
@ -254,7 +268,12 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("NVIDIA Texture Tools - Copyright NVIDIA Corporation 2007\n\n");
|
const uint version = nvtt::version();
|
||||||
|
const uint major = version / 100;
|
||||||
|
const uint minor = version % 100;
|
||||||
|
|
||||||
|
|
||||||
|
printf("NVIDIA Texture Tools %u.%u - Copyright NVIDIA Corporation 2007\n\n", major, minor);
|
||||||
|
|
||||||
if (input.isNull())
|
if (input.isNull())
|
||||||
{
|
{
|
||||||
@ -262,6 +281,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
printf("Input options:\n");
|
printf("Input options:\n");
|
||||||
printf(" -color \tThe input image is a color map (default).\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(" -normal \tThe input image is a normal map.\n");
|
||||||
printf(" -tonormal\tConvert input to normal map.\n");
|
printf(" -tonormal\tConvert input to normal map.\n");
|
||||||
printf(" -clamp \tClamp wrapping mode (default).\n");
|
printf(" -clamp \tClamp wrapping mode (default).\n");
|
||||||
@ -272,6 +292,7 @@ int main(int argc, char *argv[])
|
|||||||
printf(" -fast \tFast compression.\n");
|
printf(" -fast \tFast compression.\n");
|
||||||
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(" -lumi \tLUMINANCE format\n");
|
||||||
printf(" -bc1 \tBC1 format (DXT1)\n");
|
printf(" -bc1 \tBC1 format (DXT1)\n");
|
||||||
printf(" -bc1n \tBC1 normal map format (DXT1nm)\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");
|
||||||
@ -281,7 +302,7 @@ int main(int argc, char *argv[])
|
|||||||
printf(" -bc4 \tBC4 format (ATI1)\n");
|
printf(" -bc4 \tBC4 format (ATI1)\n");
|
||||||
printf(" -bc5 \tBC5 format (3Dc/ATI2)\n\n");
|
printf(" -bc5 \tBC5 format (3Dc/ATI2)\n\n");
|
||||||
|
|
||||||
return 1;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @@ Make sure input file exists.
|
// @@ Make sure input file exists.
|
||||||
@ -296,13 +317,13 @@ int main(int argc, char *argv[])
|
|||||||
if (!dds.isValid())
|
if (!dds.isValid())
|
||||||
{
|
{
|
||||||
fprintf(stderr, "The file '%s' is not a valid DDS file.\n", input.str());
|
fprintf(stderr, "The file '%s' is not a valid DDS file.\n", input.str());
|
||||||
return 1;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dds.isSupported() || dds.isTexture3D())
|
if (!dds.isSupported() || dds.isTexture3D())
|
||||||
{
|
{
|
||||||
fprintf(stderr, "The file '%s' is not a supported DDS file.\n", input.str());
|
fprintf(stderr, "The file '%s' is not a supported DDS file.\n", input.str());
|
||||||
return 1;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint faceCount;
|
uint faceCount;
|
||||||
@ -339,7 +360,7 @@ int main(int argc, char *argv[])
|
|||||||
if (!image.load(input))
|
if (!image.load(input))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "The file '%s' is not a supported image type.\n", input.str());
|
fprintf(stderr, "The file '%s' is not a supported image type.\n", input.str());
|
||||||
return 1;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
inputOptions.setTextureLayout(nvtt::TextureType_2D, image.width(), image.height());
|
inputOptions.setTextureLayout(nvtt::TextureType_2D, image.width(), image.height());
|
||||||
@ -355,6 +376,15 @@ int main(int argc, char *argv[])
|
|||||||
inputOptions.setWrapMode(nvtt::WrapMode_Clamp);
|
inputOptions.setWrapMode(nvtt::WrapMode_Clamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (alpha)
|
||||||
|
{
|
||||||
|
inputOptions.setAlphaMode(nvtt::AlphaMode_Transparency);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
inputOptions.setAlphaMode(nvtt::AlphaMode_None);
|
||||||
|
}
|
||||||
|
|
||||||
if (normal)
|
if (normal)
|
||||||
{
|
{
|
||||||
setNormalMap(inputOptions);
|
setNormalMap(inputOptions);
|
||||||
@ -375,6 +405,25 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
nvtt::CompressionOptions compressionOptions;
|
nvtt::CompressionOptions compressionOptions;
|
||||||
compressionOptions.setFormat(format);
|
compressionOptions.setFormat(format);
|
||||||
|
if (format == nvtt::Format_RGBA)
|
||||||
|
{
|
||||||
|
if (luminance)
|
||||||
|
{
|
||||||
|
compressionOptions.setPixelFormat(8, 0xff, 0, 0, 0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// @@ Edit this to choose the desired pixel format:
|
||||||
|
// compressionOptions.setPixelType(nvtt::PixelType_Float);
|
||||||
|
// compressionOptions.setPixelFormat(16, 16, 16, 16);
|
||||||
|
// compressionOptions.setPixelType(nvtt::PixelType_UnsignedNorm);
|
||||||
|
// compressionOptions.setPixelFormat(16, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (format == nvtt::Format_BC1a) {
|
||||||
|
compressionOptions.setQuantization(false, true, true, 127);
|
||||||
|
}
|
||||||
|
|
||||||
if (fast)
|
if (fast)
|
||||||
{
|
{
|
||||||
compressionOptions.setQuality(nvtt::Quality_Fastest);
|
compressionOptions.setQuality(nvtt::Quality_Fastest);
|
||||||
@ -402,7 +451,7 @@ int main(int argc, char *argv[])
|
|||||||
if (outputHandler.stream->isError())
|
if (outputHandler.stream->isError())
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Error opening '%s' for writting\n", output.str());
|
fprintf(stderr, "Error opening '%s' for writting\n", output.str());
|
||||||
return 1;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
nvtt::Compressor compressor;
|
nvtt::Compressor compressor;
|
||||||
@ -430,27 +479,16 @@ int main(int argc, char *argv[])
|
|||||||
// fflush(stdout);
|
// fflush(stdout);
|
||||||
// getchar();
|
// getchar();
|
||||||
|
|
||||||
/* LARGE_INTEGER temp;
|
|
||||||
QueryPerformanceFrequency((LARGE_INTEGER*) &temp);
|
|
||||||
double freq = ((double) temp.QuadPart) / 1000.0;
|
|
||||||
|
|
||||||
LARGE_INTEGER start_time;
|
|
||||||
QueryPerformanceCounter((LARGE_INTEGER*) &start_time);
|
|
||||||
*/
|
|
||||||
clock_t start = clock();
|
clock_t start = clock();
|
||||||
|
|
||||||
compressor.process(inputOptions, compressionOptions, outputOptions);
|
if (!compressor.process(inputOptions, compressionOptions, outputOptions))
|
||||||
/*
|
{
|
||||||
LARGE_INTEGER end_time;
|
return EXIT_FAILURE;
|
||||||
QueryPerformanceCounter((LARGE_INTEGER*) &end_time);
|
}
|
||||||
|
|
||||||
float diff_time = (float) (((double) end_time.QuadPart - (double) start_time.QuadPart) / freq);
|
|
||||||
printf("\rtime taken: %.3f seconds\n", diff_time/1000);
|
|
||||||
*/
|
|
||||||
|
|
||||||
clock_t end = clock();
|
clock_t end = clock();
|
||||||
printf("\rtime taken: %.3f seconds\n", float(end-start) / CLOCKS_PER_SEC);
|
printf("\rtime taken: %.3f seconds\n", float(end-start) / CLOCKS_PER_SEC);
|
||||||
|
|
||||||
return 0;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user