14 #ifndef vtkglBufferObject_h
15 #define vtkglBufferObject_h
17 #include "vtkRenderingOpenGL2Module.h"
41 ObjectType GetType()
const;
44 int GetHandle()
const;
47 bool IsReady()
const {
return Dirty ==
false; }
59 bool Upload(
const T &array, ObjectType
type);
63 bool Upload(
const T *array,
size_t numElements, ObjectType
type);
80 void ReleaseGraphicsResources();
88 bool UploadInternal(
const void *
buffer,
size_t size, ObjectType objectType);
103 this->Error =
"Refusing to upload empty array.";
106 return this->UploadInternal(&array[0],
107 array.size() *
sizeof(
typename T::value_type),
117 this->Error =
"Refusing to upload empty array.";
120 return this->UploadInternal(array,
121 numElements *
sizeof(T),
std::string GetError() const
Return a string describing errors.
GLuint GLuint GLsizei GLenum type
bool Upload(const T &array, ObjectType type)
Upload data to the buffer object.
bool IsReady() const
Determine if the buffer object is ready to be used.
GLsizei const GLchar ** string