25 #ifndef OSD_CPU_D3D11_VERTEX_BUFFER_H
26 #define OSD_CPU_D3D11_VERTEX_BUFFER_H
28 #include "../version.h"
32 struct ID3D11DeviceContext;
34 namespace OpenSubdiv {
35 namespace OPENSUBDIV_VERSION {
52 ID3D11Device *device);
59 void UpdateData(
const float *src,
int startVertex,
int numVertices,
void *param);
77 ID3D11Device *device);
84 ID3D11Buffer *_d3d11Buffer;
91 using namespace OPENSUBDIV_VERSION;
95 #endif // OSD_CPU_D3D11_VERTEX_BUFFER_H
float * BindCpuBuffer()
Returns the address of CPU buffer.
bool allocate(ID3D11Device *device)
void UpdateData(const float *src, int startVertex, int numVertices, void *param)
static CpuD3D11VertexBuffer * Create(int numElements, int numVertices, ID3D11Device *device)
Creator. Returns NULL if error.
int GetNumVertices() const
Returns how many vertices allocated in this vertex buffer.
int GetNumElements() const
Returns how many elements defined in this vertex buffer.
ID3D11Buffer * BindD3D11Buffer(ID3D11DeviceContext *deviceContext)
Returns the D3D11 buffer object.
Concrete vertex buffer class for Cpu subvision and DirectX drawing.
CpuD3D11VertexBuffer(int numElements, int numVertices, ID3D11Device *device)
Constructor.
virtual ~CpuD3D11VertexBuffer()
Destructor.