Compare commits
94 Commits
Author | SHA1 | Date | |
---|---|---|---|
92f730457c | |||
90be3fa28d | |||
55e7d3dec4 | |||
b5e373b734 | |||
6ce542b5c0 | |||
58e5f6534f | |||
eda4786ca6 | |||
29a720bf82 | |||
1120f83f7d | |||
c38c3dc584 | |||
7d3d0ede9d | |||
bc66a7ad74 | |||
ca8d17abf5 | |||
10e79dac9d | |||
e068964423 | |||
ea340443d9 | |||
fb2b0cb38c | |||
c01566cd2f | |||
47bdab8e27 | |||
70267fda15 | |||
aebcea412c | |||
bccdcd49da | |||
68e9f05794 | |||
0f186e688f | |||
38e9652d64 | |||
f08114c1b5 | |||
7b9f891f92 | |||
787c9bb8fb | |||
42220b981e | |||
70331a37fd | |||
2ffc4cd7ad | |||
4ba8e87a38 | |||
d440d68aa8 | |||
48f61dbfc0 | |||
94c3fa75a8 | |||
c562af6d9b | |||
a889f2fda6 | |||
d855d0461b | |||
246f2a409a | |||
6a6b3edce1 | |||
52b3bc9437 | |||
f6ab357b09 | |||
ce3a65c03e | |||
8d9bf5c0b3 | |||
ab5265e642 | |||
fd1d5e41c7 | |||
3980d5dc21 | |||
15e7125b4b | |||
921ee354c0 | |||
e3f7e303e4 | |||
1df69495fc | |||
91eb30667f | |||
6db5cffca6 | |||
34ae5bcb6f | |||
fe130a9906 | |||
bade8e5e09 | |||
141a05edf4 | |||
7d3facd81a | |||
17a4f765fb | |||
cb91740591 | |||
d10295fbf6 | |||
fa5e1f5a07 | |||
9d47e100f1 | |||
db1b30ee4b | |||
4c759f999c | |||
299ad176fc | |||
5070cc98d3 | |||
133ebfb282 | |||
ebe8054728 | |||
aa14653d96 | |||
389adb5368 | |||
bd3314f4af | |||
065c5f0689 | |||
cc8656f12b | |||
d2384cf47f | |||
aff59c22b8 | |||
59be16d40a | |||
b7a724448b | |||
259e7c58fd | |||
307c8b99ee | |||
6b933c4f62 | |||
fd1ac3c61f | |||
65aa7e1eaa | |||
f5ae4c1a9a | |||
75c09220c8 | |||
9f4b4bd532 | |||
bce983f39e | |||
ff93ad41cb | |||
56c7771100 | |||
ccced843e3 | |||
dafe2b8841 | |||
e3e7fcb226 | |||
970395fba8 | |||
8a24a93e2f |
@ -1,4 +1,4 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0)
|
||||
PROJECT(NV)
|
||||
ENABLE_TESTING()
|
||||
|
||||
@ -16,13 +16,6 @@ MESSAGE(STATUS "Setting optimal options")
|
||||
MESSAGE(STATUS " Processor: ${NV_SYSTEM_PROCESSOR}")
|
||||
MESSAGE(STATUS " Compiler Flags: ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
IF(NVTT_SHARED)
|
||||
SET(NVCORE_SHARED TRUE)
|
||||
SET(NVMATH_SHARED TRUE)
|
||||
SET(NVIMAGE_SHARED TRUE)
|
||||
ENDIF(NVTT_SHARED)
|
||||
|
||||
|
||||
ADD_SUBDIRECTORY(src)
|
||||
|
||||
IF(WIN32)
|
||||
|
52
ChangeLog
52
ChangeLog
@ -1,55 +1,3 @@
|
||||
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
|
||||
* Fix dll version checking.
|
||||
* Detect CUDA 2.1 and future CUDA versions correctly.
|
||||
* Print CUDA detection message in nvcompress.
|
||||
* Select the fastest CUDA device.
|
||||
* Compile squish with -fPIC. Fixes issue 74.
|
||||
* Fix warnings under gcc 4.3.2.
|
||||
* Fix nvzoom option typo by Frank Richter. Fixes issue 81.
|
||||
* Do not use CUDA to compress small mipmaps. Fixes issue 76.
|
||||
* Compute mipmaps of semi-transparent images correctly.
|
||||
* Shutdown CUDA properly. Fixes issue 83.
|
||||
* Fix pixel format converions. Fixes issue 87.
|
||||
* Update single color compression tables. Fixes issue 85.
|
||||
|
||||
NVIDIA Texture Tools version 2.0.5
|
||||
* Fix error in single color compressor. Fixes issue 66.
|
||||
* Detect mismatch between CUDA runtime and driver, and disable CUDA in that case.
|
||||
* Fix cmake files when compiling NVTT as a shared library.
|
||||
* When linking nvtt dynamically on unix, link all libraries dynamically.
|
||||
* Select fastest CUDA device.
|
||||
|
||||
NVIDIA Texture Tools version 2.0.4
|
||||
* Fix error in RGB format output; reported by jonsoh. See issue 49.
|
||||
* Added support RGB format dithering by jonsoh. Fixes issue 50 and 51.
|
||||
* Prevent infinite loop in indexMirror when width equal 1. Fixes issue 65.
|
||||
* Implement general scale filter, including upsampling.
|
||||
|
||||
NVIDIA Texture Tools version 2.0.3
|
||||
* More accurate DXT3 compressor. Fixes issue 38.
|
||||
* Remove legacy compressors. Fix issue 34.
|
||||
|
@ -57,7 +57,7 @@ MARK_AS_ADVANCED (CUDA_FOUND CUDA_COMPILER CUDA_RUNTIME_LIBRARY)
|
||||
|
||||
|
||||
#SET(CUDA_OPTIONS "-ncfe")
|
||||
SET(CUDA_OPTIONS "--host-compilation=C")
|
||||
SET(CUDA_OPTIONS "")
|
||||
|
||||
IF (CUDA_EMULATION)
|
||||
SET (CUDA_OPTIONS "${CUDA_OPTIONS} -deviceemu")
|
||||
@ -120,7 +120,7 @@ MACRO (WRAP_CUDA outfiles)
|
||||
FOREACH (CUFILE ${ARGN})
|
||||
GET_FILENAME_COMPONENT (CUFILE ${CUFILE} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT (CFILE ${CUFILE} NAME_WE)
|
||||
SET (CFILE ${CMAKE_CURRENT_BINARY_DIR}/${CFILE}.gen.cpp)
|
||||
SET (CFILE ${CMAKE_CURRENT_BINARY_DIR}/${CFILE}.gen.c)
|
||||
|
||||
GET_CUFILE_DEPENDENCIES(CUDEPS ${CUFILE})
|
||||
#MESSAGE("${CUDEPS}")
|
||||
|
@ -53,7 +53,11 @@ ENDIF(ZLIB_FOUND)
|
||||
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_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} ${OPENEXR_ILMTHREAD_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} ${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)
|
||||
|
||||
IF(OPENEXR_FOUND)
|
||||
|
2
configure
vendored
2
configure
vendored
@ -53,7 +53,7 @@ echo "-- Configuring nvidia-texture-tools "`cat VERSION`
|
||||
|
||||
mkdir -p ./build
|
||||
cd ./build
|
||||
$CMAKE .. -DNVTT_SHARED=1 -DCMAKE_BUILD_TYPE=$build -DCMAKE_INSTALL_PREFIX=$prefix -G "Unix Makefiles" || exit 1
|
||||
$CMAKE .. -DCMAKE_BUILD_TYPE=$build -DCMAKE_INSTALL_PREFIX=$prefix -G "Unix Makefiles" || exit 1
|
||||
cd ..
|
||||
|
||||
echo ""
|
||||
|
@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Security;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
|
||||
namespace Nvidia.TextureTools
|
||||
{
|
||||
@ -136,113 +134,86 @@ namespace Nvidia.TextureTools
|
||||
/// </summary>
|
||||
public enum Error
|
||||
{
|
||||
Unknown,
|
||||
InvalidInput,
|
||||
|
||||
UnsupportedFeature,
|
||||
UserInterruption,
|
||||
UnsupportedFeature,
|
||||
CudaError,
|
||||
|
||||
FileOpen,
|
||||
Unknown,
|
||||
FileOpen,
|
||||
FileWrite,
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#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>
|
||||
#region public class InputOptions
|
||||
/// <summary>
|
||||
/// Input options.
|
||||
/// </summary>
|
||||
public class InputOptions : IDisposable
|
||||
public class InputOptions
|
||||
{
|
||||
#region Bindings
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static IntPtr nvttCreateInputOptions();
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttDestroyInputOptions(IntPtr inputOptions);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsTextureLayout(IntPtr inputOptions, TextureType type, int w, int h, int d);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttResetInputOptionsTextureLayout(IntPtr inputOptions);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static bool nvttSetInputOptionsMipmapData(IntPtr inputOptions, IntPtr data, int w, int h, int d, int face, int mipmap);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsFormat(IntPtr inputOptions, InputFormat format);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsAlphaMode(IntPtr inputOptions, AlphaMode alphaMode);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsGamma(IntPtr inputOptions, float inputGamma, float outputGamma);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsWrapMode(IntPtr inputOptions, WrapMode mode);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsMipmapFilter(IntPtr inputOptions, MipmapFilter filter);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsMipmapGeneration(IntPtr inputOptions, bool generateMipmaps, int maxLevel);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsKaiserParameters(IntPtr inputOptions, float width, float alpha, float stretch);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsNormalMap(IntPtr inputOptions, bool b);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsConvertToNormalMap(IntPtr inputOptions, bool convert);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsHeightEvaluation(IntPtr inputOptions, float redScale, float greenScale, float blueScale, float alphaScale);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsNormalFilter(IntPtr inputOptions, float small, float medium, float big, float large);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsNormalizeMipmaps(IntPtr inputOptions, bool b);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsColorTransform(IntPtr inputOptions, ColorTransform t);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsLinearTransfrom(IntPtr inputOptions, int channel, float w0, float w1, float w2, float w3);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsMaxExtents(IntPtr inputOptions, int d);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetInputOptionsRoundMode(IntPtr inputOptions, RoundMode mode);
|
||||
#endregion
|
||||
|
||||
@ -252,7 +223,10 @@ namespace Nvidia.TextureTools
|
||||
{
|
||||
options = nvttCreateInputOptions();
|
||||
}
|
||||
|
||||
~InputOptions()
|
||||
{
|
||||
nvttDestroyInputOptions(options);
|
||||
}
|
||||
|
||||
public void SetTextureLayout(TextureType type, int w, int h, int d)
|
||||
{
|
||||
@ -263,22 +237,6 @@ namespace Nvidia.TextureTools
|
||||
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)
|
||||
{
|
||||
nvttSetInputOptionsMipmapData(options, data, width, height, depth, face, mipmap);
|
||||
@ -368,62 +326,36 @@ namespace Nvidia.TextureTools
|
||||
{
|
||||
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
|
||||
|
||||
#region public class CompressionOptions
|
||||
/// <summary>
|
||||
/// Compression options.
|
||||
/// </summary>
|
||||
public class CompressionOptions : IDisposable
|
||||
public class CompressionOptions
|
||||
{
|
||||
#region Bindings
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static IntPtr nvttCreateCompressionOptions();
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttDestroyCompressionOptions(IntPtr compressionOptions);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetCompressionOptionsFormat(IntPtr compressionOptions, Format format);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetCompressionOptionsQuality(IntPtr compressionOptions, Quality quality);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetCompressionOptionsColorWeights(IntPtr compressionOptions, float red, float green, float blue, float alpha);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetCompressionOptionsPixelFormat(IntPtr compressionOptions, uint bitcount, uint rmask, uint gmask, uint bmask, uint amask);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetCompressionOptionsQuantization(IntPtr compressionOptions, bool colorDithering, bool alphaDithering, bool binaryAlpha, int alphaThreshold);
|
||||
|
||||
#endregion
|
||||
|
||||
internal IntPtr options;
|
||||
@ -432,6 +364,10 @@ namespace Nvidia.TextureTools
|
||||
{
|
||||
options = nvttCreateCompressionOptions();
|
||||
}
|
||||
~CompressionOptions()
|
||||
{
|
||||
nvttDestroyCompressionOptions(options);
|
||||
}
|
||||
|
||||
public void SetFormat(Format format)
|
||||
{
|
||||
@ -467,295 +403,115 @@ namespace Nvidia.TextureTools
|
||||
{
|
||||
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
|
||||
|
||||
#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>
|
||||
/// Output options.
|
||||
/// </summary>
|
||||
public class OutputOptions : IDisposable
|
||||
public class OutputOptions
|
||||
{
|
||||
#region Delegates
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
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);
|
||||
|
||||
#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
|
||||
|
||||
private Error lastErrorCode = Error.Unknown;
|
||||
|
||||
internal Error LastErrorCode
|
||||
{
|
||||
get { return lastErrorCode; }
|
||||
}
|
||||
|
||||
#region Bindings
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
#region Bindings
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static IntPtr nvttCreateOutputOptions();
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttDestroyOutputOptions(IntPtr outputOptions);
|
||||
|
||||
[DllImport("nvtt", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt", CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetOutputOptionsFileName(IntPtr outputOptions, string fileName);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetOutputOptionsErrorHandler(IntPtr outputOptions, InternalErrorHandlerDelegate errorHandler);
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetOutputOptionsErrorHandler(IntPtr outputOptions, ErrorHandler errorHandler);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
private void ErrorCallback(Error error)
|
||||
{
|
||||
if (Error != null) Error(error);
|
||||
}
|
||||
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetOutputOptionsOutputHeader(IntPtr outputOptions, bool b);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttSetOutputOptionsOutputHandler(IntPtr outputOptions, IntPtr writeData, IntPtr image);
|
||||
//[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
//private extern static void nvttSetOutputOptionsOutputHandler(IntPtr outputOptions, WriteDataDelegate writeData, ImageDelegate image);
|
||||
|
||||
#endregion
|
||||
|
||||
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()
|
||||
{
|
||||
options = nvttCreateOutputOptions();
|
||||
nvttSetOutputOptionsErrorHandler(options, ErrorCallback);
|
||||
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);
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
// @@ Add OutputHandler interface.
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region public class Compressor
|
||||
public class Compressor : IDisposable
|
||||
#region public static class Compressor
|
||||
public class Compressor
|
||||
{
|
||||
#region Bindings
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static IntPtr nvttCreateCompressor();
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static void nvttDestroyCompressor(IntPtr compressor);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static bool nvttCompress(IntPtr compressor, IntPtr inputOptions, IntPtr compressionOptions, IntPtr outputOptions);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
private extern static int nvttEstimateSize(IntPtr compressor, IntPtr inputOptions, IntPtr compressionOptions);
|
||||
|
||||
[DllImport("nvtt", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
|
||||
[DllImport("nvtt"), SuppressUnmanagedCodeSecurity]
|
||||
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
|
||||
|
||||
internal IntPtr compressor;
|
||||
private Thread creatingThread;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
public void Compress(InputOptions input, CompressionOptions compression, OutputOptions output)
|
||||
~Compressor()
|
||||
{
|
||||
ValidateThread();
|
||||
nvttDestroyCompressor(compressor);
|
||||
}
|
||||
|
||||
if (!nvttCompress(compressor, input.options, compression.options, output.options))
|
||||
{
|
||||
//An error occured, use the last error registered.
|
||||
throw new TextureToolsException(output.LastErrorCode);
|
||||
}
|
||||
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)
|
||||
{
|
||||
ValidateThread();
|
||||
|
||||
return nvttEstimateSize(compressor, input.options, compression.options);
|
||||
}
|
||||
|
||||
@ -764,169 +520,7 @@ namespace Nvidia.TextureTools
|
||||
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
|
||||
|
||||
#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
|
||||
|
@ -1,482 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,122 +0,0 @@
|
||||
<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>
|
@ -1,32 +0,0 @@
|
||||
|
||||
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
|
@ -1,33 +0,0 @@
|
||||
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")]
|
@ -281,10 +281,6 @@
|
||||
RelativePath="..\..\..\src\nvcore\Debug.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\nvcore\Library.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\nvcore\Memory.cpp"
|
||||
>
|
||||
@ -319,10 +315,6 @@
|
||||
RelativePath="..\..\..\src\nvcore\DefsVcWin32.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\nvcore\Library.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\nvcore\Memory.h"
|
||||
>
|
||||
|
@ -355,10 +355,6 @@
|
||||
RelativePath="..\..\..\src\nvimage\nvimage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\nvimage\PixelFormat.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\nvimage\PsdFile.h"
|
||||
>
|
||||
|
@ -53,8 +53,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,0,6,0
|
||||
PRODUCTVERSION 2,0,6,0
|
||||
FILEVERSION 2,0,3,0
|
||||
PRODUCTVERSION 2,0,3,0
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -71,12 +71,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "NVIDIA Corporation"
|
||||
VALUE "FileDescription", "NVIDIA Texture Tools Dynamic Link Library"
|
||||
VALUE "FileVersion", "2, 0, 8, 0"
|
||||
VALUE "FileVersion", "2, 0, 3, 0"
|
||||
VALUE "InternalName", "nvtt"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2007-2010"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2007"
|
||||
VALUE "OriginalFilename", "nvtt.dll"
|
||||
VALUE "ProductName", "NVIDIA Texture Tools Dynamic Link Library"
|
||||
VALUE "ProductVersion", "2, 0, 8, 0"
|
||||
VALUE "ProductVersion", "2, 0, 3, 0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -179,8 +179,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="Copying header files..."
|
||||
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@ -346,8 +344,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="Copying header files..."
|
||||
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@ -507,8 +503,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="Copying header files..."
|
||||
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@ -670,8 +664,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="Copying header files..."
|
||||
CommandLine="xcopy /y /f /i "$(SolutionDir)\..\..\src\nvtt\nvtt*.h" "$(SolutionDir)\$(ConfigurationName).$(PlatformName)\include\nvtt\""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
|
@ -1,52 +0,0 @@
|
||||
<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>
|
@ -1,35 +0,0 @@
|
||||
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")]
|
@ -1,526 +0,0 @@
|
||||
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
|
@ -1,482 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,122 +0,0 @@
|
||||
<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>
|
@ -1,32 +0,0 @@
|
||||
|
||||
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
|
@ -1,33 +0,0 @@
|
||||
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")]
|
Binary file not shown.
@ -1,359 +0,0 @@
|
||||
<?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>
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
@ -1,16 +0,0 @@
|
||||
//{{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
|
Binary file not shown.
@ -1,686 +0,0 @@
|
||||
<?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>
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
@ -1,16 +0,0 @@
|
||||
//{{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
|
@ -1,16 +0,0 @@
|
||||
#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
|
@ -1,355 +0,0 @@
|
||||
<?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>
|
Binary file not shown.
@ -1,358 +0,0 @@
|
||||
<?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>
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
@ -1,16 +0,0 @@
|
||||
//{{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
|
Binary file not shown.
@ -1,379 +0,0 @@
|
||||
<?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>
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
@ -1,16 +0,0 @@
|
||||
//{{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
|
@ -1,383 +0,0 @@
|
||||
<?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>
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
@ -1,379 +0,0 @@
|
||||
<?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>
|
@ -1,16 +0,0 @@
|
||||
//{{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
|
@ -1,319 +0,0 @@
|
||||
<?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>
|
@ -1,321 +0,0 @@
|
||||
|
||||
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
|
@ -1,102 +0,0 @@
|
||||
// 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
|
||||
|
@ -1,953 +0,0 @@
|
||||
<?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>
|
@ -1,14 +0,0 @@
|
||||
//{{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
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
@ -1,379 +0,0 @@
|
||||
<?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>
|
@ -1,16 +0,0 @@
|
||||
//{{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
|
@ -1,487 +0,0 @@
|
||||
<?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,9 +105,7 @@ ENDIF(OPENEXR_FOUND)
|
||||
FIND_PACKAGE(Qt4)
|
||||
|
||||
# Threads
|
||||
FIND_PACKAGE(Threads REQUIRED)
|
||||
MESSAGE(STATUS "Use thread library: ${CMAKE_THREAD_LIBS_INIT}")
|
||||
SET(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
FIND_PACKAGE(Threads)
|
||||
|
||||
# configuration file
|
||||
INCLUDE(CheckIncludeFiles)
|
||||
|
@ -19,21 +19,14 @@ SET(CORE_SRCS
|
||||
TextWriter.h
|
||||
TextWriter.cpp
|
||||
Radix.h
|
||||
Radix.cpp
|
||||
Library.h
|
||||
Library.cpp)
|
||||
Radix.cpp)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# targets
|
||||
ADD_DEFINITIONS(-DNVCORE_EXPORTS)
|
||||
|
||||
IF(UNIX)
|
||||
SET(LIBS ${LIBS} ${CMAKE_DL_LIBS})
|
||||
ENDIF(UNIX)
|
||||
|
||||
IF(NVCORE_SHARED)
|
||||
ADD_DEFINITIONS(-DNVCORE_SHARED=1)
|
||||
ADD_LIBRARY(nvcore SHARED ${CORE_SRCS})
|
||||
ELSE(NVCORE_SHARED)
|
||||
ADD_LIBRARY(nvcore ${CORE_SRCS})
|
||||
|
@ -16,9 +16,9 @@ Do not use memmove in insert & remove, use copy ctors instead.
|
||||
|
||||
|
||||
// nvcore
|
||||
#include "nvcore.h"
|
||||
#include "Memory.h"
|
||||
#include "Debug.h"
|
||||
#include <nvcore/nvcore.h>
|
||||
#include <nvcore/Memory.h>
|
||||
#include <nvcore/Debug.h>
|
||||
|
||||
#include <string.h> // memmove
|
||||
#include <new> // for placement new
|
||||
@ -589,15 +589,15 @@ namespace nv
|
||||
// free the buffer.
|
||||
if( m_buffer_size == 0 ) {
|
||||
if( m_buffer ) {
|
||||
free( m_buffer );
|
||||
mem::free( m_buffer );
|
||||
m_buffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// realloc the buffer
|
||||
else {
|
||||
if( m_buffer ) m_buffer = (T *) realloc(m_buffer, sizeof(T) * m_buffer_size);
|
||||
else m_buffer = (T *) ::malloc(sizeof(T) * m_buffer_size);
|
||||
if( m_buffer ) m_buffer = (T *) mem::realloc( m_buffer, sizeof(T) * m_buffer_size );
|
||||
else m_buffer = (T *) mem::malloc( sizeof(T) * m_buffer_size );
|
||||
}
|
||||
}
|
||||
|
||||
@ -778,7 +778,7 @@ namespace nv
|
||||
e->clear();
|
||||
}
|
||||
}
|
||||
free(table);
|
||||
mem::free(table);
|
||||
table = NULL;
|
||||
entry_count = 0;
|
||||
size_mask = -1;
|
||||
@ -824,13 +824,13 @@ namespace nv
|
||||
}
|
||||
|
||||
/// Number of entries in the hash.
|
||||
int size() const
|
||||
int size()
|
||||
{
|
||||
return entry_count;
|
||||
}
|
||||
|
||||
/// Number of entries in the hash.
|
||||
int count() const
|
||||
int count()
|
||||
{
|
||||
return size();
|
||||
}
|
||||
@ -1001,7 +1001,7 @@ namespace nv
|
||||
new_size = nextPowerOfTwo(new_size);
|
||||
|
||||
HashMap<T, U, hash_functor> new_hash;
|
||||
new_hash.table = (Entry *) ::malloc(sizeof(Entry) * new_size);
|
||||
new_hash.table = (Entry *) mem::malloc(sizeof(Entry) * new_size);
|
||||
nvDebugCheck(new_hash.table != NULL);
|
||||
|
||||
new_hash.entry_count = 0;
|
||||
@ -1026,7 +1026,7 @@ namespace nv
|
||||
}
|
||||
|
||||
// Delete our old data buffer.
|
||||
free(table);
|
||||
mem::free(table);
|
||||
}
|
||||
|
||||
// Steal new_hash's data.
|
||||
|
@ -28,7 +28,7 @@
|
||||
#endif
|
||||
|
||||
#if NV_OS_LINUX && defined(HAVE_EXECINFO_H)
|
||||
# include <execinfo.h> // backtrace
|
||||
# include <execinfo.h>
|
||||
# if NV_CC_GNUC // defined(HAVE_CXXABI_H)
|
||||
# include <cxxabi.h>
|
||||
# endif
|
||||
@ -38,14 +38,7 @@
|
||||
# include <unistd.h> // getpid
|
||||
# include <sys/types.h>
|
||||
# include <sys/sysctl.h> // sysctl
|
||||
# include <sys/ucontext.h>
|
||||
# undef HAVE_EXECINFO_H
|
||||
# if defined(HAVE_EXECINFO_H) // only after OSX 10.5
|
||||
# include <execinfo.h> // backtrace
|
||||
# if NV_CC_GNUC // defined(HAVE_CXXABI_H)
|
||||
# include <cxxabi.h>
|
||||
# endif
|
||||
# endif
|
||||
# include <ucontext.h>
|
||||
#endif
|
||||
|
||||
#include <stdexcept> // std::runtime_error
|
||||
@ -135,14 +128,6 @@ namespace
|
||||
|
||||
#if defined(HAVE_EXECINFO_H) // NV_OS_LINUX
|
||||
|
||||
static bool nvHasStackTrace() {
|
||||
#if NV_OS_DARWIN
|
||||
return backtrace != NULL;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void nvPrintStackTrace(void * trace[], int size, int start=0) {
|
||||
char ** string_array = backtrace_symbols(trace, size);
|
||||
|
||||
@ -181,36 +166,24 @@ namespace
|
||||
|
||||
static void * callerAddress(void * secret)
|
||||
{
|
||||
# if NV_OS_DARWIN
|
||||
# if defined(_STRUCT_MCONTEXT)
|
||||
# if NV_CPU_PPC
|
||||
ucontext_t * ucp = (ucontext_t *)secret;
|
||||
return (void *) ucp->uc_mcontext->__ss.__srr0;
|
||||
# elif NV_CPU_X86
|
||||
ucontext_t * ucp = (ucontext_t *)secret;
|
||||
return (void *) ucp->uc_mcontext->__ss.__eip;
|
||||
# endif
|
||||
# else
|
||||
# if NV_CPU_PPC
|
||||
ucontext_t * ucp = (ucontext_t *)secret;
|
||||
return (void *) ucp->uc_mcontext->ss.srr0;
|
||||
# elif NV_CPU_X86
|
||||
ucontext_t * ucp = (ucontext_t *)secret;
|
||||
return (void *) ucp->uc_mcontext->ss.eip;
|
||||
# endif
|
||||
# endif
|
||||
# if NV_OS_DARWIN && NV_CPU_PPC
|
||||
ucontext_t * ucp = (ucontext_t *)secret;
|
||||
return (void *) ucp->uc_mcontext->ss.srr0;
|
||||
# elif NV_OS_DARWIN && NV_CPU_X86
|
||||
ucontext_t * ucp = (ucontext_t *)secret;
|
||||
return (void *) ucp->uc_mcontext->ss.eip;
|
||||
# elif NV_CPU_X86_64
|
||||
// #define REG_RIP REG_INDEX(rip) // seems to be 16
|
||||
ucontext_t * ucp = (ucontext_t *)secret;
|
||||
return (void *)ucp->uc_mcontext.gregs[REG_RIP];
|
||||
# elif NV_CPU_X86
|
||||
ucontext_t * ucp = (ucontext_t *)secret;
|
||||
return (void *)ucp->uc_mcontext.gregs[14/*REG_EIP*/];
|
||||
# elif NV_CPU_PPC
|
||||
ucontext_t * ucp = (ucontext_t *)secret;
|
||||
return (void *) ucp->uc_mcontext.regs->nip;
|
||||
# else
|
||||
# if NV_CPU_X86_64
|
||||
// #define REG_RIP REG_INDEX(rip) // seems to be 16
|
||||
ucontext_t * ucp = (ucontext_t *)secret;
|
||||
return (void *)ucp->uc_mcontext.gregs[REG_RIP];
|
||||
# elif NV_CPU_X86
|
||||
ucontext_t * ucp = (ucontext_t *)secret;
|
||||
return (void *)ucp->uc_mcontext.gregs[14/*REG_EIP*/];
|
||||
# elif NV_CPU_PPC
|
||||
ucontext_t * ucp = (ucontext_t *)secret;
|
||||
return (void *) ucp->uc_mcontext.regs->nip;
|
||||
# endif
|
||||
return NULL;
|
||||
# endif
|
||||
|
||||
// How to obtain the instruction pointers in different platforms, from mlton's source code.
|
||||
@ -255,18 +228,17 @@ namespace
|
||||
}
|
||||
|
||||
# if defined(HAVE_EXECINFO_H)
|
||||
if (nvHasStackTrace()) // in case of weak linking
|
||||
{
|
||||
void * trace[64];
|
||||
int size = backtrace(trace, 64);
|
||||
|
||||
if (pnt != NULL) {
|
||||
// Overwrite sigaction with caller's address.
|
||||
trace[1] = pnt;
|
||||
}
|
||||
void * trace[64];
|
||||
int size = backtrace(trace, 64);
|
||||
|
||||
nvPrintStackTrace(trace, size, 1);
|
||||
if (pnt != NULL) {
|
||||
// Overwrite sigaction with caller's address.
|
||||
trace[1] = pnt;
|
||||
}
|
||||
|
||||
nvPrintStackTrace(trace, size, 1);
|
||||
|
||||
# endif // defined(HAVE_EXECINFO_H)
|
||||
|
||||
exit(0);
|
||||
@ -401,12 +373,9 @@ namespace
|
||||
# endif
|
||||
|
||||
# if defined(HAVE_EXECINFO_H)
|
||||
if (nvHasStackTrace())
|
||||
{
|
||||
void * trace[64];
|
||||
int size = backtrace(trace, 64);
|
||||
nvPrintStackTrace(trace, size, 2);
|
||||
}
|
||||
void * trace[64];
|
||||
int size = backtrace(trace, 64);
|
||||
nvPrintStackTrace(trace, size, 3);
|
||||
# endif
|
||||
|
||||
// Exit cleanly.
|
||||
@ -453,12 +422,9 @@ void NV_CDECL nvDebug(const char *msg, ...)
|
||||
void debug::dumpInfo()
|
||||
{
|
||||
#if !NV_OS_WIN32 && defined(HAVE_SIGNAL_H) && defined(HAVE_EXECINFO_H)
|
||||
if (nvHasStackTrace())
|
||||
{
|
||||
void * trace[64];
|
||||
int size = backtrace(trace, 64);
|
||||
nvPrintStackTrace(trace, size, 1);
|
||||
}
|
||||
void * trace[64];
|
||||
int size = backtrace(trace, 64);
|
||||
nvPrintStackTrace(trace, size, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,6 @@ namespace nv
|
||||
{
|
||||
NVCORE_API void dumpInfo();
|
||||
|
||||
// These functions are not thread safe.
|
||||
NVCORE_API void setMessageHandler( MessageHandler * messageHandler );
|
||||
NVCORE_API void resetMessageHandler();
|
||||
|
||||
|
@ -2,7 +2,8 @@
|
||||
#error "Do not include this file directly."
|
||||
#endif
|
||||
|
||||
//#include <stdint.h> // uint8_t, int8_t, ...
|
||||
#include <stdlib.h> // uint8_t, int8_t, ...
|
||||
|
||||
|
||||
// Function linkage
|
||||
#define DLL_IMPORT
|
||||
@ -48,7 +49,7 @@
|
||||
|
||||
#define restrict __restrict__
|
||||
|
||||
/*
|
||||
|
||||
// Type definitions
|
||||
typedef uint8_t uint8;
|
||||
typedef int8_t int8;
|
||||
@ -64,4 +65,3 @@ typedef int64_t int64;
|
||||
|
||||
// Aliases
|
||||
typedef uint32 uint;
|
||||
*/
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
#define restrict __restrict__
|
||||
|
||||
/*
|
||||
|
||||
// Type definitions
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
@ -63,4 +63,3 @@ typedef signed long long int64;
|
||||
|
||||
// Aliases
|
||||
typedef uint32 uint;
|
||||
*/
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#define restrict __restrict__
|
||||
|
||||
/*
|
||||
|
||||
// Type definitions
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
@ -57,4 +57,3 @@ typedef signed long long int64;
|
||||
|
||||
// Aliases
|
||||
typedef uint32 uint;
|
||||
*/
|
||||
|
@ -19,9 +19,7 @@
|
||||
|
||||
// Set standard function names.
|
||||
#define snprintf _snprintf
|
||||
#if _MSC_VER < 1500
|
||||
# define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#define vsnprintf _vsnprintf
|
||||
#define vsscanf _vsscanf
|
||||
#define chdir _chdir
|
||||
#define getcwd _getcwd
|
||||
@ -39,7 +37,7 @@
|
||||
#define __FUNC__ __FUNCTION__
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
// Type definitions
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
@ -55,7 +53,7 @@ typedef signed __int64 int64;
|
||||
|
||||
// Aliases
|
||||
typedef uint32 uint;
|
||||
*/
|
||||
|
||||
|
||||
// Unwanted VC++ warnings to disable.
|
||||
/*
|
||||
@ -72,6 +70,8 @@ typedef uint32 uint;
|
||||
#pragma warning(disable : 4711) // function selected for automatic inlining
|
||||
#pragma warning(disable : 4725) // Pentium fdiv bug
|
||||
|
||||
#pragma warning(disable : 4345) // behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
|
||||
|
||||
#pragma warning(disable : 4786) // Identifier was truncated and cannot be debugged.
|
||||
|
||||
#pragma warning(disable : 4675) // resolved overload was found by argument-dependent lookup
|
||||
|
@ -1,41 +0,0 @@
|
||||
|
||||
#include "Library.h"
|
||||
#include "Debug.h"
|
||||
|
||||
#if NV_OS_WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define VC_EXTRALEAN
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void * nvLoadLibrary(const char * name)
|
||||
{
|
||||
#if NV_OS_WIN32
|
||||
return (void *)LoadLibraryExA( name, NULL, 0 );
|
||||
#else
|
||||
return dlopen(name, RTLD_LAZY);
|
||||
#endif
|
||||
}
|
||||
|
||||
void nvUnloadLibrary(void * handle)
|
||||
{
|
||||
nvDebugCheck(handle != NULL);
|
||||
#if NV_OS_WIN32
|
||||
FreeLibrary((HMODULE)handle);
|
||||
#else
|
||||
dlclose(handle);
|
||||
#endif
|
||||
}
|
||||
|
||||
void * nvBindSymbol(void * handle, const char * symbol)
|
||||
{
|
||||
#if NV_OS_WIN32
|
||||
return (void *)GetProcAddress((HMODULE)handle, symbol);
|
||||
#else
|
||||
return (void *)dlsym(handle, symbol);
|
||||
#endif
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
// This code is in the public domain -- castano@gmail.com
|
||||
|
||||
#ifndef NV_CORE_LIBRARY_H
|
||||
#define NV_CORE_LIBRARY_H
|
||||
|
||||
#include <nvcore/nvcore.h>
|
||||
|
||||
#if NV_OS_WIN32
|
||||
#define LIBRARY_NAME(name) #name ".dll"
|
||||
#elif NV_OS_DARWIN
|
||||
#define NV_LIBRARY_NAME(name) "lib" #name ".dylib"
|
||||
#else
|
||||
#define NV_LIBRARY_NAME(name) "lib" #name ".so"
|
||||
#endif
|
||||
|
||||
NVCORE_API void * nvLoadLibrary(const char * name);
|
||||
NVCORE_API void nvUnloadLibrary(void * lib);
|
||||
NVCORE_API void * nvBindSymbol(void * lib, const char * symbol);
|
||||
|
||||
class NVCORE_CLASS Library
|
||||
{
|
||||
public:
|
||||
Library(const char * name)
|
||||
{
|
||||
handle = nvLoadLibrary(name);
|
||||
}
|
||||
~Library()
|
||||
{
|
||||
if (isValid())
|
||||
{
|
||||
nvUnloadLibrary(handle);
|
||||
}
|
||||
}
|
||||
|
||||
bool isValid() const
|
||||
{
|
||||
return handle != NULL;
|
||||
}
|
||||
|
||||
void * bindSymbol(const char * symbol)
|
||||
{
|
||||
return nvBindSymbol(handle, symbol);
|
||||
}
|
||||
|
||||
private:
|
||||
void * handle;
|
||||
};
|
||||
|
||||
|
||||
#endif // NV_CORE_LIBRARY_H
|
@ -1,118 +1,36 @@
|
||||
// This code is in the public domain -- Ignacio Casta<74>o <castano@gmail.com>
|
||||
|
||||
#include "Memory.h"
|
||||
#include "Debug.h"
|
||||
|
||||
//#if HAVE_MALLOC_H
|
||||
//#include <malloc.h>
|
||||
//#endif
|
||||
|
||||
#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;
|
||||
|
||||
#if NV_OVERRIDE_ALLOC
|
||||
|
||||
void * malloc(size_t size)
|
||||
void * nv::mem::malloc(size_t size)
|
||||
{
|
||||
#if USE_EFENCE
|
||||
return EF_malloc(size);
|
||||
#else
|
||||
return ::malloc(size);
|
||||
#endif
|
||||
return ::malloc(size);
|
||||
}
|
||||
|
||||
void * debug_malloc(size_t size, const char * file, int line)
|
||||
void * nv::mem::malloc(size_t size, const char * file, int line)
|
||||
{
|
||||
NV_UNUSED(file);
|
||||
NV_UNUSED(line);
|
||||
#if USE_EFENCE
|
||||
return EF_malloc(size);
|
||||
#else
|
||||
return ::malloc(size);
|
||||
#endif
|
||||
NV_UNUSED(file);
|
||||
NV_UNUSED(line);
|
||||
return ::malloc(size);
|
||||
}
|
||||
|
||||
void free(void * ptr)
|
||||
void nv::mem::free(const void * ptr)
|
||||
{
|
||||
#if USE_EFENCE
|
||||
return EF_free(const_cast<void *>(ptr));
|
||||
#else
|
||||
::free(const_cast<void *>(ptr));
|
||||
#endif
|
||||
::free(const_cast<void *>(ptr));
|
||||
}
|
||||
|
||||
void * realloc(void * ptr, size_t size)
|
||||
void * nv::mem::realloc(void * ptr, size_t size)
|
||||
{
|
||||
nvDebugCheck(ptr != NULL || size != 0); // undefined realloc behavior.
|
||||
#if USE_EFENCE
|
||||
return EF_realloc(ptr, size);
|
||||
#else
|
||||
return ::realloc(ptr, size);
|
||||
#endif
|
||||
nvDebugCheck(ptr != NULL || size != 0); // undefined realloc behavior.
|
||||
return ::realloc(ptr, size);
|
||||
}
|
||||
|
||||
/* 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,52 +1,186 @@
|
||||
// This code is in the public domain -- Ignacio Castaño <castano@gmail.com>
|
||||
// This code is in the public domain -- castanyo@yahoo.es
|
||||
|
||||
#pragma once
|
||||
#ifndef NV_CORE_MEMORY_H
|
||||
#define NV_CORE_MEMORY_H
|
||||
|
||||
#include "nvcore.h"
|
||||
#include <nvcore/nvcore.h>
|
||||
|
||||
#include <stdlib.h> // malloc(), realloc() and free()
|
||||
#include <stddef.h> // size_t
|
||||
#include <stddef.h> // size_t
|
||||
|
||||
#include <new> // new and delete
|
||||
|
||||
#define NV_OVERRIDE_ALLOC 0
|
||||
|
||||
#if NV_OVERRIDE_ALLOC
|
||||
|
||||
// Custom memory allocator
|
||||
extern "C" {
|
||||
NVCORE_API void * malloc(size_t size);
|
||||
NVCORE_API void * debug_malloc(size_t size, const char * file, int line);
|
||||
NVCORE_API void free(void * ptr);
|
||||
NVCORE_API void * realloc(void * ptr, size_t size);
|
||||
namespace nv
|
||||
{
|
||||
namespace mem
|
||||
{
|
||||
NVCORE_API void * malloc(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
|
||||
#define new new(__FILE__, __LINE__)
|
||||
#define malloc(i) debug_malloc(i, __FILE__, __LINE__)
|
||||
#define malloc(i) malloc(i, __FILE__, __LINE__)
|
||||
#endif
|
||||
*/
|
||||
|
||||
#endif
|
||||
#if 0
|
||||
/*
|
||||
File: main.cpp
|
||||
|
||||
namespace nv {
|
||||
Version: 1.0
|
||||
|
||||
// C++ helpers.
|
||||
template <typename T> T * malloc(size_t count) {
|
||||
return (T *)::malloc(sizeof(T) * count);
|
||||
}
|
||||
Abstract: Overrides the C++ 'operator new' and 'operator delete'.
|
||||
|
||||
template <typename T> T * realloc(T * ptr, size_t count) {
|
||||
return (T *)::realloc(ptr, sizeof(T) * count);
|
||||
}
|
||||
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
|
||||
("Apple") in consideration of your agreement to the following terms, and your
|
||||
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.
|
||||
|
||||
template <typename T> void free(const T * ptr) {
|
||||
::free((void *)ptr);
|
||||
}
|
||||
In consideration of your agreement to abide by the following terms, and subject
|
||||
to these terms, Apple grants you a personal, non-exclusive license, under Apple’s
|
||||
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.
|
||||
|
||||
} // nv namespace
|
||||
The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
|
||||
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
|
||||
|
@ -24,7 +24,7 @@ __forceinline void nvPrefetch(const void * mem)
|
||||
#else // NV_CC_MSVC
|
||||
|
||||
// do nothing in other case.
|
||||
#define nvPrefetch(ptr)
|
||||
#define piPrefetch(ptr)
|
||||
|
||||
#endif // NV_CC_MSVC
|
||||
|
||||
|
@ -43,11 +43,8 @@ public:
|
||||
|
||||
/** Delete owned pointer and assign new one. */
|
||||
void operator=( T * p ) {
|
||||
if (p != m_ptr)
|
||||
{
|
||||
delete m_ptr;
|
||||
m_ptr = p;
|
||||
}
|
||||
delete m_ptr;
|
||||
m_ptr = p;
|
||||
}
|
||||
|
||||
/** Member access. */
|
||||
@ -252,14 +249,14 @@ public:
|
||||
/** -> operator. */
|
||||
BaseClass * operator -> () const
|
||||
{
|
||||
nvCheck( m_ptr != NULL );
|
||||
piCheck( m_ptr != NULL );
|
||||
return m_ptr;
|
||||
}
|
||||
|
||||
/** * operator. */
|
||||
BaseClass & operator*() const
|
||||
{
|
||||
nvCheck( m_ptr != NULL );
|
||||
piCheck( m_ptr != NULL );
|
||||
return *m_ptr;
|
||||
}
|
||||
|
||||
|
@ -47,25 +47,25 @@ public:
|
||||
|
||||
/** @name Stream implementation. */
|
||||
//@{
|
||||
virtual void seek( uint pos )
|
||||
virtual void seek( int pos )
|
||||
{
|
||||
nvDebugCheck(m_fp != NULL);
|
||||
nvDebugCheck(pos <= size());
|
||||
nvDebugCheck(pos >= 0 && pos < size());
|
||||
fseek(m_fp, pos, SEEK_SET);
|
||||
}
|
||||
|
||||
virtual uint tell() const
|
||||
virtual int tell() const
|
||||
{
|
||||
nvDebugCheck(m_fp != NULL);
|
||||
return ftell(m_fp);
|
||||
}
|
||||
|
||||
virtual uint size() const
|
||||
virtual int size() const
|
||||
{
|
||||
nvDebugCheck(m_fp != NULL);
|
||||
uint pos = ftell(m_fp);
|
||||
int pos = ftell(m_fp);
|
||||
fseek(m_fp, 0, SEEK_END);
|
||||
uint end = ftell(m_fp);
|
||||
int end = ftell(m_fp);
|
||||
fseek(m_fp, pos, SEEK_SET);
|
||||
return end;
|
||||
}
|
||||
@ -117,11 +117,11 @@ public:
|
||||
/** @name Stream implementation. */
|
||||
//@{
|
||||
/// Write data.
|
||||
virtual uint serialize( void * data, uint len )
|
||||
virtual void serialize( void * data, int len )
|
||||
{
|
||||
nvDebugCheck(data != NULL);
|
||||
nvDebugCheck(m_fp != NULL);
|
||||
return (uint)fwrite(data, 1, len, m_fp);
|
||||
fwrite(data, len, 1, m_fp);
|
||||
}
|
||||
|
||||
virtual bool isLoading() const
|
||||
@ -156,11 +156,11 @@ public:
|
||||
/** @name Stream implementation. */
|
||||
//@{
|
||||
/// Read data.
|
||||
virtual uint serialize( void * data, uint len )
|
||||
virtual void serialize( void * data, int len )
|
||||
{
|
||||
nvDebugCheck(data != NULL);
|
||||
nvDebugCheck(m_fp != NULL);
|
||||
return (uint)fread(data, 1, len, m_fp);
|
||||
fread(data, len, 1, m_fp);
|
||||
}
|
||||
|
||||
virtual bool isLoading() const
|
||||
@ -184,40 +184,33 @@ class NVCORE_CLASS MemoryInputStream : public Stream
|
||||
public:
|
||||
|
||||
/// Ctor.
|
||||
MemoryInputStream( const uint8 * mem, uint size ) :
|
||||
MemoryInputStream( const uint8 * mem, int size ) :
|
||||
m_mem(mem), m_ptr(mem), m_size(size) { }
|
||||
|
||||
/** @name Stream implementation. */
|
||||
//@{
|
||||
/// Read data.
|
||||
virtual uint serialize( void * data, uint len )
|
||||
virtual void serialize( void * data, int len )
|
||||
{
|
||||
nvDebugCheck(data != NULL);
|
||||
nvDebugCheck(!isError());
|
||||
|
||||
uint left = m_size - tell();
|
||||
if (len > left) len = left;
|
||||
|
||||
memcpy( data, m_ptr, len );
|
||||
m_ptr += len;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
virtual void seek( uint pos )
|
||||
virtual void seek( int pos )
|
||||
{
|
||||
nvDebugCheck(!isError());
|
||||
m_ptr = m_mem + pos;
|
||||
nvDebugCheck(!isError());
|
||||
}
|
||||
|
||||
virtual uint tell() const
|
||||
virtual int tell() const
|
||||
{
|
||||
nvDebugCheck(m_ptr >= m_mem);
|
||||
return uint(m_ptr - m_mem);
|
||||
return int(m_ptr - m_mem);
|
||||
}
|
||||
|
||||
virtual uint size() const
|
||||
virtual int size() const
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
@ -259,7 +252,7 @@ private:
|
||||
|
||||
const uint8 * m_mem;
|
||||
const uint8 * m_ptr;
|
||||
uint m_size;
|
||||
int m_size;
|
||||
|
||||
};
|
||||
|
||||
@ -293,19 +286,17 @@ public:
|
||||
/** @name Stream implementation. */
|
||||
//@{
|
||||
/// Read data.
|
||||
virtual uint serialize( void * data, uint len )
|
||||
virtual void serialize( void * data, int len )
|
||||
{
|
||||
nvDebugCheck(data != NULL);
|
||||
len = m_s->serialize( data, len );
|
||||
m_s->serialize( data, len );
|
||||
|
||||
if( m_s->isError() ) {
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
virtual void seek( uint pos )
|
||||
virtual void seek( int pos )
|
||||
{
|
||||
m_s->seek( pos );
|
||||
|
||||
@ -314,12 +305,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual uint tell() const
|
||||
virtual int tell() const
|
||||
{
|
||||
return m_s->tell();
|
||||
}
|
||||
|
||||
virtual uint size() const
|
||||
virtual int size() const
|
||||
{
|
||||
return m_s->size();
|
||||
}
|
||||
|
@ -21,17 +21,17 @@ namespace
|
||||
{
|
||||
static char * strAlloc(uint size)
|
||||
{
|
||||
return static_cast<char *>(::malloc(size));
|
||||
return static_cast<char *>(mem::malloc(size));
|
||||
}
|
||||
|
||||
static char * strReAlloc(char * str, uint size)
|
||||
{
|
||||
return static_cast<char *>(::realloc(str, size));
|
||||
return static_cast<char *>(mem::realloc(str, size));
|
||||
}
|
||||
|
||||
static void strFree(const char * str)
|
||||
{
|
||||
return ::free(const_cast<char *>(str));
|
||||
return mem::free(const_cast<char *>(str));
|
||||
}
|
||||
|
||||
/*static char * strDup( const char * str )
|
||||
@ -209,11 +209,48 @@ StringBuilder::StringBuilder( const StringBuilder & s ) : m_size(0), m_str(NULL)
|
||||
}
|
||||
|
||||
/** Copy string. */
|
||||
StringBuilder::StringBuilder( const char * s ) : m_size(0), m_str(NULL)
|
||||
StringBuilder::StringBuilder( const char * s )
|
||||
{
|
||||
copy(s);
|
||||
}
|
||||
|
||||
/** Allocate and copy string. */
|
||||
StringBuilder::StringBuilder( int size_hint, const StringBuilder & s) : m_size(size_hint), m_str(NULL)
|
||||
{
|
||||
nvDebugCheck(m_size > 0);
|
||||
m_str = strAlloc(m_size);
|
||||
copy(s);
|
||||
}
|
||||
|
||||
/** Allocate and format string. */
|
||||
StringBuilder::StringBuilder( const char * fmt, ... ) : m_size(0), m_str(NULL)
|
||||
{
|
||||
nvDebugCheck(fmt != NULL);
|
||||
va_list arg;
|
||||
va_start( arg, fmt );
|
||||
|
||||
format( fmt, arg );
|
||||
|
||||
va_end( arg );
|
||||
}
|
||||
|
||||
/** Allocate and format string. */
|
||||
StringBuilder::StringBuilder( int size_hint, const char * fmt, ... ) : m_size(size_hint), m_str(NULL)
|
||||
{
|
||||
nvDebugCheck(m_size > 0);
|
||||
nvDebugCheck(fmt != NULL);
|
||||
|
||||
m_str = strAlloc(m_size);
|
||||
|
||||
va_list arg;
|
||||
va_start( arg, fmt );
|
||||
|
||||
format( fmt, arg );
|
||||
|
||||
va_end( arg );
|
||||
}
|
||||
|
||||
|
||||
/** Delete the string. */
|
||||
StringBuilder::~StringBuilder()
|
||||
{
|
||||
@ -241,7 +278,8 @@ StringBuilder & StringBuilder::format( const char * fmt, ... )
|
||||
/** Format a string safely. */
|
||||
StringBuilder & StringBuilder::format( const char * fmt, va_list arg )
|
||||
{
|
||||
nvDebugCheck(fmt != NULL);
|
||||
nvCheck(fmt != NULL);
|
||||
nvCheck(m_size >= 0);
|
||||
|
||||
if( m_size == 0 ) {
|
||||
m_size = 64;
|
||||
@ -289,7 +327,8 @@ StringBuilder & StringBuilder::format( const char * fmt, va_list arg )
|
||||
/** Append a string. */
|
||||
StringBuilder & StringBuilder::append( const char * s )
|
||||
{
|
||||
nvDebugCheck(s != NULL);
|
||||
nvCheck(s != NULL);
|
||||
nvCheck(m_size >= 0);
|
||||
|
||||
const uint slen = uint(strlen( s ));
|
||||
|
||||
@ -436,6 +475,31 @@ void StringBuilder::reset()
|
||||
}
|
||||
|
||||
|
||||
Path::Path(const char * fmt, ...)
|
||||
{
|
||||
nvDebugCheck( fmt != NULL );
|
||||
|
||||
va_list arg;
|
||||
va_start( arg, fmt );
|
||||
|
||||
format( fmt, arg );
|
||||
|
||||
va_end( arg );
|
||||
}
|
||||
|
||||
Path::Path(int size_hint, const char * fmt, ...) : StringBuilder(size_hint)
|
||||
{
|
||||
nvDebugCheck( fmt != NULL );
|
||||
|
||||
va_list arg;
|
||||
va_start( arg, fmt );
|
||||
|
||||
format( fmt, arg );
|
||||
|
||||
va_end( arg );
|
||||
}
|
||||
|
||||
|
||||
/// Get the file name from a path.
|
||||
const char * Path::fileName() const
|
||||
{
|
||||
@ -545,6 +609,8 @@ const char * Path::extension(const char * str)
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
String String::s_null(String::null);
|
||||
|
||||
/// Clone this string
|
||||
String String::clone() const
|
||||
@ -555,13 +621,13 @@ String String::clone() const
|
||||
|
||||
void String::setString(const char * str)
|
||||
{
|
||||
if (str == NULL) {
|
||||
data = NULL;
|
||||
if( str == NULL ) {
|
||||
data = s_null.data;
|
||||
}
|
||||
else {
|
||||
allocString( str );
|
||||
addRef();
|
||||
}
|
||||
addRef();
|
||||
}
|
||||
|
||||
void String::setString(const char * str, int length)
|
||||
@ -574,11 +640,11 @@ void String::setString(const char * str, int length)
|
||||
|
||||
void String::setString(const StringBuilder & str)
|
||||
{
|
||||
if (str.str() == NULL) {
|
||||
data = NULL;
|
||||
if( str.str() == NULL ) {
|
||||
data = s_null.data;
|
||||
}
|
||||
else {
|
||||
allocString(str);
|
||||
addRef();
|
||||
}
|
||||
addRef();
|
||||
}
|
||||
|
@ -14,10 +14,10 @@ namespace nv
|
||||
|
||||
uint strHash(const char * str, uint h) NV_PURE;
|
||||
|
||||
/// String hash based on Bernstein's hash.
|
||||
/// String hash vased on Bernstein's hash.
|
||||
inline uint strHash(const char * data, uint h = 5381)
|
||||
{
|
||||
uint i = 0;
|
||||
uint i;
|
||||
while(data[i] != 0) {
|
||||
h = (33 * h) ^ uint(data[i]);
|
||||
i++;
|
||||
@ -47,6 +47,9 @@ namespace nv
|
||||
explicit StringBuilder( int size_hint );
|
||||
StringBuilder( const char * str );
|
||||
StringBuilder( const StringBuilder & );
|
||||
StringBuilder( int size_hint, const StringBuilder & );
|
||||
StringBuilder( const char * format, ... ) __attribute__((format (printf, 2, 3)));
|
||||
StringBuilder( int size_hint, const char * format, ... ) __attribute__((format (printf, 3, 4)));
|
||||
|
||||
~StringBuilder();
|
||||
|
||||
@ -119,14 +122,16 @@ namespace nv
|
||||
};
|
||||
|
||||
|
||||
/// Path string. @@ This should be called PathBuilder.
|
||||
/// Path string.
|
||||
class NVCORE_CLASS Path : public StringBuilder
|
||||
{
|
||||
public:
|
||||
Path() : StringBuilder() {}
|
||||
explicit Path(int size_hint) : StringBuilder(size_hint) {}
|
||||
Path(const char * str) : StringBuilder(str) {}
|
||||
Path(const Path & path) : StringBuilder(path) {}
|
||||
Path(const StringBuilder & str) : StringBuilder(str) {}
|
||||
Path(int size_hint, const StringBuilder & str) : StringBuilder(size_hint, str) {}
|
||||
Path(const char * format, ...) __attribute__((format (printf, 2, 3)));
|
||||
Path(int size_hint, const char * format, ...) __attribute__((format (printf, 3, 4)));
|
||||
|
||||
const char * fileName() const;
|
||||
const char * extension() const;
|
||||
@ -151,14 +156,15 @@ namespace nv
|
||||
/// Constructs a null string. @sa isNull()
|
||||
String()
|
||||
{
|
||||
data = NULL;
|
||||
data = s_null.data;
|
||||
addRef();
|
||||
}
|
||||
|
||||
/// Constructs a shared copy of str.
|
||||
String(const String & str)
|
||||
{
|
||||
data = str.data;
|
||||
if (data != NULL) addRef();
|
||||
addRef();
|
||||
}
|
||||
|
||||
/// Constructs a shared string from a standard string.
|
||||
@ -182,6 +188,7 @@ namespace nv
|
||||
/// Dtor.
|
||||
~String()
|
||||
{
|
||||
nvDebugCheck(data != NULL);
|
||||
release();
|
||||
}
|
||||
|
||||
@ -206,61 +213,52 @@ namespace nv
|
||||
/// Implement value semantics.
|
||||
String & operator=( const String & str )
|
||||
{
|
||||
if (str.data != data)
|
||||
{
|
||||
release();
|
||||
data = str.data;
|
||||
addRef();
|
||||
}
|
||||
release();
|
||||
data = str.data;
|
||||
addRef();
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Equal operator.
|
||||
bool operator==( const String & str ) const
|
||||
{
|
||||
nvDebugCheck(data != NULL);
|
||||
nvDebugCheck(str.data != NULL);
|
||||
if( str.data == data ) {
|
||||
return true;
|
||||
}
|
||||
if ((data == NULL) != (str.data == NULL)) {
|
||||
return false;
|
||||
}
|
||||
return strcmp(data, str.data) == 0;
|
||||
}
|
||||
|
||||
/// Equal operator.
|
||||
bool operator==( const char * str ) const
|
||||
{
|
||||
nvDebugCheck(data != NULL);
|
||||
nvCheck(str != NULL); // Use isNull!
|
||||
if (data == NULL) {
|
||||
return false;
|
||||
}
|
||||
return strcmp(data, str) == 0;
|
||||
}
|
||||
|
||||
/// Not equal operator.
|
||||
bool operator!=( const String & str ) const
|
||||
{
|
||||
nvDebugCheck(data != NULL);
|
||||
nvDebugCheck(str.data != NULL);
|
||||
if( str.data == data ) {
|
||||
return false;
|
||||
}
|
||||
if ((data == NULL) != (str.data == NULL)) {
|
||||
return true;
|
||||
}
|
||||
return strcmp(data, str.data) != 0;
|
||||
}
|
||||
|
||||
/// Not equal operator.
|
||||
bool operator!=( const char * str ) const
|
||||
{
|
||||
nvDebugCheck(data != NULL);
|
||||
nvCheck(str != NULL); // Use isNull!
|
||||
if (data == NULL) {
|
||||
return false;
|
||||
}
|
||||
return strcmp(data, str) != 0;
|
||||
}
|
||||
|
||||
/// Returns true if this string is the null string.
|
||||
bool isNull() const { return data == NULL; }
|
||||
bool isNull() const { nvDebugCheck(data != NULL); return data == s_null.data; }
|
||||
|
||||
/// Return the exact length.
|
||||
uint length() const { nvDebugCheck(data != NULL); return uint(strlen(data)); }
|
||||
@ -269,45 +267,44 @@ namespace nv
|
||||
uint hash() const { nvDebugCheck(data != NULL); return strHash(data); }
|
||||
|
||||
/// const char * cast operator.
|
||||
operator const char * () const { return data; }
|
||||
operator const char * () const { nvDebugCheck(data != NULL); return data; }
|
||||
|
||||
/// Get string pointer.
|
||||
const char * str() const { return data; }
|
||||
const char * str() const { nvDebugCheck(data != NULL); return data; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
enum null_t { null };
|
||||
|
||||
// Private constructor for null string.
|
||||
String(null_t) {
|
||||
setString("");
|
||||
}
|
||||
|
||||
// Add reference count.
|
||||
void addRef()
|
||||
{
|
||||
if (data != NULL)
|
||||
{
|
||||
setRefCount(getRefCount() + 1);
|
||||
}
|
||||
void addRef() {
|
||||
nvDebugCheck(data != NULL);
|
||||
setRefCount(getRefCount() + 1);
|
||||
}
|
||||
|
||||
// Decrease reference count.
|
||||
void release()
|
||||
{
|
||||
if (data != NULL)
|
||||
{
|
||||
const uint16 count = getRefCount();
|
||||
setRefCount(count - 1);
|
||||
if (count - 1 == 0) {
|
||||
free(data - 2);
|
||||
data = NULL;
|
||||
}
|
||||
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
|
||||
{
|
||||
nvDebugCheck(data != NULL);
|
||||
uint16 getRefCount() const {
|
||||
return *reinterpret_cast<const uint16 *>(data - 2);
|
||||
}
|
||||
|
||||
void setRefCount(uint16 count) {
|
||||
nvDebugCheck(data != NULL);
|
||||
nvCheck(count < 0xFFFF);
|
||||
*reinterpret_cast<uint16 *>(const_cast<char *>(data - 2)) = uint16(count);
|
||||
}
|
||||
@ -323,7 +320,7 @@ namespace nv
|
||||
|
||||
void allocString(const char * str, int len)
|
||||
{
|
||||
const char * ptr = static_cast<const char *>(::malloc(2 + len + 1));
|
||||
const char * ptr = static_cast<const char *>(mem::malloc(2 + len + 1));
|
||||
|
||||
setData( ptr );
|
||||
setRefCount( 0 );
|
||||
@ -346,6 +343,8 @@ namespace nv
|
||||
|
||||
private:
|
||||
|
||||
NVCORE_API static String s_null;
|
||||
|
||||
const char * data;
|
||||
|
||||
};
|
||||
|
@ -41,17 +41,17 @@ public:
|
||||
ByteOrder byteOrder() const { return m_byteOrder; }
|
||||
|
||||
|
||||
/// Serialize the given data.
|
||||
virtual uint serialize( void * data, uint len ) = 0;
|
||||
/// Serialize the given data. @@ Should return bytes serialized?
|
||||
virtual void serialize( void * data, int len ) = 0;
|
||||
|
||||
/// Move to the given position in the archive.
|
||||
virtual void seek( uint pos ) = 0;
|
||||
virtual void seek( int pos ) = 0;
|
||||
|
||||
/// Return the current position in the archive.
|
||||
virtual uint tell() const = 0;
|
||||
virtual int tell() const = 0;
|
||||
|
||||
/// Return the current size of the archive.
|
||||
virtual uint size() const = 0;
|
||||
virtual int size() const = 0;
|
||||
|
||||
/// Determine if there has been any error.
|
||||
virtual bool isError() const = 0;
|
||||
@ -136,13 +136,13 @@ public:
|
||||
protected:
|
||||
|
||||
/// Serialize in the stream byte order.
|
||||
Stream & byteOrderSerialize( void * v, uint len ) {
|
||||
Stream & byteOrderSerialize( void * v, int len ) {
|
||||
if( m_byteOrder == getSystemByteOrder() ) {
|
||||
serialize( v, len );
|
||||
}
|
||||
else {
|
||||
for( uint i = len; i > 0; i-- ) {
|
||||
serialize( (uint8 *)v + i - 1, 1 );
|
||||
for( int i=len-1; i>=0; i-- ) {
|
||||
serialize( (uint8 *)v + i, 1 );
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
|
@ -99,23 +99,6 @@
|
||||
#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:
|
||||
#define NV_VERSION_STRING \
|
||||
NV_OS_STRING "/" NV_CC_STRING "/" NV_CPU_STRING"/" \
|
||||
|
@ -53,7 +53,6 @@ ENDIF(OPENEXR_FOUND)
|
||||
ADD_DEFINITIONS(-DNVIMAGE_EXPORTS)
|
||||
|
||||
IF(NVIMAGE_SHARED)
|
||||
ADD_DEFINITIONS(-DNVIMAGE_SHARED=1)
|
||||
ADD_LIBRARY(nvimage SHARED ${IMAGE_SRCS})
|
||||
ELSE(NVIMAGE_SHARED)
|
||||
ADD_LIBRARY(nvimage ${IMAGE_SRCS})
|
||||
|
@ -113,12 +113,9 @@ void ColorBlock::splatY()
|
||||
/// Returns true if the block has a single color.
|
||||
bool ColorBlock::isSingleColor() const
|
||||
{
|
||||
Color32 mask(0xFF, 0xFF, 0xFF, 0x00);
|
||||
uint u = m_color[0].u & mask.u;
|
||||
|
||||
for (int i = 1; i < 16; i++)
|
||||
for(int i = 1; i < 16; i++)
|
||||
{
|
||||
if (u != (m_color[i].u & mask.u))
|
||||
if (m_color[0] != m_color[i])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -406,14 +406,10 @@ namespace nv
|
||||
s << pf.flags;
|
||||
s << pf.fourcc;
|
||||
s << pf.bitcount;
|
||||
s.serialize(&pf.rmask, sizeof(pf.rmask));
|
||||
s.serialize(&pf.gmask, sizeof(pf.gmask));
|
||||
s.serialize(&pf.bmask, sizeof(pf.bmask));
|
||||
s.serialize(&pf.amask, sizeof(pf.amask));
|
||||
// s << pf.rmask;
|
||||
// s << pf.gmask;
|
||||
// s << pf.bmask;
|
||||
// s << pf.amask;
|
||||
s << pf.rmask;
|
||||
s << pf.gmask;
|
||||
s << pf.bmask;
|
||||
s << pf.amask;
|
||||
return s;
|
||||
}
|
||||
|
||||
@ -449,9 +445,7 @@ namespace nv
|
||||
s << header.pitch;
|
||||
s << header.depth;
|
||||
s << header.mipmapcount;
|
||||
for (int i = 0; i < 11; i++) {
|
||||
s << header.reserved[i];
|
||||
}
|
||||
s.serialize(header.reserved, 11 * sizeof(uint));
|
||||
s << header.pf;
|
||||
s << header.caps;
|
||||
s << header.notused;
|
||||
@ -538,7 +532,7 @@ DDSHeader::DDSHeader()
|
||||
|
||||
// Store version information on the reserved header attributes.
|
||||
this->reserved[9] = MAKEFOURCC('N', 'V', 'T', 'T');
|
||||
this->reserved[10] = (2 << 16) | (0 << 8) | (8); // major.minor.revision
|
||||
this->reserved[10] = (2 << 16) | (0 << 8) | (3); // major.minor.revision
|
||||
|
||||
this->pf.size = 32;
|
||||
this->pf.flags = 0;
|
||||
@ -575,8 +569,8 @@ void DDSHeader::setHeight(uint h)
|
||||
|
||||
void DDSHeader::setDepth(uint d)
|
||||
{
|
||||
this->flags |= DDSD_DEPTH;
|
||||
this->depth = d;
|
||||
this->flags |= DDSD_DEPTH;
|
||||
this->height = d;
|
||||
}
|
||||
|
||||
void DDSHeader::setMipmapCount(uint count)
|
||||
@ -604,16 +598,14 @@ void DDSHeader::setMipmapCount(uint count)
|
||||
|
||||
void DDSHeader::setTexture2D()
|
||||
{
|
||||
this->header10.resourceDimension = D3D10_RESOURCE_DIMENSION_TEXTURE2D;
|
||||
this->header10.arraySize = 1;
|
||||
this->header10.resourceDimension = D3D10_RESOURCE_DIMENSION_TEXTURE2D;
|
||||
}
|
||||
|
||||
void DDSHeader::setTexture3D()
|
||||
{
|
||||
this->caps.caps2 = DDSCAPS2_VOLUME;
|
||||
this->caps.caps2 = DDSCAPS2_VOLUME;
|
||||
|
||||
this->header10.resourceDimension = D3D10_RESOURCE_DIMENSION_TEXTURE3D;
|
||||
this->header10.arraySize = 1;
|
||||
this->header10.resourceDimension = D3D10_RESOURCE_DIMENSION_TEXTURE3D;
|
||||
}
|
||||
|
||||
void DDSHeader::setTextureCube()
|
||||
@ -670,25 +662,11 @@ void DDSHeader::setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask
|
||||
nvCheck((gmask & amask) == 0);
|
||||
nvCheck((bmask & amask) == 0);
|
||||
|
||||
if (rmask != 0 || gmask != 0 || bmask != 0)
|
||||
{
|
||||
if (gmask == 0 && bmask == 0)
|
||||
{
|
||||
this->pf.flags = DDPF_LUMINANCE;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->pf.flags = DDPF_RGB;
|
||||
}
|
||||
this->pf.flags = DDPF_RGB;
|
||||
|
||||
if (amask != 0) {
|
||||
this->pf.flags |= DDPF_ALPHAPIXELS;
|
||||
}
|
||||
}
|
||||
else if (amask != 0)
|
||||
{
|
||||
this->pf.flags |= DDPF_ALPHA;
|
||||
}
|
||||
if (amask != 0) {
|
||||
this->pf.flags |= DDPF_ALPHAPIXELS;
|
||||
}
|
||||
|
||||
if (bitcount == 0)
|
||||
{
|
||||
@ -838,9 +816,9 @@ bool DirectDrawSurface::isSupported() const
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ((header.pf.flags & DDPF_RGB) || (header.pf.flags & DDPF_LUMINANCE))
|
||||
else if (header.pf.flags & DDPF_RGB)
|
||||
{
|
||||
// All RGB and luminance formats are supported now.
|
||||
// All RGB formats are supported now.
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -959,7 +937,7 @@ void DirectDrawSurface::mipmap(Image * img, uint face, uint mipmap)
|
||||
|
||||
img->allocate(w, h);
|
||||
|
||||
if ((header.pf.flags & DDPF_RGB) || (header.pf.flags & DDPF_LUMINANCE))
|
||||
if (header.pf.flags & DDPF_RGB)
|
||||
{
|
||||
readLinearImage(img);
|
||||
}
|
||||
@ -1011,10 +989,10 @@ void DirectDrawSurface::readLinearImage(Image * img)
|
||||
stream->serialize(&c, byteCount);
|
||||
|
||||
Color32 pixel(0, 0, 0, 0xFF);
|
||||
pixel.r = PixelFormat::convert((c & header.pf.rmask) >> rshift, rsize, 8);
|
||||
pixel.g = PixelFormat::convert((c & header.pf.gmask) >> gshift, gsize, 8);
|
||||
pixel.b = PixelFormat::convert((c & header.pf.bmask) >> bshift, bsize, 8);
|
||||
pixel.a = PixelFormat::convert((c & header.pf.amask) >> ashift, asize, 8);
|
||||
pixel.r = PixelFormat::convert(c >> rshift, rsize, 8);
|
||||
pixel.g = PixelFormat::convert(c >> gshift, gsize, 8);
|
||||
pixel.b = PixelFormat::convert(c >> bshift, bsize, 8);
|
||||
pixel.a = PixelFormat::convert(c >> ashift, asize, 8);
|
||||
|
||||
img->pixel(x, y) = pixel;
|
||||
}
|
||||
@ -1194,11 +1172,15 @@ uint DirectDrawSurface::mipmapSize(uint mipmap) const
|
||||
}
|
||||
else
|
||||
{
|
||||
nvDebugCheck((header.pf.flags & DDPF_RGB) || (header.pf.flags & DDPF_LUMINANCE));
|
||||
nvDebugCheck(header.pf.flags & DDPF_RGB);
|
||||
|
||||
uint pitch = computePitch(w, header.pf.bitcount, 8); // Asuming 8 bit alignment, which is the same D3DX expects.
|
||||
// Align pixels to bytes.
|
||||
uint byteCount = (header.pf.bitcount + 7) / 8;
|
||||
|
||||
return pitch * h * d;
|
||||
// Align pitch to 4 bytes.
|
||||
uint pitch = 4 * ((w * byteCount + 3) / 4);
|
||||
|
||||
return pitch * h * d;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1260,7 +1242,6 @@ void DirectDrawSurface::printInfo() const
|
||||
printf("Pixel Format:\n");
|
||||
printf("\tFlags: 0x%.8X\n", header.pf.flags);
|
||||
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_ALPHAPIXELS) printf("\t\tDDPF_ALPHAPIXELS\n");
|
||||
if (header.pf.flags & DDPF_ALPHA) printf("\t\tDDPF_ALPHA\n");
|
||||
|
@ -33,10 +33,11 @@
|
||||
* http://www.dspguide.com/ch16.htm
|
||||
*/
|
||||
|
||||
#include "Filter.h"
|
||||
|
||||
#include <nvmath/Vector.h> // Vector4
|
||||
#include <nvcore/Containers.h> // swap
|
||||
#include <nvmath/nvmath.h> // fabs
|
||||
#include <nvmath/Vector.h> // Vector4
|
||||
#include <nvimage/Filter.h>
|
||||
|
||||
using namespace nv;
|
||||
|
||||
@ -243,7 +244,7 @@ SincFilter::SincFilter(float w) : Filter(w) {}
|
||||
|
||||
float SincFilter::evaluate(float x) const
|
||||
{
|
||||
return sincf(PI * x);
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
@ -503,7 +504,7 @@ void Kernel2::initBlendedSobel(const Vector4 & scale)
|
||||
|
||||
for (int i = 0; i < 7; i++) {
|
||||
for (int e = 0; e < 7; e++) {
|
||||
m_data[(i + 1) * 9 + e + 1] += elements[i * 7 + e] * scale.z();
|
||||
m_data[i * 9 + e + 1] += elements[i * 7 + e] * scale.z();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -518,7 +519,7 @@ void Kernel2::initBlendedSobel(const Vector4 & scale)
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
for (int e = 0; e < 5; e++) {
|
||||
m_data[(i + 2) * 9 + e + 2] += elements[i * 5 + e] * scale.y();
|
||||
m_data[i * 9 + e + 2] += elements[i * 5 + e] * scale.y();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -531,7 +532,7 @@ void Kernel2::initBlendedSobel(const Vector4 & scale)
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int e = 0; e < 3; e++) {
|
||||
m_data[(i + 3) * 9 + e + 3] += elements[i * 3 + e] * scale.x();
|
||||
m_data[i * 9 + e + 3] += elements[i * 3 + e] * scale.x();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -540,17 +541,12 @@ void Kernel2::initBlendedSobel(const Vector4 & scale)
|
||||
|
||||
PolyphaseKernel::PolyphaseKernel(const Filter & f, uint srcLength, uint dstLength, int samples/*= 32*/)
|
||||
{
|
||||
nvCheck(srcLength >= dstLength); // @@ Upsampling not implemented!
|
||||
nvDebugCheck(samples > 0);
|
||||
|
||||
float scale = float(dstLength) / float(srcLength);
|
||||
const float scale = float(dstLength) / float(srcLength);
|
||||
const float iscale = 1.0f / scale;
|
||||
|
||||
if (scale > 1) {
|
||||
// Upsampling.
|
||||
samples = 1;
|
||||
scale = 1;
|
||||
}
|
||||
|
||||
m_length = dstLength;
|
||||
m_width = f.width() * iscale;
|
||||
m_windowSize = (int)ceilf(m_width * 2) + 1;
|
||||
|
@ -11,16 +11,16 @@ namespace nv
|
||||
class Vector4;
|
||||
|
||||
/// Base filter class.
|
||||
class NVIMAGE_CLASS Filter
|
||||
class Filter
|
||||
{
|
||||
public:
|
||||
Filter(float width);
|
||||
virtual ~Filter();
|
||||
NVIMAGE_API Filter(float width);
|
||||
NVIMAGE_API virtual ~Filter();
|
||||
|
||||
float width() const { return m_width; }
|
||||
float sampleDelta(float x, float scale) const;
|
||||
float sampleBox(float x, float scale, int samples) const;
|
||||
float sampleTriangle(float x, float scale, int samples) const;
|
||||
NVIMAGE_API float width() const { return m_width; }
|
||||
NVIMAGE_API float sampleDelta(float x, float scale) const;
|
||||
NVIMAGE_API float sampleBox(float x, float scale, int samples) const;
|
||||
NVIMAGE_API float sampleTriangle(float x, float scale, int samples) const;
|
||||
|
||||
virtual float evaluate(float x) const = 0;
|
||||
|
||||
@ -29,56 +29,56 @@ namespace nv
|
||||
};
|
||||
|
||||
// Box filter.
|
||||
class NVIMAGE_CLASS BoxFilter : public Filter
|
||||
class BoxFilter : public Filter
|
||||
{
|
||||
public:
|
||||
BoxFilter();
|
||||
BoxFilter(float width);
|
||||
virtual float evaluate(float x) const;
|
||||
NVIMAGE_API BoxFilter();
|
||||
NVIMAGE_API BoxFilter(float width);
|
||||
NVIMAGE_API virtual float evaluate(float x) const;
|
||||
};
|
||||
|
||||
// Triangle (bilinear/tent) filter.
|
||||
class NVIMAGE_CLASS TriangleFilter : public Filter
|
||||
class TriangleFilter : public Filter
|
||||
{
|
||||
public:
|
||||
TriangleFilter();
|
||||
TriangleFilter(float width);
|
||||
virtual float evaluate(float x) const;
|
||||
NVIMAGE_API TriangleFilter();
|
||||
NVIMAGE_API TriangleFilter(float width);
|
||||
NVIMAGE_API virtual float evaluate(float x) const;
|
||||
};
|
||||
|
||||
// Quadratic (bell) filter.
|
||||
class NVIMAGE_CLASS QuadraticFilter : public Filter
|
||||
class QuadraticFilter : public Filter
|
||||
{
|
||||
public:
|
||||
QuadraticFilter();
|
||||
virtual float evaluate(float x) const;
|
||||
NVIMAGE_API QuadraticFilter();
|
||||
NVIMAGE_API virtual float evaluate(float x) const;
|
||||
};
|
||||
|
||||
// Cubic filter from Thatcher Ulrich.
|
||||
class NVIMAGE_CLASS CubicFilter : public Filter
|
||||
class CubicFilter : public Filter
|
||||
{
|
||||
public:
|
||||
CubicFilter();
|
||||
virtual float evaluate(float x) const;
|
||||
NVIMAGE_API CubicFilter();
|
||||
NVIMAGE_API virtual float evaluate(float x) const;
|
||||
};
|
||||
|
||||
// Cubic b-spline filter from Paul Heckbert.
|
||||
class NVIMAGE_CLASS BSplineFilter : public Filter
|
||||
class BSplineFilter : public Filter
|
||||
{
|
||||
public:
|
||||
BSplineFilter();
|
||||
virtual float evaluate(float x) const;
|
||||
NVIMAGE_API BSplineFilter();
|
||||
NVIMAGE_API virtual float evaluate(float x) const;
|
||||
};
|
||||
|
||||
/// Mitchell & Netravali's two-param cubic
|
||||
/// @see "Reconstruction Filters in Computer Graphics", SIGGRAPH 88
|
||||
class NVIMAGE_CLASS MitchellFilter : public Filter
|
||||
class MitchellFilter : public Filter
|
||||
{
|
||||
public:
|
||||
MitchellFilter();
|
||||
virtual float evaluate(float x) const;
|
||||
NVIMAGE_API MitchellFilter();
|
||||
NVIMAGE_API virtual float evaluate(float x) const;
|
||||
|
||||
void setParameters(float b, float c);
|
||||
NVIMAGE_API void setParameters(float a, float b);
|
||||
|
||||
private:
|
||||
float p0, p2, p3;
|
||||
@ -86,29 +86,29 @@ namespace nv
|
||||
};
|
||||
|
||||
// Lanczos3 filter.
|
||||
class NVIMAGE_CLASS LanczosFilter : public Filter
|
||||
class LanczosFilter : public Filter
|
||||
{
|
||||
public:
|
||||
LanczosFilter();
|
||||
virtual float evaluate(float x) const;
|
||||
NVIMAGE_API LanczosFilter();
|
||||
NVIMAGE_API virtual float evaluate(float x) const;
|
||||
};
|
||||
|
||||
// Sinc filter.
|
||||
class NVIMAGE_CLASS SincFilter : public Filter
|
||||
class SincFilter : public Filter
|
||||
{
|
||||
public:
|
||||
SincFilter(float w);
|
||||
virtual float evaluate(float x) const;
|
||||
NVIMAGE_API SincFilter(float w);
|
||||
NVIMAGE_API virtual float evaluate(float x) const;
|
||||
};
|
||||
|
||||
// Kaiser filter.
|
||||
class NVIMAGE_CLASS KaiserFilter : public Filter
|
||||
class KaiserFilter : public Filter
|
||||
{
|
||||
public:
|
||||
KaiserFilter(float w);
|
||||
virtual float evaluate(float x) const;
|
||||
NVIMAGE_API KaiserFilter(float w);
|
||||
NVIMAGE_API virtual float evaluate(float x) const;
|
||||
|
||||
void setParameters(float a, float stretch);
|
||||
NVIMAGE_API void setParameters(float a, float stretch);
|
||||
|
||||
private:
|
||||
float alpha;
|
||||
@ -118,12 +118,12 @@ namespace nv
|
||||
|
||||
|
||||
/// A 1D kernel. Used to precompute filter weights.
|
||||
class NVIMAGE_CLASS Kernel1
|
||||
class Kernel1
|
||||
{
|
||||
NV_FORBID_COPY(Kernel1);
|
||||
public:
|
||||
Kernel1(const Filter & f, int iscale, int samples = 32);
|
||||
~Kernel1();
|
||||
NVIMAGE_API Kernel1(const Filter & f, int iscale, int samples = 32);
|
||||
NVIMAGE_API ~Kernel1();
|
||||
|
||||
float valueAt(uint x) const {
|
||||
nvDebugCheck(x < (uint)m_windowSize);
|
||||
@ -138,7 +138,7 @@ namespace nv
|
||||
return m_width;
|
||||
}
|
||||
|
||||
void debugPrint();
|
||||
NVIMAGE_API void debugPrint();
|
||||
|
||||
private:
|
||||
int m_windowSize;
|
||||
@ -148,15 +148,15 @@ namespace nv
|
||||
|
||||
|
||||
/// A 2D kernel.
|
||||
class NVIMAGE_CLASS Kernel2
|
||||
class Kernel2
|
||||
{
|
||||
public:
|
||||
Kernel2(uint width);
|
||||
Kernel2(const Kernel2 & k);
|
||||
~Kernel2();
|
||||
NVIMAGE_API Kernel2(uint width);
|
||||
NVIMAGE_API Kernel2(const Kernel2 & k);
|
||||
NVIMAGE_API ~Kernel2();
|
||||
|
||||
void normalize();
|
||||
void transpose();
|
||||
NVIMAGE_API void normalize();
|
||||
NVIMAGE_API void transpose();
|
||||
|
||||
float valueAt(uint x, uint y) const {
|
||||
return m_data[y * m_windowSize + x];
|
||||
@ -166,12 +166,12 @@ namespace nv
|
||||
return m_windowSize;
|
||||
}
|
||||
|
||||
void initLaplacian();
|
||||
void initEdgeDetection();
|
||||
void initSobel();
|
||||
void initPrewitt();
|
||||
NVIMAGE_API void initLaplacian();
|
||||
NVIMAGE_API void initEdgeDetection();
|
||||
NVIMAGE_API void initSobel();
|
||||
NVIMAGE_API void initPrewitt();
|
||||
|
||||
void initBlendedSobel(const Vector4 & scale);
|
||||
NVIMAGE_API void initBlendedSobel(const Vector4 & scale);
|
||||
|
||||
private:
|
||||
const uint m_windowSize;
|
||||
@ -180,12 +180,12 @@ namespace nv
|
||||
|
||||
|
||||
/// A 1D polyphase kernel
|
||||
class NVIMAGE_CLASS PolyphaseKernel
|
||||
class PolyphaseKernel
|
||||
{
|
||||
NV_FORBID_COPY(PolyphaseKernel);
|
||||
public:
|
||||
PolyphaseKernel(const Filter & f, uint srcLength, uint dstLength, int samples = 32);
|
||||
~PolyphaseKernel();
|
||||
NVIMAGE_API PolyphaseKernel(const Filter & f, uint srcLength, uint dstLength, int samples = 32);
|
||||
NVIMAGE_API ~PolyphaseKernel();
|
||||
|
||||
int windowSize() const {
|
||||
return m_windowSize;
|
||||
@ -205,7 +205,7 @@ namespace nv
|
||||
return m_data[column * m_windowSize + x];
|
||||
}
|
||||
|
||||
void debugPrint() const;
|
||||
NVIMAGE_API void debugPrint() const;
|
||||
|
||||
private:
|
||||
int m_windowSize;
|
||||
|
@ -1,18 +1,16 @@
|
||||
// This code is in the public domain -- castanyo@yahoo.es
|
||||
|
||||
#include <nvcore/Containers.h>
|
||||
#include <nvcore/Ptr.h>
|
||||
|
||||
#include <nvmath/Color.h>
|
||||
|
||||
#include "FloatImage.h"
|
||||
#include "Filter.h"
|
||||
#include "Image.h"
|
||||
|
||||
#include <nvmath/Color.h>
|
||||
#include <nvmath/Matrix.h>
|
||||
|
||||
#include <nvcore/Containers.h>
|
||||
#include <nvcore/Ptr.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
||||
using namespace nv;
|
||||
|
||||
namespace
|
||||
@ -32,17 +30,14 @@ namespace
|
||||
return f - floor(f);
|
||||
}
|
||||
|
||||
static int mirror(int x, int w)
|
||||
{
|
||||
if (w == 1) return 0;
|
||||
|
||||
x = abs(x);
|
||||
while (x >= w) {
|
||||
x = abs(w + w - x - 2);
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
static int mirror(int x, int w)
|
||||
{
|
||||
x = abs(x);
|
||||
while (x >= w) {
|
||||
x = 2 * w - x - 2;
|
||||
}
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -145,19 +140,19 @@ Image * FloatImage::createImageGammaCorrect(float gamma/*= 2.2f*/) const
|
||||
/// Allocate a 2d float image of the given format and the given extents.
|
||||
void FloatImage::allocate(uint c, uint w, uint h)
|
||||
{
|
||||
free();
|
||||
|
||||
nvCheck(m_mem == NULL);
|
||||
m_width = w;
|
||||
m_height = h;
|
||||
m_componentNum = c;
|
||||
m_count = w * h * c;
|
||||
m_mem = reinterpret_cast<float *>(::malloc(m_count * sizeof(float)));
|
||||
m_mem = reinterpret_cast<float *>(nv::mem::malloc(m_count * sizeof(float)));
|
||||
}
|
||||
|
||||
/// Free the image, but don't clear the members.
|
||||
void FloatImage::free()
|
||||
{
|
||||
::free( reinterpret_cast<void *>(m_mem) );
|
||||
nvCheck(m_mem != NULL);
|
||||
nv::mem::free( reinterpret_cast<void *>(m_mem) );
|
||||
m_mem = NULL;
|
||||
}
|
||||
|
||||
@ -467,8 +462,8 @@ FloatImage * FloatImage::fastDownSample() const
|
||||
|
||||
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 += 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[2 * 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 += v2 * (w0 * src[2 * m_width + 2 * x] + w1 * src[2 * m_width + 2 * x + 1] + w2 * src[0 * m_width + 2 * x + 2]);
|
||||
|
||||
*dst = f * scale;
|
||||
dst++;
|
||||
@ -545,27 +540,73 @@ FloatImage * FloatImage::fastDownSample() const
|
||||
return dst_image.release();
|
||||
}
|
||||
|
||||
/*
|
||||
/// Downsample applying a 1D kernel separately in each dimension.
|
||||
FloatImage * FloatImage::downSample(const Kernel1 & kernel, WrapMode wm) const
|
||||
{
|
||||
const uint w = max(1, m_width / 2);
|
||||
const uint h = max(1, m_height / 2);
|
||||
|
||||
return downSample(kernel, w, h, wm);
|
||||
}
|
||||
|
||||
|
||||
/// Downsample applying a 1D kernel separately in each dimension.
|
||||
FloatImage * FloatImage::downSample(const Kernel1 & kernel, uint w, uint h, WrapMode wm) const
|
||||
{
|
||||
nvCheck(!(kernel.windowSize() & 1)); // Make sure that kernel m_width is even.
|
||||
|
||||
AutoPtr<FloatImage> tmp_image( new FloatImage() );
|
||||
tmp_image->allocate(m_componentNum, w, m_height);
|
||||
|
||||
AutoPtr<FloatImage> dst_image( new FloatImage() );
|
||||
dst_image->allocate(m_componentNum, w, h);
|
||||
|
||||
const float xscale = float(m_width) / float(w);
|
||||
const float yscale = float(m_height) / float(h);
|
||||
|
||||
for(uint c = 0; c < m_componentNum; c++) {
|
||||
float * tmp_channel = tmp_image->channel(c);
|
||||
|
||||
for(uint y = 0; y < m_height; y++) {
|
||||
for(uint x = 0; x < w; x++) {
|
||||
|
||||
float sum = this->applyKernelHorizontal(&kernel, uint(x*xscale), y, c, wm);
|
||||
|
||||
const uint tmp_index = tmp_image->index(x, y);
|
||||
tmp_channel[tmp_index] = sum;
|
||||
}
|
||||
}
|
||||
|
||||
float * dst_channel = dst_image->channel(c);
|
||||
|
||||
for(uint y = 0; y < h; y++) {
|
||||
for(uint x = 0; x < w; x++) {
|
||||
|
||||
float sum = tmp_image->applyKernelVertical(&kernel, uint(x*xscale), uint(y*yscale), c, wm);
|
||||
|
||||
const uint dst_index = dst_image->index(x, y);
|
||||
dst_channel[dst_index] = sum;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return dst_image.release();
|
||||
}
|
||||
*/
|
||||
|
||||
/// Downsample applying a 1D kernel separately in each dimension.
|
||||
FloatImage * FloatImage::downSample(const Filter & filter, WrapMode wm) const
|
||||
{
|
||||
const uint w = max(1, m_width / 2);
|
||||
const uint h = max(1, m_height / 2);
|
||||
|
||||
return resize(filter, w, h, wm);
|
||||
}
|
||||
|
||||
/// Downsample applying a 1D kernel separately in each dimension.
|
||||
FloatImage * FloatImage::downSample(const Filter & filter, WrapMode wm, uint alpha) const
|
||||
{
|
||||
const uint w = max(1, m_width / 2);
|
||||
const uint h = max(1, m_height / 2);
|
||||
|
||||
return resize(filter, w, h, wm, alpha);
|
||||
return downSample(filter, w, h, wm);
|
||||
}
|
||||
|
||||
|
||||
/// Downsample applying a 1D kernel separately in each dimension.
|
||||
FloatImage * FloatImage::resize(const Filter & filter, uint w, uint h, WrapMode wm) const
|
||||
FloatImage * FloatImage::downSample(const Filter & filter, uint w, uint h, WrapMode wm) const
|
||||
{
|
||||
// @@ Use monophase filters when frac(m_width / w) == 0
|
||||
|
||||
@ -634,56 +675,10 @@ FloatImage * FloatImage::resize(const Filter & filter, uint w, uint h, WrapMode
|
||||
return dst_image.release();
|
||||
}
|
||||
|
||||
/// Downsample applying a 1D kernel separately in each dimension.
|
||||
FloatImage * FloatImage::resize(const Filter & filter, uint w, uint h, WrapMode wm, uint alpha) const
|
||||
{
|
||||
nvCheck(alpha < m_componentNum);
|
||||
|
||||
AutoPtr<FloatImage> tmp_image( new FloatImage() );
|
||||
AutoPtr<FloatImage> dst_image( new FloatImage() );
|
||||
|
||||
PolyphaseKernel xkernel(filter, m_width, w, 32);
|
||||
PolyphaseKernel ykernel(filter, m_height, h, 32);
|
||||
|
||||
{
|
||||
tmp_image->allocate(m_componentNum, w, m_height);
|
||||
dst_image->allocate(m_componentNum, w, h);
|
||||
|
||||
Array<float> tmp_column(h);
|
||||
tmp_column.resize(h);
|
||||
|
||||
for (uint c = 0; c < m_componentNum; c++)
|
||||
{
|
||||
float * tmp_channel = tmp_image->channel(c);
|
||||
|
||||
for (uint y = 0; y < m_height; y++) {
|
||||
this->applyKernelHorizontal(xkernel, y, c, alpha, wm, tmp_channel + y * w);
|
||||
}
|
||||
}
|
||||
|
||||
// Process all channels before applying vertical kernel to make sure alpha has been computed.
|
||||
|
||||
for (uint c = 0; c < m_componentNum; c++)
|
||||
{
|
||||
float * dst_channel = dst_image->channel(c);
|
||||
|
||||
for (uint x = 0; x < w; x++) {
|
||||
tmp_image->applyKernelVertical(ykernel, x, c, alpha, wm, tmp_column.unsecureBuffer());
|
||||
|
||||
for (uint y = 0; y < h; y++) {
|
||||
dst_channel[y * w + x] = tmp_column[y];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return dst_image.release();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// Apply 2D kernel at the given coordinates and return result.
|
||||
float FloatImage::applyKernel(const Kernel2 * k, int x, int y, uint c, WrapMode wm) const
|
||||
float FloatImage::applyKernel(const Kernel2 * k, int x, int y, int c, WrapMode wm) const
|
||||
{
|
||||
nvDebugCheck(k != NULL);
|
||||
|
||||
@ -712,7 +707,7 @@ float FloatImage::applyKernel(const Kernel2 * k, int x, int y, uint c, WrapMode
|
||||
|
||||
|
||||
/// Apply 1D vertical kernel at the given coordinates and return result.
|
||||
float FloatImage::applyKernelVertical(const Kernel1 * k, int x, int y, uint c, WrapMode wm) const
|
||||
float FloatImage::applyKernelVertical(const Kernel1 * k, int x, int y, int c, WrapMode wm) const
|
||||
{
|
||||
nvDebugCheck(k != NULL);
|
||||
|
||||
@ -734,7 +729,7 @@ float FloatImage::applyKernelVertical(const Kernel1 * k, int x, int y, uint c, W
|
||||
}
|
||||
|
||||
/// Apply 1D horizontal kernel at the given coordinates and return result.
|
||||
float FloatImage::applyKernelHorizontal(const Kernel1 * k, int x, int y, uint c, WrapMode wm) const
|
||||
float FloatImage::applyKernelHorizontal(const Kernel1 * k, int x, int y, int c, WrapMode wm) const
|
||||
{
|
||||
nvDebugCheck(k != NULL);
|
||||
|
||||
@ -757,7 +752,7 @@ float FloatImage::applyKernelHorizontal(const Kernel1 * k, int x, int y, uint c,
|
||||
|
||||
|
||||
/// Apply 1D vertical kernel at the given coordinates and return result.
|
||||
void FloatImage::applyKernelVertical(const PolyphaseKernel & k, int x, uint c, WrapMode wm, float * __restrict output) const
|
||||
void FloatImage::applyKernelVertical(const PolyphaseKernel & k, int x, int c, WrapMode wm, float * output) const
|
||||
{
|
||||
const uint length = k.length();
|
||||
const float scale = float(length) / float(m_height);
|
||||
@ -789,7 +784,7 @@ void FloatImage::applyKernelVertical(const PolyphaseKernel & k, int x, uint c, W
|
||||
}
|
||||
|
||||
/// Apply 1D horizontal kernel at the given coordinates and return result.
|
||||
void FloatImage::applyKernelHorizontal(const PolyphaseKernel & k, int y, uint c, WrapMode wm, float * __restrict output) const
|
||||
void FloatImage::applyKernelHorizontal(const PolyphaseKernel & k, int y, int c, WrapMode wm, float * output) const
|
||||
{
|
||||
const uint length = k.length();
|
||||
const float scale = float(length) / float(m_width);
|
||||
@ -820,93 +815,3 @@ void FloatImage::applyKernelHorizontal(const PolyphaseKernel & k, int y, uint c,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Apply 1D vertical kernel at the given coordinates and return result.
|
||||
void FloatImage::applyKernelVertical(const PolyphaseKernel & k, int x, uint c, uint a, WrapMode wm, float * __restrict output) const
|
||||
{
|
||||
const uint length = k.length();
|
||||
const float scale = float(length) / float(m_height);
|
||||
const float iscale = 1.0f / scale;
|
||||
|
||||
const float width = k.width();
|
||||
const int windowSize = k.windowSize();
|
||||
|
||||
const float * channel = this->channel(c);
|
||||
const float * alpha = this->channel(a);
|
||||
|
||||
for (uint i = 0; i < length; i++)
|
||||
{
|
||||
const float center = (0.5f + i) * iscale;
|
||||
|
||||
const int left = (int)floorf(center - width);
|
||||
const int right = (int)ceilf(center + width);
|
||||
nvCheck(right - left <= windowSize);
|
||||
|
||||
float norm = 0;
|
||||
float sum = 0;
|
||||
for (int j = 0; j < windowSize; ++j)
|
||||
{
|
||||
const int idx = this->index(x, j+left, wm);
|
||||
|
||||
float w = k.valueAt(i, j) * (alpha[idx] + (1.0f / 256.0f));
|
||||
norm += w;
|
||||
sum += w * channel[idx];
|
||||
}
|
||||
|
||||
output[i] = sum / norm;
|
||||
}
|
||||
}
|
||||
|
||||
/// Apply 1D horizontal kernel at the given coordinates and return result.
|
||||
void FloatImage::applyKernelHorizontal(const PolyphaseKernel & k, int y, uint c, uint a, WrapMode wm, float * __restrict output) const
|
||||
{
|
||||
const uint length = k.length();
|
||||
const float scale = float(length) / float(m_width);
|
||||
const float iscale = 1.0f / scale;
|
||||
|
||||
const float width = k.width();
|
||||
const int windowSize = k.windowSize();
|
||||
|
||||
const float * channel = this->channel(c);
|
||||
const float * alpha = this->channel(a);
|
||||
|
||||
for (uint i = 0; i < length; i++)
|
||||
{
|
||||
const float center = (0.5f + i) * iscale;
|
||||
|
||||
const int left = (int)floorf(center - width);
|
||||
const int right = (int)ceilf(center + width);
|
||||
nvDebugCheck(right - left <= windowSize);
|
||||
|
||||
float norm = 0.0f;
|
||||
float sum = 0;
|
||||
for (int j = 0; j < windowSize; ++j)
|
||||
{
|
||||
const int idx = this->index(left + j, y, wm);
|
||||
|
||||
float w = k.valueAt(i, j) * (alpha[idx] + (1.0f / 256.0f));
|
||||
norm += w;
|
||||
sum += w * channel[idx];
|
||||
}
|
||||
|
||||
output[i] = sum / norm;
|
||||
}
|
||||
}
|
||||
|
||||
FloatImage* FloatImage::clone() const
|
||||
{
|
||||
FloatImage* copy = new FloatImage();
|
||||
copy->m_width = m_width;
|
||||
copy->m_height = m_height;
|
||||
copy->m_componentNum = m_componentNum;
|
||||
copy->m_count = m_count;
|
||||
|
||||
if(m_mem)
|
||||
{
|
||||
copy->allocate(m_componentNum, m_width, m_height);
|
||||
memcpy(copy->m_mem, m_mem, m_count * sizeof(float));
|
||||
}
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
@ -3,20 +3,12 @@
|
||||
#ifndef NV_IMAGE_FLOATIMAGE_H
|
||||
#define NV_IMAGE_FLOATIMAGE_H
|
||||
|
||||
#include <nvimage/nvimage.h>
|
||||
|
||||
#include <nvmath/Vector.h>
|
||||
|
||||
#include <nvcore/Debug.h>
|
||||
#include <nvcore/Containers.h> // clamp
|
||||
|
||||
#include <stdlib.h> // abs
|
||||
|
||||
#include <nvimage/nvimage.h>
|
||||
|
||||
namespace nv
|
||||
{
|
||||
class Vector4;
|
||||
class Matrix;
|
||||
class Image;
|
||||
class Filter;
|
||||
class Kernel1;
|
||||
@ -71,19 +63,17 @@ public:
|
||||
|
||||
NVIMAGE_API FloatImage * fastDownSample() const;
|
||||
NVIMAGE_API FloatImage * downSample(const Filter & filter, WrapMode wm) const;
|
||||
NVIMAGE_API FloatImage * downSample(const Filter & filter, WrapMode wm, uint alpha) const;
|
||||
NVIMAGE_API FloatImage * resize(const Filter & filter, uint w, uint h, WrapMode wm) const;
|
||||
NVIMAGE_API FloatImage * downSample(const Filter & filter, uint w, uint h, WrapMode wm) const;
|
||||
|
||||
NVIMAGE_API FloatImage * resize(const Filter & filter, uint w, uint h, WrapMode wm, uint alpha) const;
|
||||
//NVIMAGE_API FloatImage * downSample(const Kernel1 & filter, WrapMode wm) const;
|
||||
//NVIMAGE_API FloatImage * downSample(const Kernel1 & filter, uint w, uint h, WrapMode wm) const;
|
||||
//@}
|
||||
|
||||
NVIMAGE_API float applyKernel(const Kernel2 * k, int x, int y, uint c, WrapMode wm) const;
|
||||
NVIMAGE_API float applyKernelVertical(const Kernel1 * k, int x, int y, uint c, WrapMode wm) const;
|
||||
NVIMAGE_API float applyKernelHorizontal(const Kernel1 * k, int x, int y, uint c, WrapMode wm) const;
|
||||
NVIMAGE_API void applyKernelVertical(const PolyphaseKernel & k, int x, uint c, WrapMode wm, float * output) const;
|
||||
NVIMAGE_API void applyKernelHorizontal(const PolyphaseKernel & k, int y, uint c, WrapMode wm, float * output) const;
|
||||
NVIMAGE_API void applyKernelVertical(const PolyphaseKernel & k, int x, uint c, uint a, WrapMode wm, float * output) const;
|
||||
NVIMAGE_API void applyKernelHorizontal(const PolyphaseKernel & k, int y, uint c, uint a, WrapMode wm, float * output) const;
|
||||
NVIMAGE_API float applyKernel(const Kernel2 * k, int x, int y, int c, WrapMode wm) const;
|
||||
NVIMAGE_API float applyKernelVertical(const Kernel1 * k, int x, int y, int c, WrapMode wm) const;
|
||||
NVIMAGE_API float applyKernelHorizontal(const Kernel1 * k, int x, int y, int c, WrapMode wm) const;
|
||||
NVIMAGE_API void applyKernelVertical(const PolyphaseKernel & k, int x, int c, WrapMode wm, float * output) const;
|
||||
NVIMAGE_API void applyKernelHorizontal(const PolyphaseKernel & k, int y, int c, WrapMode wm, float * output) const;
|
||||
|
||||
|
||||
uint width() const { return m_width; }
|
||||
@ -119,9 +109,6 @@ public:
|
||||
float sampleLinearMirror(float x, float y, int c) const;
|
||||
//@}
|
||||
|
||||
|
||||
FloatImage* clone() const;
|
||||
|
||||
public:
|
||||
|
||||
uint index(uint x, uint y) const;
|
||||
@ -239,15 +226,11 @@ inline uint FloatImage::indexRepeat(int x, int y) const
|
||||
|
||||
inline uint FloatImage::indexMirror(int x, int y) const
|
||||
{
|
||||
if (m_width == 1) x = 0;
|
||||
|
||||
x = abs(x);
|
||||
while (x >= m_width) {
|
||||
x = abs(m_width + m_width - x - 2);
|
||||
}
|
||||
|
||||
if (m_height == 1) y = 0;
|
||||
|
||||
y = abs(y);
|
||||
while (y >= m_height) {
|
||||
y = abs(m_height + m_height - y - 2);
|
||||
|
@ -266,7 +266,7 @@ Image * nv::ImageIO::loadTGA(Stream & s)
|
||||
// Read palette
|
||||
uint8 palette[768];
|
||||
if( pal ) {
|
||||
nvDebugCheck(tga.colormap_length <= 256);
|
||||
nvDebugCheck(tga.colormap_length < 256);
|
||||
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);
|
||||
|
||||
int linesize = TIFFScanlineSize(tif);
|
||||
tdata_t buf = (::uint8 *)::malloc(linesize);
|
||||
tdata_t buf = (::uint8 *)nv::mem::malloc(linesize);
|
||||
|
||||
for (uint y = 0; y < height; y++)
|
||||
{
|
||||
@ -991,7 +991,7 @@ FloatImage * nv::ImageIO::loadFloatTIFF(const char * fileName, Stream & s)
|
||||
}
|
||||
}
|
||||
|
||||
::free(buf);
|
||||
nv::mem::free(buf);
|
||||
|
||||
TIFFClose(tif);
|
||||
|
||||
|
@ -21,16 +21,15 @@
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <nvcore/Ptr.h>
|
||||
|
||||
#include <nvmath/Color.h>
|
||||
|
||||
#include <nvimage/NormalMap.h>
|
||||
#include <nvimage/Filter.h>
|
||||
#include <nvimage/FloatImage.h>
|
||||
#include <nvimage/Image.h>
|
||||
|
||||
#include <nvmath/Color.h>
|
||||
|
||||
#include <nvcore/Ptr.h>
|
||||
|
||||
|
||||
using namespace nv;
|
||||
|
||||
// Create normal map using the given kernels.
|
||||
|
@ -39,7 +39,7 @@ namespace nv
|
||||
bool isSupported() const
|
||||
{
|
||||
if (version != 1) {
|
||||
nvDebug("*** bad version number %u\n", version);
|
||||
printf("*** bad version number %u\n", version);
|
||||
return false;
|
||||
}
|
||||
if (channel_count > 4) {
|
||||
|
@ -12,14 +12,10 @@ http://www.efg2.com/Lab/Library/ImageProcessing/DHALF.TXT
|
||||
@@ This code needs to be reviewed, I'm not sure it's correct.
|
||||
*/
|
||||
|
||||
#include <nvimage/Quantize.h>
|
||||
#include <nvimage/Image.h>
|
||||
#include <nvimage/PixelFormat.h>
|
||||
|
||||
#include <nvmath/Color.h>
|
||||
|
||||
#include <nvcore/Containers.h> // swap
|
||||
|
||||
#include <nvimage/Image.h>
|
||||
#include <nvimage/Quantize.h>
|
||||
|
||||
using namespace nv;
|
||||
|
||||
@ -51,20 +47,94 @@ void nv::Quantize::BinaryAlpha( Image * image, int alpha_threshold /*= 127*/ )
|
||||
// Simple quantization.
|
||||
void nv::Quantize::RGB16( Image * image )
|
||||
{
|
||||
Truncate(image, 5, 6, 5, 8);
|
||||
nvCheck(image != NULL);
|
||||
|
||||
const uint w = image->width();
|
||||
const uint h = image->height();
|
||||
|
||||
for(uint y = 0; y < h; y++) {
|
||||
for(uint x = 0; x < w; x++) {
|
||||
|
||||
Color32 pixel32 = image->pixel(x, y);
|
||||
|
||||
// Convert to 16 bit and back to 32 using regular bit expansion.
|
||||
Color32 pixel16 = toColor32( toColor16(pixel32) );
|
||||
|
||||
// Store color.
|
||||
image->pixel(x, y) = pixel16;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Alpha quantization.
|
||||
void nv::Quantize::Alpha4( Image * image )
|
||||
{
|
||||
Truncate(image, 8, 8, 8, 4);
|
||||
nvCheck(image != NULL);
|
||||
|
||||
const uint w = image->width();
|
||||
const uint h = image->height();
|
||||
|
||||
for(uint y = 0; y < h; y++) {
|
||||
for(uint x = 0; x < w; x++) {
|
||||
|
||||
Color32 pixel = image->pixel(x, y);
|
||||
|
||||
// Convert to 4 bit using regular bit expansion.
|
||||
pixel.a = (pixel.a & 0xF0) | ((pixel.a & 0xF0) >> 4);
|
||||
|
||||
// Store color.
|
||||
image->pixel(x, y) = pixel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Error diffusion. Floyd Steinberg.
|
||||
void nv::Quantize::FloydSteinberg_RGB16( Image * image )
|
||||
{
|
||||
FloydSteinberg(image, 5, 6, 5, 8);
|
||||
nvCheck(image != NULL);
|
||||
|
||||
const uint w = image->width();
|
||||
const uint h = image->height();
|
||||
|
||||
// @@ Use fixed point?
|
||||
Vector3 * row0 = new Vector3[w+2];
|
||||
Vector3 * row1 = new Vector3[w+2];
|
||||
memset(row0, 0, sizeof(Vector3)*(w+2));
|
||||
memset(row1, 0, sizeof(Vector3)*(w+2));
|
||||
|
||||
for(uint y = 0; y < h; y++) {
|
||||
for(uint x = 0; x < w; x++) {
|
||||
|
||||
Color32 pixel32 = image->pixel(x, y);
|
||||
|
||||
// Add error. // @@ We shouldn't clamp here!
|
||||
pixel32.r = clamp(int(pixel32.r) + int(row0[1+x].x()), 0, 255);
|
||||
pixel32.g = clamp(int(pixel32.g) + int(row0[1+x].y()), 0, 255);
|
||||
pixel32.b = clamp(int(pixel32.b) + int(row0[1+x].z()), 0, 255);
|
||||
|
||||
// Convert to 16 bit. @@ Use regular clamp?
|
||||
Color32 pixel16 = toColor32( toColor16(pixel32) );
|
||||
|
||||
// Store color.
|
||||
image->pixel(x, y) = pixel16;
|
||||
|
||||
// Compute new error.
|
||||
Vector3 diff(float(pixel32.r - pixel16.r), float(pixel32.g - pixel16.g), float(pixel32.b - pixel16.b));
|
||||
|
||||
// Propagate new error.
|
||||
row0[1+x+1] += 7.0f / 16.0f * diff;
|
||||
row1[1+x-1] += 3.0f / 16.0f * diff;
|
||||
row1[1+x+0] += 5.0f / 16.0f * diff;
|
||||
row1[1+x+1] += 1.0f / 16.0f * diff;
|
||||
}
|
||||
|
||||
swap(row0, row1);
|
||||
memset(row1, 0, sizeof(Vector3)*(w+2));
|
||||
}
|
||||
|
||||
delete [] row0;
|
||||
delete [] row1;
|
||||
}
|
||||
|
||||
|
||||
@ -118,90 +188,34 @@ void nv::Quantize::FloydSteinberg_BinaryAlpha( Image * image, int alpha_threshol
|
||||
|
||||
// Error diffusion. Floyd Steinberg.
|
||||
void nv::Quantize::FloydSteinberg_Alpha4( Image * image )
|
||||
{
|
||||
FloydSteinberg(image, 8, 8, 8, 4);
|
||||
}
|
||||
|
||||
|
||||
void nv::Quantize::Truncate(Image * image, uint rsize, uint gsize, uint bsize, uint asize)
|
||||
{
|
||||
nvCheck(image != NULL);
|
||||
|
||||
const uint w = image->width();
|
||||
const uint h = image->height();
|
||||
|
||||
// @@ Use fixed point?
|
||||
float * row0 = new float[(w+2)];
|
||||
float * row1 = new float[(w+2)];
|
||||
memset(row0, 0, sizeof(float)*(w+2));
|
||||
memset(row1, 0, sizeof(float)*(w+2));
|
||||
|
||||
for(uint y = 0; y < h; y++) {
|
||||
for(uint x = 0; x < w; x++) {
|
||||
|
||||
Color32 pixel = image->pixel(x, y);
|
||||
|
||||
// Convert to our desired size, and reconstruct.
|
||||
pixel.r = PixelFormat::convert(pixel.r, 8, rsize);
|
||||
pixel.r = PixelFormat::convert(pixel.r, rsize, 8);
|
||||
// Add error.
|
||||
int alpha = int(pixel.a) + int(row0[1+x]);
|
||||
|
||||
pixel.g = PixelFormat::convert(pixel.g, 8, gsize);
|
||||
pixel.g = PixelFormat::convert(pixel.g, gsize, 8);
|
||||
|
||||
pixel.b = PixelFormat::convert(pixel.b, 8, bsize);
|
||||
pixel.b = PixelFormat::convert(pixel.b, bsize, 8);
|
||||
|
||||
pixel.a = PixelFormat::convert(pixel.a, 8, asize);
|
||||
pixel.a = PixelFormat::convert(pixel.a, asize, 8);
|
||||
// Convert to 4 bit using regular bit expansion.
|
||||
pixel.a = (pixel.a & 0xF0) | ((pixel.a & 0xF0) >> 4);
|
||||
|
||||
// Store color.
|
||||
image->pixel(x, y) = pixel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Error diffusion. Floyd Steinberg.
|
||||
void nv::Quantize::FloydSteinberg(Image * image, uint rsize, uint gsize, uint bsize, uint asize)
|
||||
{
|
||||
nvCheck(image != NULL);
|
||||
|
||||
const uint w = image->width();
|
||||
const uint h = image->height();
|
||||
|
||||
Vector4 * row0 = new Vector4[w+2];
|
||||
Vector4 * row1 = new Vector4[w+2];
|
||||
memset(row0, 0, sizeof(Vector4)*(w+2));
|
||||
memset(row1, 0, sizeof(Vector4)*(w+2));
|
||||
|
||||
for (uint y = 0; y < h; y++) {
|
||||
for (uint x = 0; x < w; x++) {
|
||||
|
||||
Color32 pixel = image->pixel(x, y);
|
||||
|
||||
// Add error.
|
||||
pixel.r = clamp(int(pixel.r) + int(row0[1+x].x()), 0, 255);
|
||||
pixel.g = clamp(int(pixel.g) + int(row0[1+x].y()), 0, 255);
|
||||
pixel.b = clamp(int(pixel.b) + int(row0[1+x].z()), 0, 255);
|
||||
pixel.a = clamp(int(pixel.a) + int(row0[1+x].w()), 0, 255);
|
||||
|
||||
int r = pixel.r;
|
||||
int g = pixel.g;
|
||||
int b = pixel.b;
|
||||
int a = pixel.a;
|
||||
|
||||
// Convert to our desired size, and reconstruct.
|
||||
r = PixelFormat::convert(r, 8, rsize);
|
||||
r = PixelFormat::convert(r, rsize, 8);
|
||||
|
||||
g = PixelFormat::convert(g, 8, gsize);
|
||||
g = PixelFormat::convert(g, gsize, 8);
|
||||
|
||||
b = PixelFormat::convert(b, 8, bsize);
|
||||
b = PixelFormat::convert(b, bsize, 8);
|
||||
|
||||
a = PixelFormat::convert(a, 8, asize);
|
||||
a = PixelFormat::convert(a, asize, 8);
|
||||
|
||||
// Store color.
|
||||
image->pixel(x, y) = Color32(r, g, b, a);
|
||||
|
||||
// Compute new error.
|
||||
Vector4 diff(float(int(pixel.r) - r), float(int(pixel.g) - g), float(int(pixel.b) - b), float(int(pixel.a) - a));
|
||||
float diff = float(alpha - pixel.a);
|
||||
|
||||
// Propagate new error.
|
||||
row0[1+x+1] += 7.0f / 16.0f * diff;
|
||||
@ -211,9 +225,10 @@ void nv::Quantize::FloydSteinberg(Image * image, uint rsize, uint gsize, uint bs
|
||||
}
|
||||
|
||||
swap(row0, row1);
|
||||
memset(row1, 0, sizeof(Vector4)*(w+2));
|
||||
memset(row1, 0, sizeof(float)*(w+2));
|
||||
}
|
||||
|
||||
delete [] row0;
|
||||
delete [] row1;
|
||||
}
|
||||
|
||||
|
@ -3,9 +3,6 @@
|
||||
#ifndef NV_IMAGE_QUANTIZE_H
|
||||
#define NV_IMAGE_QUANTIZE_H
|
||||
|
||||
#include <nvimage/nvimage.h>
|
||||
|
||||
|
||||
namespace nv
|
||||
{
|
||||
class Image;
|
||||
@ -20,9 +17,6 @@ namespace nv
|
||||
void FloydSteinberg_BinaryAlpha(Image * img, int alpha_threshold = 127);
|
||||
void FloydSteinberg_Alpha4(Image * img);
|
||||
|
||||
void Truncate(Image * image, uint rsize, uint gsize, uint bsize, uint asize);
|
||||
void FloydSteinberg(Image * image, uint rsize, uint gsize, uint bsize, uint asize);
|
||||
|
||||
// @@ Add palette quantization algorithms!
|
||||
}
|
||||
}
|
||||
|
@ -19,14 +19,4 @@
|
||||
#define NVIMAGE_CLASS
|
||||
#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
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
float area() const
|
||||
{
|
||||
const Vector3 d = extents();
|
||||
return 8.0f * (d.x()*d.y() + d.x()*d.z() + d.y()*d.z());
|
||||
return 4.0f * (d.x()*d.y() + d.x()*d.z() + d.y()*d.z());
|
||||
}
|
||||
|
||||
/// Get the volume of the box.
|
||||
@ -118,14 +118,6 @@ public:
|
||||
return 8.0f * (d.x() * d.y() * d.z());
|
||||
}
|
||||
|
||||
/// Return true if the box contains the given point.
|
||||
bool contains(Vector3::Arg p) const
|
||||
{
|
||||
return
|
||||
m_mins.x() < p.x() && m_mins.y() < p.y() && m_mins.z() < p.z() &&
|
||||
m_maxs.x() > p.x() && m_maxs.y() > p.y() && m_maxs.z() > p.z();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Vector3 m_mins;
|
||||
@ -133,6 +125,15 @@ private:
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
/// Point inside box test.
|
||||
inline bool pointInsideBox(const Box & b, Vector3::Arg p) const
|
||||
{
|
||||
return (m_mins.x() < p.x() && m_mins.y() < p.y() && m_mins.z() < p.z() &&
|
||||
m_maxs.x() > p.x() && m_maxs.y() > p.y() && m_maxs.z() > p.z());
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
} // nv namespace
|
||||
|
||||
|
@ -19,7 +19,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
ADD_DEFINITIONS(-DNVMATH_EXPORTS)
|
||||
|
||||
IF(NVMATH_SHARED)
|
||||
ADD_DEFINITIONS(-DNVMATH_SHARED=1)
|
||||
ADD_LIBRARY(nvmath SHARED ${MATH_SRCS})
|
||||
ELSE(NVMATH_SHARED)
|
||||
ADD_LIBRARY(nvmath ${MATH_SRCS})
|
||||
|
@ -332,7 +332,7 @@ inline Matrix transpose(Matrix::Arg m)
|
||||
Matrix r;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
for (int j = 0; j < 4; j++)
|
||||
for (int j = 0; j < 4; i++)
|
||||
{
|
||||
r(i, j) = m(j, i);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
scalar y() const;
|
||||
scalar z() const;
|
||||
|
||||
Vector2 xy() const;
|
||||
const Vector2 & xy() const;
|
||||
|
||||
scalar component(uint idx) const;
|
||||
|
||||
@ -111,8 +111,8 @@ public:
|
||||
scalar z() const;
|
||||
scalar w() const;
|
||||
|
||||
Vector2 xy() const;
|
||||
Vector3 xyz() const;
|
||||
const Vector2 & xy() const;
|
||||
const Vector3 & xyz() 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::z() const { return m_z; }
|
||||
|
||||
inline Vector2 Vector3::xy() const
|
||||
inline const Vector2 & Vector3::xy() const
|
||||
{
|
||||
return Vector2(x(), y());
|
||||
return *(Vector2 *)this;
|
||||
}
|
||||
|
||||
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::w() const { return m_w; }
|
||||
|
||||
inline Vector2 Vector4::xy() const
|
||||
inline const Vector2 & Vector4::xy() const
|
||||
{
|
||||
return Vector2(x(), y());
|
||||
return *(Vector2 *)this;
|
||||
}
|
||||
|
||||
inline Vector3 Vector4::xyz() const
|
||||
inline const Vector3 & Vector4::xyz() const
|
||||
{
|
||||
return Vector3(x(), y(), z());
|
||||
return *(Vector3 *)this;
|
||||
}
|
||||
|
||||
inline scalar Vector4::component(uint idx) const
|
||||
|
@ -48,37 +48,19 @@
|
||||
#define IS_NEGATIVE_FLOAT(x) (IR(x)&SIGN_BITMASK)
|
||||
*/
|
||||
|
||||
inline double sqrt_assert(const double f)
|
||||
{
|
||||
nvDebugCheck(f >= 0.0f);
|
||||
return sqrt(f);
|
||||
}
|
||||
|
||||
inline float sqrtf_assert(const float f)
|
||||
inline float sqrt_assert(const float f)
|
||||
{
|
||||
nvDebugCheck(f >= 0.0f);
|
||||
return sqrtf(f);
|
||||
}
|
||||
|
||||
inline double acos_assert(const double f)
|
||||
{
|
||||
nvDebugCheck(f >= -1.0f && f <= 1.0f);
|
||||
return acos(f);
|
||||
}
|
||||
|
||||
inline float acosf_assert(const float f)
|
||||
inline float acos_assert(const float f)
|
||||
{
|
||||
nvDebugCheck(f >= -1.0f && f <= 1.0f);
|
||||
return acosf(f);
|
||||
}
|
||||
|
||||
inline double asin_assert(const double f)
|
||||
{
|
||||
nvDebugCheck(f >= -1.0f && f <= 1.0f);
|
||||
return asin(f);
|
||||
}
|
||||
|
||||
inline float asinf_assert(const float f)
|
||||
inline float asin_assert(const float f)
|
||||
{
|
||||
nvDebugCheck(f >= -1.0f && f <= 1.0f);
|
||||
return asinf(f);
|
||||
@ -86,11 +68,11 @@ inline float asinf_assert(const float f)
|
||||
|
||||
// Replace default functions with asserting ones.
|
||||
#define sqrt sqrt_assert
|
||||
#define sqrtf sqrtf_assert
|
||||
#define sqrtf sqrt_assert
|
||||
#define acos acos_assert
|
||||
#define acosf acosf_assert
|
||||
#define acosf acos_assert
|
||||
#define asin asin_assert
|
||||
#define asinf asinf_assert
|
||||
#define asinf asin_assert
|
||||
|
||||
#if NV_OS_WIN32
|
||||
#include <float.h>
|
||||
@ -154,11 +136,6 @@ inline float lerp(float f0, float f1, float t)
|
||||
return f0 * s + f1 * t;
|
||||
}
|
||||
|
||||
inline float square(float f)
|
||||
{
|
||||
return f * f;
|
||||
}
|
||||
|
||||
} // nv
|
||||
|
||||
#endif // NV_MATH_H
|
||||
|
@ -44,8 +44,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
ADD_DEFINITIONS(-DNVTT_EXPORTS)
|
||||
|
||||
IF(NVTT_SHARED)
|
||||
ADD_DEFINITIONS(-DNVTT_SHARED=1)
|
||||
ADD_LIBRARY(nvtt SHARED ${NVTT_SRCS})
|
||||
ADD_LIBRARY(nvtt SHARED ${DXT_SRCS})
|
||||
ELSE(NVTT_SHARED)
|
||||
ADD_LIBRARY(nvtt ${NVTT_SRCS})
|
||||
ENDIF(NVTT_SHARED)
|
||||
|
@ -205,9 +205,9 @@ void nv::SlowCompressor::compressDXT1(const CompressionOptions::Private & compre
|
||||
ColorBlock rgba;
|
||||
BlockDXT1 block;
|
||||
|
||||
squish::WeightedClusterFit fit;
|
||||
//squish::WeightedClusterFit fit;
|
||||
//squish::ClusterFit fit;
|
||||
//squish::FastClusterFit fit;
|
||||
squish::FastClusterFit fit;
|
||||
fit.SetMetric(compressionOptions.colorWeight.x(), compressionOptions.colorWeight.y(), compressionOptions.colorWeight.z());
|
||||
|
||||
for (uint y = 0; y < h; y += 4) {
|
||||
@ -221,7 +221,7 @@ void nv::SlowCompressor::compressDXT1(const CompressionOptions::Private & compre
|
||||
}
|
||||
else
|
||||
{
|
||||
squish::ColourSet colours((uint8 *)rgba.colors(), 0, true);
|
||||
squish::ColourSet colours((uint8 *)rgba.colors(), 0);
|
||||
fit.SetColourSet(&colours, squish::kDxt1);
|
||||
fit.Compress(&block);
|
||||
}
|
||||
@ -255,7 +255,7 @@ void nv::SlowCompressor::compressDXT1a(const CompressionOptions::Private & compr
|
||||
|
||||
for (uint i = 0; i < 16; i++)
|
||||
{
|
||||
if (rgba.color(i).a == 0) anyAlpha = true;
|
||||
if (rgba.color(i).a < 128) anyAlpha = true;
|
||||
else allAlpha = false;
|
||||
}
|
||||
|
||||
|
@ -37,15 +37,23 @@ using namespace nvtt;
|
||||
namespace
|
||||
{
|
||||
|
||||
inline void convert_to_a8r8g8b8(const void * src, void * dst, uint w)
|
||||
{
|
||||
memcpy(dst, src, 4 * w);
|
||||
}
|
||||
inline uint computePitch(uint w, uint bitsize)
|
||||
{
|
||||
uint p = w * ((bitsize + 7) / 8);
|
||||
|
||||
inline void convert_to_x8r8g8b8(const void * src, void * dst, uint w)
|
||||
{
|
||||
memcpy(dst, src, 4 * w);
|
||||
}
|
||||
// Align to 32 bits.
|
||||
return ((p + 3) / 4) * 4;
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
@ -53,80 +61,80 @@ namespace
|
||||
// Pixel format converter.
|
||||
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 h = image->height();
|
||||
const uint w = image->width();
|
||||
const uint h = image->height();
|
||||
|
||||
const uint bitCount = compressionOptions.bitcount;
|
||||
nvCheck(bitCount == 8 || bitCount == 16 || bitCount == 24 || bitCount == 32);
|
||||
const uint bitCount = compressionOptions.bitcount;
|
||||
nvCheck(bitCount == 8 || bitCount == 16 || bitCount == 24 || bitCount == 32);
|
||||
|
||||
const uint byteCount = bitCount / 8;
|
||||
const uint byteCount = bitCount / 8;
|
||||
|
||||
const uint rmask = compressionOptions.rmask;
|
||||
uint rshift, rsize;
|
||||
PixelFormat::maskShiftAndSize(rmask, &rshift, &rsize);
|
||||
const uint rmask = compressionOptions.rmask;
|
||||
uint rshift, rsize;
|
||||
PixelFormat::maskShiftAndSize(rmask, &rshift, &rsize);
|
||||
|
||||
const uint gmask = compressionOptions.gmask;
|
||||
uint gshift, gsize;
|
||||
PixelFormat::maskShiftAndSize(gmask, &gshift, &gsize);
|
||||
const uint gmask = compressionOptions.gmask;
|
||||
uint gshift, gsize;
|
||||
PixelFormat::maskShiftAndSize(gmask, &gshift, &gsize);
|
||||
|
||||
const uint bmask = compressionOptions.bmask;
|
||||
uint bshift, bsize;
|
||||
PixelFormat::maskShiftAndSize(bmask, &bshift, &bsize);
|
||||
const uint bmask = compressionOptions.bmask;
|
||||
uint bshift, bsize;
|
||||
PixelFormat::maskShiftAndSize(bmask, &bshift, &bsize);
|
||||
|
||||
const uint amask = compressionOptions.amask;
|
||||
uint ashift, asize;
|
||||
PixelFormat::maskShiftAndSize(amask, &ashift, &asize);
|
||||
const uint amask = compressionOptions.amask;
|
||||
uint ashift, asize;
|
||||
PixelFormat::maskShiftAndSize(amask, &ashift, &asize);
|
||||
|
||||
// Determine pitch.
|
||||
uint pitch = computePitch(w, compressionOptions.bitcount, 8);
|
||||
// Determine pitch.
|
||||
uint pitch = computePitch(w, compressionOptions.bitcount);
|
||||
|
||||
uint8 * dst = (uint8 *)::malloc(pitch + 4);
|
||||
uint8 * dst = (uint8 *)mem::malloc(pitch + 4);
|
||||
|
||||
for (uint y = 0; y < h; y++)
|
||||
{
|
||||
const Color32 * src = image->scanline(y);
|
||||
for (uint y = 0; y < h; y++)
|
||||
{
|
||||
const Color32 * src = image->scanline(y);
|
||||
|
||||
if (bitCount == 32 && rmask == 0xFF0000 && gmask == 0xFF00 && bmask == 0xFF && amask == 0xFF000000)
|
||||
{
|
||||
convert_to_a8r8g8b8(src, dst, w);
|
||||
}
|
||||
else if (bitCount == 32 && rmask == 0xFF0000 && gmask == 0xFF00 && bmask == 0xFF && amask == 0)
|
||||
{
|
||||
convert_to_x8r8g8b8(src, dst, w);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Generic pixel format conversion.
|
||||
for (uint x = 0; x < w; x++)
|
||||
{
|
||||
uint c = 0;
|
||||
c |= PixelFormat::convert(src[x].r, 8, rsize) << rshift;
|
||||
c |= PixelFormat::convert(src[x].g, 8, gsize) << gshift;
|
||||
c |= PixelFormat::convert(src[x].b, 8, bsize) << bshift;
|
||||
c |= PixelFormat::convert(src[x].a, 8, asize) << ashift;
|
||||
if (bitCount == 32 && rmask == 0xFF0000 && gmask == 0xFF00 && bmask == 0xFF && amask == 0xFF000000)
|
||||
{
|
||||
convert_to_a8r8g8b8(src, dst, w);
|
||||
}
|
||||
else if (bitCount == 32 && rmask == 0xFF0000 && gmask == 0xFF00 && bmask == 0xFF && amask == 0)
|
||||
{
|
||||
convert_to_x8r8g8b8(src, dst, w);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Generic pixel format conversion.
|
||||
for (uint x = 0; x < w; x++)
|
||||
{
|
||||
uint c = 0;
|
||||
c |= PixelFormat::convert(src[x].r, 8, rsize) << rshift;
|
||||
c |= PixelFormat::convert(src[x].g, 8, gsize) << gshift;
|
||||
c |= PixelFormat::convert(src[x].b, 8, bsize) << bshift;
|
||||
c |= PixelFormat::convert(src[x].a, 8, asize) << ashift;
|
||||
|
||||
// Output one byte at a time.
|
||||
for (uint i = 0; i < byteCount; i++)
|
||||
{
|
||||
*(dst + x * byteCount + i) = (c >> (i * 8)) & 0xFF;
|
||||
}
|
||||
}
|
||||
// Output one byte at a time.
|
||||
for (uint i = 0; i < byteCount; i++)
|
||||
{
|
||||
*(dst + x * byteCount + i) = (c >> (i * 8)) & 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
// Zero padding.
|
||||
for (uint x = w * byteCount; x < pitch; x++)
|
||||
{
|
||||
*(dst + x) = 0;
|
||||
}
|
||||
}
|
||||
// Zero padding.
|
||||
for (uint x = w; x < pitch; x++)
|
||||
{
|
||||
*(dst + x) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (outputOptions.outputHandler != NULL)
|
||||
{
|
||||
outputOptions.outputHandler->writeData(dst, pitch);
|
||||
}
|
||||
}
|
||||
if (outputOptions.outputHandler != NULL)
|
||||
{
|
||||
outputOptions.outputHandler->writeData(dst, pitch);
|
||||
}
|
||||
}
|
||||
|
||||
::free(dst);
|
||||
mem::free(dst);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include <nvimage/Filter.h>
|
||||
#include <nvimage/Quantize.h>
|
||||
#include <nvimage/NormalMap.h>
|
||||
#include <nvimage/PixelFormat.h>
|
||||
|
||||
#include "Compressor.h"
|
||||
#include "InputOptions.h"
|
||||
@ -74,10 +73,18 @@ namespace
|
||||
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)
|
||||
{
|
||||
if (format == Format_RGBA) {
|
||||
return d * h * computePitch(w, bitCount, 8);
|
||||
return d * h * computePitch(w, bitCount);
|
||||
}
|
||||
else {
|
||||
// @@ Handle 3D textures. DXT and VTC have different behaviors.
|
||||
@ -118,8 +125,10 @@ namespace nvtt
|
||||
// Convert linear float image to fixed image ready for compression.
|
||||
void toFixedImage(const InputOptions::Private & inputOptions)
|
||||
{
|
||||
if (m_floatImage != NULL) // apfaffe - We should check that we have a float image, if so convert it!
|
||||
if (this->asFixedImage() == NULL)
|
||||
{
|
||||
nvDebugCheck(m_floatImage != NULL);
|
||||
|
||||
if (inputOptions.isNormalMap || inputOptions.outputGamma == 1.0f)
|
||||
{
|
||||
m_fixedImage = m_floatImage->createImage();
|
||||
@ -143,7 +152,7 @@ namespace nvtt
|
||||
if (inputOptions.isNormalMap)
|
||||
{
|
||||
// Expand normals to [-1, 1] range.
|
||||
// floatImage->expandNormals(0);
|
||||
// floatImage->expandNormals(0);
|
||||
}
|
||||
else if (inputOptions.inputGamma != 1.0f)
|
||||
{
|
||||
@ -165,12 +174,11 @@ namespace nvtt
|
||||
|
||||
const Image * asFixedImage() const
|
||||
{
|
||||
// - apfaffe - switched logic to return the 'processed image' rather than the input!
|
||||
if (m_fixedImage != NULL && m_fixedImage.ptr() != NULL)
|
||||
if (m_inputImage != NULL)
|
||||
{
|
||||
return m_fixedImage.ptr();
|
||||
return m_inputImage;
|
||||
}
|
||||
return m_inputImage;
|
||||
return m_fixedImage.ptr();
|
||||
}
|
||||
|
||||
Image * asMutableFixedImage()
|
||||
@ -198,15 +206,22 @@ Compressor::Compressor() : m(*new Compressor::Private())
|
||||
{
|
||||
// CUDA initialization.
|
||||
m.cudaSupported = cuda::isHardwarePresent();
|
||||
m.cudaEnabled = false;
|
||||
m.cudaDevice = -1;
|
||||
m.cudaEnabled = m.cudaSupported;
|
||||
|
||||
enableCudaAcceleration(m.cudaSupported);
|
||||
if (m.cudaEnabled)
|
||||
{
|
||||
m.cuda = new CudaCompressor();
|
||||
|
||||
if (!m.cuda->isValid())
|
||||
{
|
||||
m.cudaEnabled = false;
|
||||
m.cuda = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Compressor::~Compressor()
|
||||
{
|
||||
enableCudaAcceleration(false);
|
||||
delete &m;
|
||||
}
|
||||
|
||||
@ -216,33 +231,17 @@ void Compressor::enableCudaAcceleration(bool enable)
|
||||
{
|
||||
if (m.cudaSupported)
|
||||
{
|
||||
if (m.cudaEnabled && !enable)
|
||||
m.cudaEnabled = enable;
|
||||
}
|
||||
|
||||
if (m.cudaEnabled && m.cuda == NULL)
|
||||
{
|
||||
m.cuda = new CudaCompressor();
|
||||
|
||||
if (!m.cuda->isValid())
|
||||
{
|
||||
m.cudaEnabled = false;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -332,13 +331,13 @@ bool Compressor::Private::outputHeader(const InputOptions::Private & inputOption
|
||||
header.setTextureCube();
|
||||
}
|
||||
/*else if (inputOptions.textureType == TextureType_3D) {
|
||||
header.setTexture3D();
|
||||
header.setDepth(inputOptions.targetDepth);
|
||||
header.setTexture3D();
|
||||
header.setDepth(inputOptions.targetDepth);
|
||||
}*/
|
||||
|
||||
if (compressionOptions.format == Format_RGBA)
|
||||
{
|
||||
header.setPitch(computePitch(inputOptions.targetWidth, compressionOptions.bitcount, 8));
|
||||
header.setPitch(computePitch(inputOptions.targetWidth, compressionOptions.bitcount));
|
||||
header.setPixelFormat(compressionOptions.bitcount, compressionOptions.rmask, compressionOptions.gmask, compressionOptions.bmask, compressionOptions.amask);
|
||||
}
|
||||
else
|
||||
@ -571,7 +570,7 @@ void Compressor::Private::scaleMipmap(Mipmap & mipmap, const InputOptions::Priva
|
||||
|
||||
// Resize image.
|
||||
BoxFilter boxFilter;
|
||||
mipmap.setImage(mipmap.asFloatImage()->resize(boxFilter, w, h, (FloatImage::WrapMode)inputOptions.wrapMode));
|
||||
mipmap.setImage(mipmap.asFloatImage()->downSample(boxFilter, w, h, (FloatImage::WrapMode)inputOptions.wrapMode));
|
||||
}
|
||||
|
||||
|
||||
@ -618,6 +617,13 @@ void Compressor::Private::quantizeMipmap(Mipmap & mipmap, const CompressionOptio
|
||||
{
|
||||
nvDebugCheck(mipmap.asFixedImage() != NULL);
|
||||
|
||||
if (compressionOptions.enableColorDithering)
|
||||
{
|
||||
if (compressionOptions.format >= Format_DXT1 && compressionOptions.format <= Format_DXT5)
|
||||
{
|
||||
Quantize::FloydSteinberg_RGB16(mipmap.asMutableFixedImage());
|
||||
}
|
||||
}
|
||||
if (compressionOptions.binaryAlpha)
|
||||
{
|
||||
if (compressionOptions.enableAlphaDithering)
|
||||
@ -629,50 +635,19 @@ void Compressor::Private::quantizeMipmap(Mipmap & mipmap, const CompressionOptio
|
||||
Quantize::BinaryAlpha(mipmap.asMutableFixedImage(), compressionOptions.alphaThreshold);
|
||||
}
|
||||
}
|
||||
|
||||
if (compressionOptions.enableColorDithering || compressionOptions.enableAlphaDithering)
|
||||
else
|
||||
{
|
||||
uint rsize = 8;
|
||||
uint gsize = 8;
|
||||
uint bsize = 8;
|
||||
uint asize = 8;
|
||||
|
||||
if (compressionOptions.enableColorDithering)
|
||||
{
|
||||
if (compressionOptions.format >= Format_DXT1 && compressionOptions.format <= Format_DXT5)
|
||||
{
|
||||
rsize = 5;
|
||||
gsize = 6;
|
||||
bsize = 5;
|
||||
}
|
||||
else if (compressionOptions.format == Format_RGB)
|
||||
{
|
||||
uint rshift, gshift, bshift;
|
||||
PixelFormat::maskShiftAndSize(compressionOptions.rmask, &rshift, &rsize);
|
||||
PixelFormat::maskShiftAndSize(compressionOptions.gmask, &gshift, &gsize);
|
||||
PixelFormat::maskShiftAndSize(compressionOptions.bmask, &bshift, &bsize);
|
||||
}
|
||||
}
|
||||
|
||||
if (compressionOptions.enableAlphaDithering)
|
||||
{
|
||||
if (compressionOptions.format == Format_DXT3)
|
||||
{
|
||||
asize = 4;
|
||||
Quantize::Alpha4(mipmap.asMutableFixedImage());
|
||||
}
|
||||
else if (compressionOptions.format == Format_RGB)
|
||||
else if (compressionOptions.format == Format_DXT1a)
|
||||
{
|
||||
uint ashift;
|
||||
PixelFormat::maskShiftAndSize(compressionOptions.amask, &ashift, &asize);
|
||||
Quantize::BinaryAlpha(mipmap.asMutableFixedImage(), compressionOptions.alphaThreshold);
|
||||
}
|
||||
}
|
||||
|
||||
if (compressionOptions.binaryAlpha)
|
||||
{
|
||||
asize = 8; // Already quantized.
|
||||
}
|
||||
|
||||
Quantize::FloydSteinberg(mipmap.asMutableFixedImage(), rsize, gsize, bsize, asize);
|
||||
}
|
||||
}
|
||||
|
||||
@ -689,7 +664,6 @@ bool Compressor::Private::compressMipmap(const Mipmap & mipmap, const InputOptio
|
||||
SlowCompressor slow;
|
||||
slow.setImage(image, inputOptions.alphaMode);
|
||||
|
||||
const bool useCuda = cudaEnabled && image->width() * image->height() >= 512;
|
||||
|
||||
if (compressionOptions.format == Format_RGBA || compressionOptions.format == Format_RGB)
|
||||
{
|
||||
@ -706,29 +680,29 @@ bool Compressor::Private::compressMipmap(const Mipmap & mipmap, const InputOptio
|
||||
#endif
|
||||
|
||||
#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 (cudaEnabled)
|
||||
{
|
||||
atiCompressDXT1(image, outputOptions);
|
||||
nvDebugCheck(cudaSupported);
|
||||
cuda->setImage(image, inputOptions.alphaMode);
|
||||
cuda->compressDXT1(compressionOptions, outputOptions);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
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);
|
||||
}
|
||||
}
|
||||
{
|
||||
slow.compressDXT1(compressionOptions, outputOptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (compressionOptions.format == Format_DXT1a)
|
||||
{
|
||||
@ -738,7 +712,7 @@ bool Compressor::Private::compressMipmap(const Mipmap & mipmap, const InputOptio
|
||||
}
|
||||
else
|
||||
{
|
||||
if (useCuda)
|
||||
if (cudaEnabled)
|
||||
{
|
||||
nvDebugCheck(cudaSupported);
|
||||
/*cuda*/slow.compressDXT1a(compressionOptions, outputOptions);
|
||||
@ -757,7 +731,7 @@ bool Compressor::Private::compressMipmap(const Mipmap & mipmap, const InputOptio
|
||||
}
|
||||
else
|
||||
{
|
||||
if (useCuda)
|
||||
if (cudaEnabled)
|
||||
{
|
||||
nvDebugCheck(cudaSupported);
|
||||
cuda->setImage(image, inputOptions.alphaMode);
|
||||
@ -777,7 +751,7 @@ bool Compressor::Private::compressMipmap(const Mipmap & mipmap, const InputOptio
|
||||
}
|
||||
else
|
||||
{
|
||||
if (useCuda)
|
||||
if (cudaEnabled)
|
||||
{
|
||||
nvDebugCheck(cudaSupported);
|
||||
cuda->setImage(image, inputOptions.alphaMode);
|
||||
|
@ -63,12 +63,10 @@ namespace nvtt
|
||||
bool compressMipmap(const Mipmap & mipmap, const InputOptions::Private & inputOptions, const CompressionOptions::Private & compressionOptions, const OutputOptions::Private & outputOptions) const;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
bool cudaSupported;
|
||||
bool cudaEnabled;
|
||||
int cudaDevice;
|
||||
|
||||
nv::AutoPtr<nv::CudaCompressor> cuda;
|
||||
|
||||
|
@ -94,7 +94,7 @@ void InputOptions::reset()
|
||||
m.textureType = TextureType_2D;
|
||||
m.inputFormat = InputFormat_BGRA_8UB;
|
||||
|
||||
m.alphaMode = AlphaMode_None;
|
||||
m.alphaMode = AlphaMode_Transparency;
|
||||
|
||||
m.inputGamma = 2.2f;
|
||||
m.outputGamma = 2.2f;
|
||||
|
@ -205,7 +205,7 @@ void OptimalCompress::compressDXT1(Color32 c, BlockDXT1 * dxtBlock)
|
||||
|
||||
void OptimalCompress::compressDXT1a(Color32 rgba, BlockDXT1 * dxtBlock)
|
||||
{
|
||||
if (rgba.a == 0)
|
||||
if (rgba.a < 128)
|
||||
{
|
||||
dxtBlock->col0.u = 0;
|
||||
dxtBlock->col1.u = 0;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user