DX11 Buffer that tracks a host buffer on use to ensure size-correctness. More...
#include <btSoftBodySolverBuffer_DX11.h>
Public Member Functions | |
btDX11Buffer (ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext, btAlignedObjectArray< ElementType > *CPUBuffer, bool readOnly) | |
virtual | ~btDX11Buffer () |
ID3D11ShaderResourceView *& | getSRV () |
ID3D11UnorderedAccessView *& | getUAV () |
ID3D11Buffer *& | getBuffer () |
bool | moveToGPU () |
Move the data to the GPU if it is not there already. | |
bool | moveFromGPU () |
Move the data back from the GPU if it is on there and isn't read only. | |
bool | copyFromGPU () |
Copy the data back from the GPU without changing its state to be CPU-side. | |
virtual void | changedOnCPU () |
Call if data has changed on the CPU. | |
Protected Member Functions | |
bool | createBuffer (ID3D11Buffer *preexistingBuffer=0) |
Protected Attributes | |
ID3D11Device * | m_d3dDevice |
ID3D11DeviceContext * | m_d3dDeviceContext |
ID3D11Buffer * | m_Buffer |
ID3D11ShaderResourceView * | m_SRV |
ID3D11UnorderedAccessView * | m_UAV |
btAlignedObjectArray < ElementType > * | m_CPUBuffer |
ID3D11Buffer * | m_readBackBuffer |
int | m_gpuSize |
bool | m_onGPU |
bool | m_readOnlyOnGPU |
DX11 Buffer that tracks a host buffer on use to ensure size-correctness.
Definition at line 32 of file btSoftBodySolverBuffer_DX11.h.
btDX11Buffer< ElementType >::btDX11Buffer | ( | ID3D11Device * | d3dDevice, | |
ID3D11DeviceContext * | d3dDeviceContext, | |||
btAlignedObjectArray< ElementType > * | CPUBuffer, | |||
bool | readOnly | |||
) | [inline] |
Definition at line 140 of file btSoftBodySolverBuffer_DX11.h.
virtual btDX11Buffer< ElementType >::~btDX11Buffer | ( | ) | [inline, virtual] |
Definition at line 157 of file btSoftBodySolverBuffer_DX11.h.
virtual void btDX11Buffer< ElementType >::changedOnCPU | ( | ) | [inline, virtual] |
Call if data has changed on the CPU.
Can then trigger a move to the GPU as necessary.
Definition at line 315 of file btSoftBodySolverBuffer_DX11.h.
bool btDX11Buffer< ElementType >::copyFromGPU | ( | ) | [inline] |
Copy the data back from the GPU without changing its state to be CPU-side.
Useful if we just want to view it on the host for visualization.
Definition at line 273 of file btSoftBodySolverBuffer_DX11.h.
bool btDX11Buffer< ElementType >::createBuffer | ( | ID3D11Buffer * | preexistingBuffer = 0 |
) | [inline, protected] |
Definition at line 52 of file btSoftBodySolverBuffer_DX11.h.
ID3D11Buffer* & btDX11Buffer< ElementType >::getBuffer | ( | ) | [inline] |
Definition at line 175 of file btSoftBodySolverBuffer_DX11.h.
ID3D11ShaderResourceView* & btDX11Buffer< ElementType >::getSRV | ( | ) | [inline] |
Definition at line 165 of file btSoftBodySolverBuffer_DX11.h.
ID3D11UnorderedAccessView* & btDX11Buffer< ElementType >::getUAV | ( | ) | [inline] |
Definition at line 170 of file btSoftBodySolverBuffer_DX11.h.
bool btDX11Buffer< ElementType >::moveFromGPU | ( | ) | [inline] |
Move the data back from the GPU if it is on there and isn't read only.
Definition at line 227 of file btSoftBodySolverBuffer_DX11.h.
bool btDX11Buffer< ElementType >::moveToGPU | ( | ) | [inline] |
Move the data to the GPU if it is not there already.
Definition at line 183 of file btSoftBodySolverBuffer_DX11.h.
ID3D11Buffer* btDX11Buffer< ElementType >::m_Buffer [protected] |
Definition at line 38 of file btSoftBodySolverBuffer_DX11.h.
btAlignedObjectArray< ElementType >* btDX11Buffer< ElementType >::m_CPUBuffer [protected] |
Definition at line 41 of file btSoftBodySolverBuffer_DX11.h.
ID3D11Device* btDX11Buffer< ElementType >::m_d3dDevice [protected] |
Definition at line 35 of file btSoftBodySolverBuffer_DX11.h.
ID3D11DeviceContext* btDX11Buffer< ElementType >::m_d3dDeviceContext [protected] |
Definition at line 36 of file btSoftBodySolverBuffer_DX11.h.
int btDX11Buffer< ElementType >::m_gpuSize [protected] |
Definition at line 47 of file btSoftBodySolverBuffer_DX11.h.
bool btDX11Buffer< ElementType >::m_onGPU [protected] |
Definition at line 48 of file btSoftBodySolverBuffer_DX11.h.
ID3D11Buffer* btDX11Buffer< ElementType >::m_readBackBuffer [protected] |
Definition at line 45 of file btSoftBodySolverBuffer_DX11.h.
bool btDX11Buffer< ElementType >::m_readOnlyOnGPU [protected] |
Definition at line 50 of file btSoftBodySolverBuffer_DX11.h.
ID3D11ShaderResourceView* btDX11Buffer< ElementType >::m_SRV [protected] |
Definition at line 39 of file btSoftBodySolverBuffer_DX11.h.
ID3D11UnorderedAccessView* btDX11Buffer< ElementType >::m_UAV [protected] |
Definition at line 40 of file btSoftBodySolverBuffer_DX11.h.