33 #ifndef vtkPixelBufferObject_h
34 #define vtkPixelBufferObject_h
37 #include "vtkRenderingOpenGL2Module.h"
41 class vtkOpenGLExtensionManager;
95 vtkGetMacro(Usage,
int);
96 vtkSetMacro(Usage,
int);
111 unsigned int newdims[3];
112 newdims[0] = numtuples;
116 newinc[0] = increment;
119 return this->Upload3D(type, data, newdims, comps, newinc, 0,
nullptr);
134 unsigned int newdims[3];
135 newdims[0] = dims[0];
136 newdims[1] = dims[1];
139 newinc[0] = increments[0];
140 newinc[1] = increments[1];
142 return this->Upload3D(type, data, newdims, comps, newinc, 0,
nullptr);
154 bool Upload3D(
int type,
void*
data,
unsigned int dims[3],
int comps,
vtkIdType increments[3],
155 int components,
int* componentList);
163 vtkGetMacro(
Type,
int);
164 vtkSetMacro(
Type,
int);
171 vtkGetMacro(Components,
int);
172 vtkSetMacro(Components,
int);
180 vtkGetMacro(Size,
unsigned int);
181 vtkSetMacro(Size,
unsigned int);
182 void SetSize(
unsigned int nTups,
int nComps);
189 vtkGetMacro(Handle,
unsigned int);
199 unsigned int newdims[3];
204 newincrements[0] = increment;
205 newincrements[1] = 0;
206 newincrements[2] = 0;
207 return this->Download3D(type, data, newdims, numcomps, newincrements);
218 unsigned int newdims[3];
219 newdims[0] = dims[0];
220 newdims[1] = dims[1];
223 newincrements[0] = increments[0];
224 newincrements[1] = increments[1];
225 newincrements[2] = 0;
226 return this->Download3D(type, data, newdims, numcomps, newincrements);
236 int type,
void*
data,
unsigned int dims[3],
int numcomps,
vtkIdType increments[3]);
258 return this->MapBuffer(type, numtuples, comps, PACKED_BUFFER);
261 void*
MapPackedBuffer(
unsigned int numbytes) {
return this->MapBuffer(numbytes, PACKED_BUFFER); }
267 return this->MapBuffer(type, numtuples, comps, UNPACKED_BUFFER);
272 return this->MapBuffer(numbytes, UNPACKED_BUFFER);
294 void Bind(BufferType buffer);
303 void* MapBuffer(
int type,
unsigned int numtuples,
int comps, BufferType
mode);
304 void* MapBuffer(
unsigned int numbytes, BufferType
mode);
305 void* MapBuffer(BufferType
mode);
312 void UnmapBuffer(BufferType
mode);
317 void Allocate(
int vtkType,
unsigned int numtuples,
int comps, BufferType
mode);
322 void Allocate(
unsigned int nbytes, BufferType
mode);
327 void ReleaseMemory();
353 void DestroyBuffer();
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