aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/samples
diff options
context:
space:
mode:
Diffstat (limited to 'NvCloth/samples')
-rw-r--r--NvCloth/samples/CmakeGenerateProjects.bat17
-rw-r--r--NvCloth/samples/SampleBase/renderer/Mesh.h4
-rw-r--r--NvCloth/samples/SampleBase/renderer/RenderMaterial.cpp5
-rw-r--r--NvCloth/samples/SampleBase/renderer/Renderable.cpp3
-rw-r--r--NvCloth/samples/SampleBase/renderer/Renderer.cpp4
-rw-r--r--NvCloth/samples/SampleBase/renderer/ResourceManager.cpp8
-rw-r--r--NvCloth/samples/SampleBase/renderer/SkinnedRenderMesh.cpp5
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp4
-rw-r--r--NvCloth/samples/SampleBase/task/PxTask.h19
-rw-r--r--NvCloth/samples/SampleBase/utils/CallbackImplementations.cpp17
-rw-r--r--NvCloth/samples/SampleBase/utils/CallbackImplementations.h1
-rw-r--r--NvCloth/samples/SampleBase/utils/ClothMeshGenerator.cpp2
-rw-r--r--NvCloth/samples/compiler/cmake/SampleBase.cmake10
-rw-r--r--NvCloth/samples/compiler/cmake/windows/CMakeLists.txt33
-rw-r--r--NvCloth/samples/compiler/cmake/windows/SampleBase-AT.cmake7
-rw-r--r--NvCloth/samples/compiler/cmake/windows/SampleBase.cmake6
-rw-r--r--NvCloth/samples/external/CMakeModules/FindPxShared.cmake2
18 files changed, 69 insertions, 80 deletions
diff --git a/NvCloth/samples/CmakeGenerateProjects.bat b/NvCloth/samples/CmakeGenerateProjects.bat
index dcb2bbc..d1da2cf 100644
--- a/NvCloth/samples/CmakeGenerateProjects.bat
+++ b/NvCloth/samples/CmakeGenerateProjects.bat
@@ -1,11 +1,8 @@
rem @echo off
CD /D %~dp0
-echo "Note: You need to run this with admin rights for the first time to set GW_DEPS_ROOT globally."
-call "../scripts/locate_gw_root.bat" GW_DEPS_ROOT_F
@echo on
-setx GW_DEPS_ROOT "%GW_DEPS_ROOT_F%
-echo GW_DEPS_ROOT = %GW_DEPS_ROOT%
+
REM Install cmake using packman
set PACKMAN=call ../scripts/packman/packman.cmd
@@ -21,9 +18,9 @@ REM Make sure the various variables that we need are set
call "../scripts/locate_cuda.bat" CUDA_PATH_
echo CUDA_PATH_ = %CUDA_PATH_%
-IF EXIST %~dp0..\Externals\CMakeModules (
- set GW_DEPS_ROOT=%~dp0..\
-)
+
+set GW_DEPS_ROOT=%~dp0..\..\
+
IF NOT DEFINED GW_DEPS_ROOT GOTO GW_DEPS_ROOT_UNDEFINED
@@ -34,12 +31,6 @@ set SAMPLES_ROOT_DIR=%~dp0
REM Generate projects here
-rmdir /s /q compiler\vc14win32-cmake\
-mkdir compiler\vc14win32-cmake\
-pushd compiler\vc14win32-cmake\
-%CMAKE% ..\.. -G "Visual Studio 14 2015" -AWin32 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DTARGET_BUILD_PLATFORM=windows -DSTATIC_WINCRT=0 -DBL_DLL_OUTPUT_DIR=%OUTPUT_ROOT%\bin\vc14win32-cmake -DBL_LIB_OUTPUT_DIR=%OUTPUT_ROOT%\lib\vc14win32-cmake -DBL_EXE_OUTPUT_DIR=%OUTPUT_ROOT%\bin\vc14win32-cmake
-popd
-
rmdir /s /q compiler\vc14win64-cmake\
mkdir compiler\vc14win64-cmake\
pushd compiler\vc14win64-cmake\
diff --git a/NvCloth/samples/SampleBase/renderer/Mesh.h b/NvCloth/samples/SampleBase/renderer/Mesh.h
index 3a2885b..14a7081 100644
--- a/NvCloth/samples/SampleBase/renderer/Mesh.h
+++ b/NvCloth/samples/SampleBase/renderer/Mesh.h
@@ -12,8 +12,8 @@
#define MESH_H
#include <vector>
-#include "PxVec2.h"
-#include "PxVec3.h"
+#include <foundation/PxVec2.h>
+#include <foundation/PxVec3.h>
class Mesh
diff --git a/NvCloth/samples/SampleBase/renderer/RenderMaterial.cpp b/NvCloth/samples/SampleBase/renderer/RenderMaterial.cpp
index eb07c84..46d29dd 100644
--- a/NvCloth/samples/SampleBase/renderer/RenderMaterial.cpp
+++ b/NvCloth/samples/SampleBase/renderer/RenderMaterial.cpp
@@ -12,6 +12,7 @@
#include <DirectXMath.h>
#include "ShaderUtils.h"
#include "Renderer.h"
+#include <NvCloth/Callbacks.h>
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -116,7 +117,7 @@ void RenderMaterial::setBlending(BlendMode blendMode)
desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
break;
default:
- PX_ALWAYS_ASSERT_MESSAGE("Unknown blend mode");
+ NV_CLOTH_ASSERT_WITH_MESSAGE(false,"Unknown blend mode");
}
ID3D11Device* device = GetDeviceManager()->GetDevice();
@@ -187,7 +188,7 @@ RenderMaterial::InstancePtr RenderMaterial::getMaterialInstance(const D3D11_INPU
return materialInstance;
}
}
- PX_ALWAYS_ASSERT();
+ NV_CLOTH_ASSERT(false);
return NULL;
}
diff --git a/NvCloth/samples/SampleBase/renderer/Renderable.cpp b/NvCloth/samples/SampleBase/renderer/Renderable.cpp
index c0560fd..6151bc3 100644
--- a/NvCloth/samples/SampleBase/renderer/Renderable.cpp
+++ b/NvCloth/samples/SampleBase/renderer/Renderable.cpp
@@ -11,6 +11,7 @@
#include "Renderable.h"
#include "Renderer.h"
#include "RenderUtils.h"
+#include <NvCloth/Callbacks.h>
const DirectX::XMFLOAT4 DEFAULT_COLOR(0.5f, 0.5f, 0.5f, 1.0f);
@@ -42,7 +43,7 @@ void Renderable::render(Renderer& renderer, bool depthStencilOnly) const
auto& material = m_materialInstances[submeshId%getMaterialCount()];
if(!material->isValid())
{
- PX_ALWAYS_ASSERT();
+ NV_CLOTH_ASSERT(false);
return;
}
diff --git a/NvCloth/samples/SampleBase/renderer/Renderer.cpp b/NvCloth/samples/SampleBase/renderer/Renderer.cpp
index dffcebd..4c6c9d5 100644
--- a/NvCloth/samples/SampleBase/renderer/Renderer.cpp
+++ b/NvCloth/samples/SampleBase/renderer/Renderer.cpp
@@ -14,6 +14,8 @@
#include "SampleProfiler.h"
#include "PxRenderBuffer.h"
+
+#include <NvCloth/Callbacks.h>
using namespace physx;
#include <set>
@@ -692,7 +694,7 @@ IRenderMesh* Renderer::getPrimitiveRenderMesh(PrimitiveRenderMeshType::Enum type
m_primitiveRenderMeshes[type] = new SphereRenderMesh();
break;
default:
- PX_ALWAYS_ASSERT_MESSAGE("Unsupported PxGeometryType");
+ NV_CLOTH_ASSERT_WITH_MESSAGE(false,"Unsupported PxGeometryType");
return NULL;
}
}
diff --git a/NvCloth/samples/SampleBase/renderer/ResourceManager.cpp b/NvCloth/samples/SampleBase/renderer/ResourceManager.cpp
index fc76e1c..b7655ea 100644
--- a/NvCloth/samples/SampleBase/renderer/ResourceManager.cpp
+++ b/NvCloth/samples/SampleBase/renderer/ResourceManager.cpp
@@ -9,7 +9,7 @@
*/
#include "ResourceManager.h"
-#include "PxAssert.h"
+#include <NvCloth/Callbacks.h>
#include "Utils.h"
#include <windows.h>
@@ -58,7 +58,7 @@ const Resource* ResourceManager::requestResource(ResourceType type, const char*
}
else
{
- PX_ALWAYS_ASSERT_MESSAGE(name);
+ NV_CLOTH_ASSERT_WITH_MESSAGE(false,name);
}
}
else if (type == eTEXTURE)
@@ -85,7 +85,7 @@ const Resource* ResourceManager::requestResource(ResourceType type, const char*
}
else
{
- PX_ALWAYS_ASSERT_MESSAGE("Unsupported texture extension");
+ NV_CLOTH_ASSERT_WITH_MESSAGE(false,"Unsupported texture extension");
}
resource = textureResource;
}
@@ -98,7 +98,7 @@ const Resource* ResourceManager::requestResource(ResourceType type, const char*
}
else
{
- PX_ALWAYS_ASSERT_MESSAGE(name);
+ NV_CLOTH_ASSERT_WITH_MESSAGE(false,name);
return nullptr;
}
}
diff --git a/NvCloth/samples/SampleBase/renderer/SkinnedRenderMesh.cpp b/NvCloth/samples/SampleBase/renderer/SkinnedRenderMesh.cpp
index deb518d..99a999c 100644
--- a/NvCloth/samples/SampleBase/renderer/SkinnedRenderMesh.cpp
+++ b/NvCloth/samples/SampleBase/renderer/SkinnedRenderMesh.cpp
@@ -11,10 +11,11 @@
#include "SkinnedRenderMesh.h"
#include "Renderer.h"
+#include <NvCloth/Callbacks.h>
SkinnedRenderMesh::SkinnedRenderMesh(const std::vector<const SimpleMesh*>& meshes)
{
- PX_ASSERT_WITH_MESSAGE(meshes.size() <= MeshesCountMax, "meshes.size() have to be <= SkinnedRenderMesh::MeshesCountMax");
+ NV_CLOTH_ASSERT_WITH_MESSAGE(meshes.size() <= MeshesCountMax, "meshes.size() have to be <= SkinnedRenderMesh::MeshesCountMax");
m_device = GetDeviceManager()->GetDevice();
@@ -179,7 +180,7 @@ void SkinnedRenderMesh::updateVisibleMeshes(const std::vector<uint32_t>& visible
}
context->Unmap(m_indexBuffer, 0);
m_indexCount = indexCount;
- PX_ASSERT(m_indexCount % 3 == 0);
+ NV_CLOTH_ASSERT(m_indexCount % 3 == 0);
}
}
diff --git a/NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp
index 8a677f1..7ab5ca0 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp
@@ -83,7 +83,7 @@ void PlaneCollisionScene::initializeCloth(int index, physx::PxVec3 offset)
//assign as collision data
nv::cloth::Range<const physx::PxVec4> planesR(&planes[0], &planes[0] + planes.size());
- mClothActor[index]->mCloth->setPlanes(planesR, 0, mClothActor[index]->mCloth->getNumPlanes());
+ mClothActor[index]->mCloth->setPlanes(planesR, planesR);
//assign convex indices
std::vector<uint32_t> indices;
diff --git a/NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp
index 2e6912e..8bb004e 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp
@@ -84,7 +84,9 @@ void SphereScene::initializeCloth(int index, physx::PxVec3 offset)
physx::PxVec4 spheres[1] = {physx::PxVec4(physx::PxVec3(0.f, 10.f, -1.f) + offset,1.5)};
- mClothActor[index]->mCloth->setSpheres(nv::cloth::Range<physx::PxVec4>(spheres, spheres + 1), 0, mClothActor[index]->mCloth->getNumSpheres());
+ //mClothActor[index]->mCloth->setSpheres(nv::cloth::Range<physx::PxVec4>(spheres, spheres + 1), 0, mClothActor[index]->mCloth->getNumSpheres());
+ mClothActor[index]->mCloth->setSpheres(nv::cloth::Range<physx::PxVec4>(spheres, spheres + 1), nv::cloth::Range<physx::PxVec4>(spheres, spheres + 1));
+
// Setup phase configs
std::vector<nv::cloth::PhaseConfig> phases(mFabric[index]->getNumPhases());
diff --git a/NvCloth/samples/SampleBase/task/PxTask.h b/NvCloth/samples/SampleBase/task/PxTask.h
index 85d91da..e2b19e2 100644
--- a/NvCloth/samples/SampleBase/task/PxTask.h
+++ b/NvCloth/samples/SampleBase/task/PxTask.h
@@ -32,7 +32,6 @@
#include "task/PxTaskManager.h"
#include "task/PxCpuDispatcher.h"
#include "task/PxGpuDispatcher.h"
-#include "foundation/PxAssert.h"
namespace physx
{
@@ -117,7 +116,7 @@ public:
//! \brief Release method implementation
virtual void release()
{
- PX_ASSERT(mTm);
+ NV_CLOTH_ASSERT(mTm);
// clear mTm before calling taskCompleted() for safety
PxTaskManager* save = mTm;
@@ -129,7 +128,7 @@ public:
// task is allowed to start.
PX_INLINE void finishBefore( PxTaskID taskID )
{
- PX_ASSERT(mTm);
+ NV_CLOTH_ASSERT(mTm);
mTm->finishBefore( *this, taskID);
}
@@ -137,7 +136,7 @@ public:
// task has completed.
PX_INLINE void startAfter( PxTaskID taskID )
{
- PX_ASSERT(mTm);
+ NV_CLOTH_ASSERT(mTm);
mTm->startAfter( *this, taskID );
}
@@ -147,7 +146,7 @@ public:
*/
PX_INLINE void addReference()
{
- PX_ASSERT(mTm);
+ NV_CLOTH_ASSERT(mTm);
mTm->addReference( mTaskID );
}
@@ -157,7 +156,7 @@ public:
*/
PX_INLINE void removeReference()
{
- PX_ASSERT(mTm);
+ NV_CLOTH_ASSERT(mTm);
mTm->decrReference( mTaskID );
}
@@ -244,7 +243,7 @@ public:
*/
PX_INLINE void setContinuation(PxTaskManager& tm, PxBaseTask* c)
{
- PX_ASSERT( mRefCount == 0 );
+ NV_CLOTH_ASSERT( mRefCount == 0 );
mRefCount = 1;
mCont = c;
mTm = &tm;
@@ -263,15 +262,15 @@ public:
*/
PX_INLINE void setContinuation( PxBaseTask* c )
{
- PX_ASSERT( c );
- PX_ASSERT( mRefCount == 0 );
+ NV_CLOTH_ASSERT( c );
+ NV_CLOTH_ASSERT( mRefCount == 0 );
mRefCount = 1;
mCont = c;
if( mCont )
{
mCont->addReference();
mTm = mCont->getTaskManager();
- PX_ASSERT( mTm );
+ NV_CLOTH_ASSERT( mTm );
}
}
diff --git a/NvCloth/samples/SampleBase/utils/CallbackImplementations.cpp b/NvCloth/samples/SampleBase/utils/CallbackImplementations.cpp
index 0a257ba..3d00961 100644
--- a/NvCloth/samples/SampleBase/utils/CallbackImplementations.cpp
+++ b/NvCloth/samples/SampleBase/utils/CallbackImplementations.cpp
@@ -16,8 +16,6 @@
#include <d3d11.h>
//#endif
-#include <PsThread.h>
-
NvClothEnvironment* NvClothEnvironment::sEnv = nullptr;
@@ -52,9 +50,6 @@ DxContextManagerCallbackImpl::DxContextManagerCallbackImpl(ID3D11Device* device,
{
mDevice->AddRef();
mDevice->GetImmediateContext(&mContext);
-#ifdef _DEBUG
- mLockCountTls = physx::shdfnd::TlsAlloc();
-#endif
}
DxContextManagerCallbackImpl::~DxContextManagerCallbackImpl()
{
@@ -72,24 +67,15 @@ DxContextManagerCallbackImpl::~DxContextManagerCallbackImpl()
mDevice->Release();
-#if _DEBUG
- physx::shdfnd::TlsFree(mLockCountTls);
-#endif
}
void DxContextManagerCallbackImpl::acquireContext()
{
mMutex.lock();
-#if _DEBUG
- physx::shdfnd::TlsSet(mLockCountTls, reinterpret_cast<void*>(reinterpret_cast<intptr_t>(physx::shdfnd::TlsGet(mLockCountTls)) + 1));
-#endif
}
void DxContextManagerCallbackImpl::releaseContext()
{
-#if _DEBUG
- physx::shdfnd::TlsSet(mLockCountTls, reinterpret_cast<void*>(reinterpret_cast<intptr_t>(physx::shdfnd::TlsGet(mLockCountTls)) - 1));
-#endif
mMutex.unlock();
}
ID3D11Device* DxContextManagerCallbackImpl::getDevice() const
@@ -98,9 +84,6 @@ ID3D11Device* DxContextManagerCallbackImpl::getDevice() const
}
ID3D11DeviceContext* DxContextManagerCallbackImpl::getContext() const
{
-#if _DEBUG
- assert(reinterpret_cast<intptr_t>(physx::shdfnd::TlsGet(mLockCountTls)) > 0);
-#endif
return mContext;
}
bool DxContextManagerCallbackImpl::synchronizeResources() const
diff --git a/NvCloth/samples/SampleBase/utils/CallbackImplementations.h b/NvCloth/samples/SampleBase/utils/CallbackImplementations.h
index 38a4b17..214f689 100644
--- a/NvCloth/samples/SampleBase/utils/CallbackImplementations.h
+++ b/NvCloth/samples/SampleBase/utils/CallbackImplementations.h
@@ -12,7 +12,6 @@
#include <NvCloth/Callbacks.h>
#include <foundation/PxAllocatorCallback.h>
#include <foundation/PxErrorCallback.h>
-#include <foundation/PxAssert.h>
#include <foundation/PxProfiler.h>
#include <vector>
diff --git a/NvCloth/samples/SampleBase/utils/ClothMeshGenerator.cpp b/NvCloth/samples/SampleBase/utils/ClothMeshGenerator.cpp
index a0c0d3a..c3781c2 100644
--- a/NvCloth/samples/SampleBase/utils/ClothMeshGenerator.cpp
+++ b/NvCloth/samples/SampleBase/utils/ClothMeshGenerator.cpp
@@ -10,7 +10,7 @@
#include "ClothMeshGenerator.h"
-#include "PsMathUtils.h"
+#include <NvCloth/ps/PsMathUtils.h>
#include <fstream>
#include <iterator>
diff --git a/NvCloth/samples/compiler/cmake/SampleBase.cmake b/NvCloth/samples/compiler/cmake/SampleBase.cmake
index b552bb7..a1fdb67 100644
--- a/NvCloth/samples/compiler/cmake/SampleBase.cmake
+++ b/NvCloth/samples/compiler/cmake/SampleBase.cmake
@@ -5,6 +5,9 @@
MESSAGE("SampleBase.cmake [begin]")
MESSAGE("CMAKE_MODULE_PATH: " ${CMAKE_MODULE_PATH})
+SET(NVCLOTH_ROOT_DIR ${GW_DEPS_ROOT}/NvCloth)
+
+MESSAGE("NVCLOTH_ROOT_DIR: " ${NVCLOTH_ROOT_DIR})
SET(SB_SOURCE_DIR ${PROJECT_SOURCE_DIR}/SampleBase)
SET(SB_CORE_SOURCE_DIR ${SB_SOURCE_DIR}/core)
@@ -14,7 +17,6 @@ SET(SB_UI_SOURCE_DIR ${SB_SOURCE_DIR}/ui)
SET(SB_UTILS_SOURCE_DIR ${SB_SOURCE_DIR}/utils)
SET(SB_TASK_SOURCE_DIR ${SB_SOURCE_DIR}/task)
-FIND_PACKAGE(PxShared "1.0.21467209.1" REQUIRED)
FIND_PACKAGE(DXUT "9.15.2016.1" REQUIRED)
FIND_PACKAGE(DirectXTex "10.5.2016.2" REQUIRED)
FIND_PACKAGE(imgui "1.49" REQUIRED)
@@ -152,7 +154,8 @@ SET(UTIL_FILES
${SB_UTILS_SOURCE_DIR}/MeshGenerator.h
${SB_UTILS_SOURCE_DIR}/DataStream.cpp
${SB_UTILS_SOURCE_DIR}/DataStream.h
-
+ ${SB_UTILS_SOURCE_DIR}/AnimatedModelUtilities.cpp
+ ${SB_UTILS_SOURCE_DIR}/AnimatedModelUtilities.h
)
SET(TASK_FILES
@@ -243,11 +246,10 @@ TARGET_LINK_LIBRARIES(SampleBase
PUBLIC d3dcompiler.lib d3d11.lib dxgi.lib comctl32.lib
PUBLIC ${HBAO_LIB} ${SHADOW_LIB} ${DXUT_LIBRARIES} ${DIRECTXTEX_LIBRARIES} ${ASSIMP_LIBRARIES})
-TARGET_LINK_LIBRARIES(SampleBase PUBLIC PxFoundation)
TARGET_LINK_LIBRARIES(SampleBase PUBLIC NvCloth)
TARGET_LINK_LIBRARIES(SampleBase PUBLIC ${CUDA_CUDA_LIBRARY})
SET_TARGET_PROPERTIES(SampleBase PROPERTIES LINK_FLAGS ${SAMPLEBASE_LINK_FLAGS})
include(${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/SampleBase-AT.cmake OPTIONAL)
-MESSAGE("SampleBase.cmake [end]") \ No newline at end of file
+MESSAGE("SampleBase.cmake [end]")
diff --git a/NvCloth/samples/compiler/cmake/windows/CMakeLists.txt b/NvCloth/samples/compiler/cmake/windows/CMakeLists.txt
index a7dc6b2..906fe15 100644
--- a/NvCloth/samples/compiler/cmake/windows/CMakeLists.txt
+++ b/NvCloth/samples/compiler/cmake/windows/CMakeLists.txt
@@ -3,17 +3,26 @@
MESSAGE("Windows/CMakeLists.txt [begin]")
SET(GW_DEPS_ROOT $ENV{GW_DEPS_ROOT})
+SET(CMAKE_MODULE_PATH $ENV{GW_DEPS_ROOT}NvCloth/Externals/CMakeModules)
-
-IF(EXISTS $ENV{GW_DEPS_ROOT}/Externals/CMakeModules)
- SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}; $ENV{GW_DEPS_ROOT}/Externals/CMakeModules)
-ELSE()
- SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}; $ENV{GW_DEPS_ROOT}/sw/physx/tools/CMakeModules)
+# Add find modules to the path
+IF(NOT EXISTS ${CMAKE_MODULE_PATH})
+ MESSAGE(FATAL_ERROR "Could not find CMakeModules at ${CMAKE_MODULE_PATH}")
ENDIF()
-SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}; "${CMAKE_CURRENT_SOURCE_DIR}/..")
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}; "${CMAKE_CURRENT_SOURCE_DIR}/external/CMakeModules")
-MESSAGE("CMAKE_MODULE_PATH: " ${CMAKE_MODULE_PATH})
+
+IF(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/external/CMakeModules")
+ MESSAGE(FATAL_ERROR "Could not find CMakeModules at ${CMAKE_CURRENT_SOURCE_DIR}/external/CMakeModules")
+ENDIF()
+
+SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}; "$ENV{GW_DEPS_ROOT}/NvCloth")
+
+IF(NOT EXISTS "$ENV{GW_DEPS_ROOT}/NvCloth")
+ MESSAGE(FATAL_ERROR "Could not find CMakeModules for FindNvCloth.cmake at $ENV{GW_DEPS_ROOT}/NvCloth")
+ENDIF()
+
+MESSAGE( "[samples]windows/CMakeLists.txt CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
#NOTE: Warnings lowered on the sample projects as it's got a lot of warnings. Defines below hide more.
SET(CMAKE_CXX_FLAGS "/GR- /GF /MP /Gy /EHsc /d2Zi+ /errorReport:prompt /fp:fast /Gd /Gm- /GS- /nologo /W3 /WX /Zc:forScope /Zc:inline /Zc:wchar_t /Zi")
@@ -59,21 +68,13 @@ SET(CMAKE_PROFILE_POSTFIX "${CMAKE_PROFILE_POSTFIX}_${LIBPATH_SUFFIX}")
SET(CMAKE_CHECKED_POSTFIX "${CMAKE_CHECKED_POSTFIX}_${LIBPATH_SUFFIX}")
SET(CMAKE_RELEASE_POSTFIX "${CMAKE_RELEASE_POSTFIX}_${LIBPATH_SUFFIX}")
-SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}; "${CMAKE_CURRENT_SOURCE_DIR}/../../../..")
+SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}; "${CMAKE_CURRENT_SOURCE_DIR}/../../../../..")
SET(PX_SELECT_COMPONENTS PxFoundation)
FIND_PACKAGE(PxShared REQUIRED)
FIND_PACKAGE(NvCloth REQUIRED)
-
-# Include the PxShared-exports.cmake file that PxShared created. There's other ways to do this, but there's a bunch of issues with it in a CI environment
-# such as - we don't want to be installing any built artifacts on this server, etc. So for now we hack it.
-
-# Add PxShared as a dependency so that we can use project references
-#ADD_SUBDIRECTORY(${PXSHARED_ROOT_DIR}/src/compiler/cmake/windows "${CMAKE_CURRENT_BINARY_DIR}/pxshared_bin")
-#MESSAGE("NVCLOTH_ROOT_DIR = ${NVCLOTH_ROOT_DIR}")
ADD_SUBDIRECTORY(${NVCLOTH_ROOT_DIR}/compiler/cmake/windows "${CMAKE_CURRENT_BINARY_DIR}/NvCloth_bin")
-
# Include all of the projects
INCLUDE(${PROJECT_CMAKE_FILES_DIR}/SampleBase.cmake)
diff --git a/NvCloth/samples/compiler/cmake/windows/SampleBase-AT.cmake b/NvCloth/samples/compiler/cmake/windows/SampleBase-AT.cmake
index 0673b96..e445e2a 100644
--- a/NvCloth/samples/compiler/cmake/windows/SampleBase-AT.cmake
+++ b/NvCloth/samples/compiler/cmake/windows/SampleBase-AT.cmake
@@ -16,5 +16,10 @@ ADD_CUSTOM_COMMAND(TARGET SampleBase POST_BUILD
${D3DCOMPILER_DLL}
${BL_EXE_OUTPUT_DIR}
)
+#ADD_CUSTOM_COMMAND(TARGET SampleBase POST_BUILD
+# COMMAND ${CMAKE_COMMAND} -E copy_if_different
+# ${ASSIMP_DLLS}
+# ${BL_EXE_OUTPUT_DIR}
+#)
-MESSAGE("Windows/SampleBase.cmake [end]") \ No newline at end of file
+MESSAGE("Windows/SampleBase.cmake [end]")
diff --git a/NvCloth/samples/compiler/cmake/windows/SampleBase.cmake b/NvCloth/samples/compiler/cmake/windows/SampleBase.cmake
index 46b865a..d98f49e 100644
--- a/NvCloth/samples/compiler/cmake/windows/SampleBase.cmake
+++ b/NvCloth/samples/compiler/cmake/windows/SampleBase.cmake
@@ -3,7 +3,7 @@
#
MESSAGE("Windows/SampleBase.cmake [begin]")
-FIND_PACKAGE(CUDA 8 REQUIRED)
+FIND_PACKAGE(CUDA 10 REQUIRED)
SET(SAMPLEBASE_PLATFORM_COMMON_FILES
)
@@ -35,6 +35,7 @@ if (CMAKE_CL_64)
SET(D3DCOMPILER_DLL "\"$(VC_ExecutablePath_x64_x64)/d3dcompiler_47.dll\"")
+# SET(ASSIMP_DLLS ${ASSIMP_DLL_PATH}/Release/assimp-vc140-mt.dll)
else()
SET(SHADOW_LIB ${NVCLOTH_ROOT_DIR}/samples/external/shadow_lib/GFSDK_ShadowLib_DX11.win32.lib)
SET(SHADOW_DLLS ${NVCLOTH_ROOT_DIR}/samples/external/shadow_lib/GFSDK_ShadowLib_DX11.win32.dll)
@@ -44,7 +45,8 @@ else()
SET(D3DCOMPILER_DLL "\"$(VC_ExecutablePath_x86_x86)/d3dcompiler_47.dll\"")
+# SET(ASSIMP_DLLS ${ASSIMP_DLL_PATH}/Release/assimp-vc140-mt.dll)
endif()
-MESSAGE("Windows/SampleBase.cmake [end]") \ No newline at end of file
+MESSAGE("Windows/SampleBase.cmake [end]")
diff --git a/NvCloth/samples/external/CMakeModules/FindPxShared.cmake b/NvCloth/samples/external/CMakeModules/FindPxShared.cmake
index a252b47..3297996 100644
--- a/NvCloth/samples/external/CMakeModules/FindPxShared.cmake
+++ b/NvCloth/samples/external/CMakeModules/FindPxShared.cmake
@@ -10,7 +10,7 @@ FIND_PATH( PXSHARED_ROOT_DIR include/foundation/Px.h
${GW_DEPS_ROOT}/sw/physx/PxShared/1.0/trunk
NO_DEFAULT_PATH
NO_CMAKE_FIND_ROOT_PATH)
-
+
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PxShared DEFAULT_MSG PXSHARED_ROOT_DIR)