Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
CpuD3D11VertexBuffer Class Reference

Concrete vertex buffer class for Cpu subvision and DirectX drawing. More...

`#include <cpuD3D11VertexBuffer.h>`

## Public Member Functions
virtual | ~CpuD3D11VertexBuffer ()
| Destructor. More...
void | UpdateData (const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
int | GetNumElements () const
| Returns how many elements defined in this vertex buffer. More...
int | GetNumVertices () const
| Returns how many vertices allocated in this vertex buffer. More...
float * | BindCpuBuffer ()
| Returns the address of CPU buffer. More...
ID3D11Buffer * | BindD3D11Buffer (ID3D11DeviceContext *deviceContext)
| Returns the D3D11 buffer object. More...
ID3D11Buffer * | BindVBO (ID3D11DeviceContext *deviceContext)
| Returns the D3D11 buffer object (for Osd::Mesh interface) More...

## Static Public Member Functions
static CpuD3D11VertexBuffer * | Create (int numElements, int numVertices, ID3D11DeviceContext *deviceContext)
| Creator. Returns NULL if error. More...

## Protected Member Functions
| CpuD3D11VertexBuffer (int numElements, int numVertices)
| Constructor. More...
bool | allocate (ID3D11Device *device)

## Detailed Description

Concrete vertex buffer class for Cpu subvision and DirectX drawing.

CpuD3D11VertexBuffer implements CpuVertexBufferInterface and D3D11VertexBufferInterface.

An instance of this buffer class can be passed to CpuEvaluator.

Definition at line 48 of file cpuD3D11VertexBuffer.h.

## Constructor & Destructor Documentation

## § ~CpuD3D11VertexBuffer()

virtual ~CpuD3D11VertexBuffer | ( |  | ) |
| virtual

Destructor.

## § CpuD3D11VertexBuffer()

CpuD3D11VertexBuffer | ( | int | numElements,
|  | int | numVertices
| ) |  |
| protected

Constructor.

## Member Function Documentation

## § allocate()

bool allocate | ( | ID3D11Device * | device | ) |
| protected

## § BindCpuBuffer()

float* BindCpuBuffer | ( |  | ) |

Returns the address of CPU buffer.

## § BindD3D11Buffer()

ID3D11Buffer* BindD3D11Buffer | ( | ID3D11DeviceContext * | deviceContext | ) |

Returns the D3D11 buffer object.

## § BindVBO()

ID3D11Buffer* BindVBO | ( | ID3D11DeviceContext * | deviceContext | ) |
| inline

Returns the D3D11 buffer object (for Osd::Mesh interface)

Definition at line 75 of file cpuD3D11VertexBuffer.h.

## § Create()

static CpuD3D11VertexBuffer* Create | ( | int | numElements,
|  | int | numVertices,
|  | ID3D11DeviceContext * | deviceContext
| ) |  |
| static

Creator. Returns NULL if error.

## § GetNumElements()

int GetNumElements | ( |  | ) | const

Returns how many elements defined in this vertex buffer.

## § GetNumVertices()

int GetNumVertices | ( |  | ) | const

Returns how many vertices allocated in this vertex buffer.

## § UpdateData()

void UpdateData | ( | const float * | src,
|  | int | startVertex,
|  | int | numVertices,
|  | void * | deviceContext = `NULL`
| ) |  |

This method is meant to be used in client code in order to provide coarse vertices data to Osd.

The documentation for this class was generated from the following file:

- opensubdiv/osd/cpuD3D11VertexBuffer.h