aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/samples/SampleBase/utils
diff options
context:
space:
mode:
authorMarijn Tamis <[email protected]>2019-04-01 14:21:09 +0200
committerMarijn Tamis <[email protected]>2019-04-01 14:21:09 +0200
commitd243404d4ba88bcf53f7310cc8980b4efe38c19f (patch)
treedcc8ce2904e9f813e03f71f825c4d3c9ec565d91 /NvCloth/samples/SampleBase/utils
parentAdd new SetSpheres and SetPlanes api's to bring them in line with setTriangles. (diff)
downloadnvcloth-1.1.6.tar.xz
nvcloth-1.1.6.zip
1.1.6 Release.1.1.6
Diffstat (limited to 'NvCloth/samples/SampleBase/utils')
-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
3 files changed, 1 insertions, 19 deletions
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>