25 #ifndef OSD_D3D11_VERTEX_BUFFER_H
26 #define OSD_D3D11_VERTEX_BUFFER_H
28 #include "../version.h"
32 struct ID3D11DeviceContext;
33 struct ID3D11UnorderedAccessView;
35 namespace OpenSubdiv {
36 namespace OPENSUBDIV_VERSION {
51 ID3D11Device *device);
58 void UpdateData(
const float *src,
int startVertex,
int numVertices,
void *param);
70 ID3D11UnorderedAccessView *
BindD3D11UAV(ID3D11DeviceContext *deviceContext);
76 ID3D11Device *device);
84 ID3D11Buffer *_buffer;
85 ID3D11Buffer *_uploadBuffer;
86 ID3D11UnorderedAccessView *_uav;
92 using namespace OPENSUBDIV_VERSION;
96 #endif // OSD_D3D11_VERTEX_BUFFER_H
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
static D3D11VertexBuffer * Create(int numElements, int numVertices, ID3D11Device *device)
Creator. Returns NULL if error.
virtual ~D3D11VertexBuffer()
Destructor.
D3D11VertexBuffer(int numElements, int numVertices, ID3D11Device *device)
Constructor.
void UpdateData(const float *src, int startVertex, int numVertices, void *param)
Concrete vertex buffer class for DirectX subvision and DirectX drawing.
ID3D11UnorderedAccessView * BindD3D11UAV(ID3D11DeviceContext *deviceContext)
Returns the D3D11 UAV.
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
bool allocate(ID3D11Device *device)
ID3D11Buffer * BindD3D11Buffer(ID3D11DeviceContext *deviceContext)
Returns the D3D11 buffer object.