3 #ifndef vtkOpenGLBufferObject_h
4 #define vtkOpenGLBufferObject_h
7 #include "vtkRenderingOpenGL2Module.h"
11 VTK_ABI_NAMESPACE_BEGIN
38 ObjectType GetType()
const;
41 void SetType(ObjectType
value);
44 int GetHandle()
const;
47 bool IsReady()
const {
return this->Dirty ==
false; }
50 bool GenerateBuffer(ObjectType
type);
62 bool Upload(
const T& array, ObjectType
type);
66 bool Upload(
const T* array,
size_t numElements, ObjectType
type);
82 void ReleaseGraphicsResources();
95 bool UploadInternal(
const void* buffer,
size_t size,
ObjectType objectType);
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);
129 VTK_ABI_NAMESPACE_END
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::string GetError() const
Return a string describing errors.
a simple class to control print indentation
abstract superclass for arrays of numeric data
object to represent cell connectivity
bool IsReady() const
Determine if the buffer object is ready to be used.
bool Upload(const T &array, ObjectType type)
Upload data to the buffer object.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
bool UploadInternal(const void *buffer, size_t size, ObjectType objectType)
represent and manipulate 3D points