3#ifndef vtkOpenGLBufferObject_h
4#define vtkOpenGLBufferObject_h
7#include "vtkRenderingOpenGL2Module.h"
11VTK_ABI_NAMESPACE_BEGIN
47 bool IsReady()
const {
return this->Dirty ==
false; }
66 bool Upload(
const T* array,
size_t numElements,
ObjectType type);
110 this->
Error =
"Refusing to upload empty array.";
114 return this->
UploadInternal(&array[0], array.size() *
sizeof(
typename T::value_type), objectType);
123 this->
Error =
"Refusing to upload empty array.";
126 return this->
UploadInternal(array, numElements *
sizeof(T), objectType);
object to represent cell connectivity
abstract superclass for arrays of numeric data
a simple class to control print indentation
abstract base class for most VTK objects
void SetType(ObjectType value)
Set the type of the buffer object.
void ReleaseGraphicsResources()
bool IsReady() const
Determine if the buffer object is ready to be used.
bool Release()
Release the buffer.
ObjectType GetType() const
Get the type of the buffer object.
~vtkOpenGLBufferObject() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool Bind()
Bind the buffer object ready for rendering.
bool UploadInternal(const void *buffer, size_t size, ObjectType objectType)
bool Upload(const T &array, ObjectType type)
Upload data to the buffer object.
bool GenerateBuffer(ObjectType type)
Generate the opengl buffer for this Handle.
int GetHandle() const
Get the handle of the buffer object.
static vtkOpenGLBufferObject * New()
std::string GetError() const
Return a string describing errors.
represent and manipulate 3D points