25 #ifndef OPENSUBDIV3_OSD_D3D11_VERTEX_BUFFER_H
26 #define OPENSUBDIV3_OSD_D3D11_VERTEX_BUFFER_H
28 #include "../version.h"
32 struct ID3D11DeviceContext;
33 struct ID3D11UnorderedAccessView;
36 namespace OPENSUBDIV_VERSION {
50 ID3D11DeviceContext *deviceContext);
57 void UpdateData(
const float *src,
int startVertex,
int numVertices,
58 ID3D11DeviceContext *deviceContext);
70 ID3D11Buffer *
BindVBO(ID3D11DeviceContext *deviceContext) {
75 ID3D11UnorderedAccessView *
BindD3D11UAV(ID3D11DeviceContext *deviceContext);
87 ID3D11Buffer *_buffer;
88 ID3D11Buffer *_uploadBuffer;
89 ID3D11UnorderedAccessView *_uav;
95 using namespace OPENSUBDIV_VERSION;
99 #endif // OPENSUBDIV3_OSD_D3D11_VERTEX_BUFFER_H
ID3D11Buffer * BindVBO(ID3D11DeviceContext *deviceContext)
Returns the D3D11 buffer object (for Osd::Mesh interface)
D3D11VertexBuffer(int numElements, int numVertices)
Constructor.
bool allocate(ID3D11Device *device)
ID3D11UnorderedAccessView * BindD3D11UAV(ID3D11DeviceContext *deviceContext)
Returns the D3D11 UAV.
void UpdateData(const float *src, int startVertex, int numVertices, ID3D11DeviceContext *deviceContext)
Concrete vertex buffer class for DirectX subvision and DirectX drawing.
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
static D3D11VertexBuffer * Create(int numElements, int numVertices, ID3D11DeviceContext *deviceContext)
Creator. Returns NULL if error.
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
ID3D11Buffer * BindD3D11Buffer(ID3D11DeviceContext *deviceContext)
Returns the D3D11 buffer object.
virtual ~D3D11VertexBuffer()
Destructor.