VTK
Public Member Functions
vtkgl::VertexArrayObject Class Reference

The VertexArrayObject class uses, or emulates, vertex array objects. More...

#include <vtkglVertexArrayObject.h>

List of all members.

Public Member Functions

 VertexArrayObject ()
 ~VertexArrayObject ()
void Bind ()
void Release ()
void ReleaseGraphicsResources ()
void ShaderProgramChanged ()
bool AddAttributeArray (vtkShaderProgram *program, BufferObject &buffer, const std::string &name, int offset, size_t stride, int elementType, int elementTupleSize, bool normalize)
bool AddAttributeArrayWithDivisor (vtkShaderProgram *program, BufferObject &buffer, const std::string &name, int offset, size_t stride, int elementType, int elementTupleSize, bool normalize, int divisor, bool isMatrix)
bool AddAttributeMatrixWithDivisor (vtkShaderProgram *program, BufferObject &buffer, const std::string &name, int offset, size_t stride, int elementType, int elementTupleSize, bool normalize, int divisor)
bool RemoveAttributeArray (const std::string &name)
void SetForceEmulation (bool val)

Detailed Description

The VertexArrayObject class uses, or emulates, vertex array objects.

These are extremely useful for setup/tear down of vertex attributes, and can offer significant performance benefits when the hardware supports them.

It should be noted that this object is very lightweight, and it assumes the objects being used are correctly set up. Even without support for VAOs this class caches the array locations, types, etc and avoids repeated look ups. It it bound to a single ShaderProgram object.

Definition at line 37 of file vtkglVertexArrayObject.h.


Constructor & Destructor Documentation


Member Function Documentation

bool vtkgl::VertexArrayObject::AddAttributeArray ( vtkShaderProgram program,
BufferObject buffer,
const std::string &  name,
int  offset,
size_t  stride,
int  elementType,
int  elementTupleSize,
bool  normalize 
) [inline]

Definition at line 51 of file vtkglVertexArrayObject.h.

bool vtkgl::VertexArrayObject::AddAttributeArrayWithDivisor ( vtkShaderProgram program,
BufferObject buffer,
const std::string &  name,
int  offset,
size_t  stride,
int  elementType,
int  elementTupleSize,
bool  normalize,
int  divisor,
bool  isMatrix 
)
bool vtkgl::VertexArrayObject::AddAttributeMatrixWithDivisor ( vtkShaderProgram program,
BufferObject buffer,
const std::string &  name,
int  offset,
size_t  stride,
int  elementType,
int  elementTupleSize,
bool  normalize,
int  divisor 
)
bool vtkgl::VertexArrayObject::RemoveAttributeArray ( const std::string &  name)

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