Loading...
Searching...
No Matches
CpuVertexBuffer Class Reference

Concrete vertex buffer class for CPU subdivision. More...

`#include <cpuVertexBuffer.h>`

## Public Member Functions

| ~CpuVertexBuffer ()
| Destructor.
void | UpdateData (const float *src, int startVertex, int numVertices, void *deviceContext=NULL)
int | GetNumElements () const
| Returns how many elements defined in this vertex buffer.
int | GetNumVertices () const
| Returns how many vertices allocated in this vertex buffer.
float * | BindCpuBuffer ()
| Returns the address of CPU buffer.

## Static Public Member Functions

static CpuVertexBuffer * | Create (int numElements, int numVertices, void *deviceContext=NULL)
| Creator. Returns NULL if error.

## Protected Member Functions

| CpuVertexBuffer (int numElements, int numVertices)
| Constructor.

## Detailed Description

Concrete vertex buffer class for CPU subdivision.

CpuVertexBuffer implements the VertexBufferInterface. An instance of this buffer class can be passed to CpuEvaluator

Definition at line 42 of file cpuVertexBuffer.h.

## Constructor & Destructor Documentation

## ~CpuVertexBuffer()

~CpuVertexBuffer | ( |  | ) |

Destructor.

## CpuVertexBuffer()

CpuVertexBuffer | ( | int | numElements,
|  | int | numVertices )

protected

Constructor.

## Member Function Documentation

## BindCpuBuffer()

float * BindCpuBuffer | ( |  | ) |

Returns the address of CPU buffer.

## Create()

static CpuVertexBuffer * Create | ( | int | numElements,
|  | int | numVertices,
|  | void * | deviceContext = NULL )

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/cpuVertexBuffer.h