21 #ifndef vtkPixelBufferObject_h
22 #define vtkPixelBufferObject_h
25 #include "vtkRenderingOpenGL2Module.h"
28 VTK_ABI_NAMESPACE_BEGIN
30 class vtkOpenGLExtensionManager;
84 vtkGetMacro(Usage,
int);
85 vtkSetMacro(Usage,
int);
100 unsigned int newdims[3];
101 newdims[0] = numtuples;
105 newinc[0] = increment;
108 return this->Upload3D(type, data, newdims, comps, newinc, 0,
nullptr);
123 unsigned int newdims[3];
124 newdims[0] = dims[0];
125 newdims[1] = dims[1];
128 newinc[0] = increments[0];
129 newinc[1] = increments[1];
131 return this->Upload3D(type, data, newdims, comps, newinc, 0,
nullptr);
143 bool Upload3D(
int type,
void*
data,
unsigned int dims[3],
int comps,
vtkIdType increments[3],
144 int components,
int* componentList);
152 vtkGetMacro(
Type,
int);
153 vtkSetMacro(
Type,
int);
160 vtkGetMacro(Components,
int);
161 vtkSetMacro(Components,
int);
169 vtkGetMacro(Size,
unsigned int);
170 vtkSetMacro(Size,
unsigned int);
171 void SetSize(
unsigned int nTups,
int nComps);
178 vtkGetMacro(Handle,
unsigned int);
188 unsigned int newdims[3];
193 newincrements[0] = increment;
194 newincrements[1] = 0;
195 newincrements[2] = 0;
196 return this->Download3D(type, data, newdims, numcomps, newincrements);
207 unsigned int newdims[3];
208 newdims[0] = dims[0];
209 newdims[1] = dims[1];
212 newincrements[0] = increments[0];
213 newincrements[1] = increments[1];
214 newincrements[2] = 0;
215 return this->Download3D(type, data, newdims, numcomps, newincrements);
225 int type,
void*
data,
unsigned int dims[3],
int numcomps,
vtkIdType increments[3]);
247 return this->MapBuffer(type, numtuples, comps, PACKED_BUFFER);
250 void*
MapPackedBuffer(
unsigned int numbytes) {
return this->MapBuffer(numbytes, PACKED_BUFFER); }
256 return this->MapBuffer(type, numtuples, comps, UNPACKED_BUFFER);
261 return this->MapBuffer(numbytes, UNPACKED_BUFFER);
283 void Bind(BufferType buffer);
292 void* MapBuffer(
int type,
unsigned int numtuples,
int comps, BufferType
mode);
293 void* MapBuffer(
unsigned int numbytes, BufferType
mode);
294 void* MapBuffer(BufferType
mode);
301 void UnmapBuffer(BufferType
mode);
306 void Allocate(
int vtkType,
unsigned int numtuples,
int comps, BufferType
mode);
311 void Allocate(
unsigned int nbytes, BufferType
mode);
316 void ReleaseMemory();
342 void DestroyBuffer();
357 VTK_ABI_NAMESPACE_END
bool Upload1D(int type, void *data, unsigned int numtuples, int comps, vtkIdType increment)
Upload data to PBO mapped.
bool Upload2D(int type, void *data, unsigned int dims[2], int comps, vtkIdType increments[2])
Update data to PBO mapped sourcing it from a 2D array.
vtkWeakPointer< vtkRenderWindow > Context
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.
bool Download1D(int type, void *data, unsigned int dim, int numcomps, vtkIdType increment)
Download data from pixel buffer to the 1D array.
void BindToPackedBuffer()
Convenience methods for binding.
bool Download2D(int type, void *data, unsigned int dims[2], int numcomps, vtkIdType increments[2])
Download data from pixel buffer to the 2D array.
void * MapPackedBuffer()
Convenience api for mapping buffers to app address space.
void * MapUnpackedBuffer(int type, unsigned int numtuples, int comps)
void * MapUnpackedBuffer(unsigned int numbytes)
void * MapPackedBuffer(int type, unsigned int numtuples, int comps)
a simple class to control print indentation
abstracts an OpenGL pixel buffer object.
void * MapPackedBuffer(unsigned int numbytes)
create a window for renderers to draw into
void * MapUnpackedBuffer()
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void UnmapUnpackedBuffer()
Convenience api for unmapping buffers from app address space.
void BindToUnPackedBuffer()
unsigned int BufferTarget