apply the DX11 cloth fix to allow DLL usage, see Issue 494
This commit is contained in:
@@ -547,10 +547,10 @@ void btSoftBodyTriangleDataDX11::generateBatches()
|
||||
|
||||
|
||||
|
||||
btDX11SoftBodySolver::btDX11SoftBodySolver(ID3D11Device * dx11Device, ID3D11DeviceContext* dx11Context) :
|
||||
btDX11SoftBodySolver::btDX11SoftBodySolver(ID3D11Device * dx11Device, ID3D11DeviceContext* dx11Context, DXFunctions::CompileFromMemoryFunc dx11CompileFromMemory) :
|
||||
m_dx11Device( dx11Device ),
|
||||
m_dx11Context( dx11Context ),
|
||||
dxFunctions( m_dx11Device, m_dx11Context ),
|
||||
dxFunctions( m_dx11Device, m_dx11Context, dx11CompileFromMemory ),
|
||||
m_linkData(m_dx11Device, m_dx11Context),
|
||||
m_vertexData(m_dx11Device, m_dx11Context),
|
||||
m_triangleData(m_dx11Device, m_dx11Context),
|
||||
@@ -1976,7 +1976,7 @@ DXFunctions::KernelDesc DXFunctions::compileComputeShaderFromString( const char*
|
||||
ID3DBlob* pBlob = NULL;
|
||||
ID3D11ComputeShader* kernelPointer = 0;
|
||||
|
||||
hr = D3DX11CompileFromMemory(
|
||||
hr = m_dx11CompileFromMemory(
|
||||
shaderString,
|
||||
strlen(shaderString),
|
||||
shaderName,
|
||||
|
||||
@@ -30,12 +30,16 @@ class DXFunctions
|
||||
{
|
||||
public:
|
||||
|
||||
typedef HRESULT (WINAPI * CompileFromMemoryFunc)(LPCSTR,SIZE_T,LPCSTR,const D3D10_SHADER_MACRO*,LPD3D10INCLUDE,LPCSTR,LPCSTR,UINT,UINT,ID3DX11ThreadPump*,ID3D10Blob**,ID3D10Blob**,HRESULT*);
|
||||
|
||||
ID3D11Device * m_dx11Device;
|
||||
ID3D11DeviceContext* m_dx11Context;
|
||||
CompileFromMemoryFunc m_dx11CompileFromMemory;
|
||||
|
||||
DXFunctions( ID3D11Device *dx11Device, ID3D11DeviceContext* dx11Context) :
|
||||
DXFunctions(ID3D11Device *dx11Device, ID3D11DeviceContext* dx11Context, CompileFromMemoryFunc dx11CompileFromMemory) :
|
||||
m_dx11Device( dx11Device ),
|
||||
m_dx11Context( dx11Context )
|
||||
m_dx11Context( dx11Context ),
|
||||
m_dx11CompileFromMemory( dx11CompileFromMemory )
|
||||
{
|
||||
|
||||
}
|
||||
@@ -561,7 +565,7 @@ protected:
|
||||
void releaseKernels();
|
||||
|
||||
public:
|
||||
btDX11SoftBodySolver(ID3D11Device * dx11Device, ID3D11DeviceContext* dx11Context);
|
||||
btDX11SoftBodySolver(ID3D11Device * dx11Device, ID3D11DeviceContext* dx11Context, DXFunctions::CompileFromMemoryFunc dx11CompileFromMemory = &D3DX11CompileFromMemory);
|
||||
|
||||
virtual ~btDX11SoftBodySolver();
|
||||
|
||||
@@ -655,8 +659,8 @@ protected:
|
||||
void releaseKernels();
|
||||
|
||||
public:
|
||||
btSoftBodySolverOutputDXtoDX(ID3D11Device *dx11Device, ID3D11DeviceContext* dx11Context) :
|
||||
dxFunctions( dx11Device, dx11Context )
|
||||
btSoftBodySolverOutputDXtoDX(ID3D11Device *dx11Device, ID3D11DeviceContext* dx11Context, DXFunctions::CompileFromMemoryFunc dx11CompileFromMemory = &D3DX11CompileFromMemory) :
|
||||
dxFunctions( dx11Device, dx11Context, dx11CompileFromMemory )
|
||||
{
|
||||
m_shadersInitialized = false;
|
||||
}
|
||||
|
||||
@@ -173,8 +173,8 @@ bool btSoftBodyLinkDataDX11SIMDAware::moveFromAccelerator()
|
||||
|
||||
|
||||
|
||||
btDX11SIMDAwareSoftBodySolver::btDX11SIMDAwareSoftBodySolver(ID3D11Device * dx11Device, ID3D11DeviceContext* dx11Context) :
|
||||
btDX11SoftBodySolver( dx11Device, dx11Context ),
|
||||
btDX11SIMDAwareSoftBodySolver::btDX11SIMDAwareSoftBodySolver(ID3D11Device * dx11Device, ID3D11DeviceContext* dx11Context, DXFunctions::CompileFromMemoryFunc dx11CompileFromMemory) :
|
||||
btDX11SoftBodySolver( dx11Device, dx11Context, dx11CompileFromMemory ),
|
||||
m_linkData(m_dx11Device, m_dx11Context)
|
||||
{
|
||||
// Initial we will clearly need to update solver constants
|
||||
|
||||
@@ -60,7 +60,7 @@ protected:
|
||||
|
||||
|
||||
public:
|
||||
btDX11SIMDAwareSoftBodySolver(ID3D11Device * dx11Device, ID3D11DeviceContext* dx11Context);
|
||||
btDX11SIMDAwareSoftBodySolver(ID3D11Device * dx11Device, ID3D11DeviceContext* dx11Context, DXFunctions::CompileFromMemoryFunc dx11CompileFromMemory = &D3DX11CompileFromMemory);
|
||||
|
||||
virtual ~btDX11SIMDAwareSoftBodySolver();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user