Loading...
Searching...
No Matches
GLVertexBuffer Class Reference

Concrete vertex buffer class for GLSL subdivision and OpenGL drawing. More...

`#include <glVertexBuffer.h>`

## Public Member Functions

| ~GLVertexBuffer ()
| 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.
GLuint | BindVBO (void *deviceContext=NULL)
| Returns the GL buffer object.

## Static Public Member Functions

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

## Protected Member Functions

| GLVertexBuffer (int numElements, int numVertices)
| Constructor.
bool | allocate ()

## Detailed Description

Concrete vertex buffer class for GLSL subdivision and OpenGL drawing.

GLVertexBuffer implements GLVertexBufferInterface. An instance of this buffer class can be passed to OsdGLComputeEvaluator.

Definition at line 44 of file glVertexBuffer.h.

## Constructor & Destructor Documentation

## ~GLVertexBuffer()

~GLVertexBuffer | ( |  | ) |

Destructor.

## GLVertexBuffer()

GLVertexBuffer | ( | int | numElements,
|  | int | numVertices )

protected

Constructor.

## Member Function Documentation

## allocate()

bool allocate | ( |  | ) |

protected

Allocates VBO for this buffer. Returns true if success.

## BindVBO()

GLuint BindVBO | ( | void * | deviceContext = NULL | ) |

Returns the GL buffer object.

## Create()

static GLVertexBuffer * 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/glVertexBuffer.h