32 #ifndef vtkPixelBufferObject_h
33 #define vtkPixelBufferObject_h
86 vtkGetMacro(Usage,
int);
87 vtkSetMacro(Usage,
int);
99 unsigned int numtuples,
int comps,
vtkIdType increment)
101 unsigned int newdims[3];
102 newdims[0] = numtuples;
106 newinc[0] = increment;
109 return this->Upload3D(type, data, newdims, comps, newinc,0,0);
120 unsigned int dims[2],
124 unsigned int newdims[3];
125 newdims[0] = dims[0];
126 newdims[1] = dims[1];
129 newinc[0] = increments[0];
130 newinc[1] = increments[1];
132 return this->Upload3D(type, data, newdims, comps, newinc,0,0);
143 unsigned int dims[3],
int comps,
153 vtkGetMacro(Type,
int);
154 vtkSetMacro(Type,
int);
159 vtkGetMacro(Components,
int);
160 vtkSetMacro(Components,
int);
166 vtkGetMacro(Size,
unsigned int);
167 vtkSetMacro(Size,
unsigned int);
168 void SetSize(
unsigned int nTups,
int nComps);
173 vtkGetMacro(Handle,
unsigned int);
184 unsigned int newdims[3];
189 newincrements[0] = increment;
190 newincrements[1] = 0;
191 newincrements[2] = 0;
192 return this->Download3D(type, data, newdims, numcomps, newincrements);
201 unsigned int dims[2],
204 unsigned int newdims[3];
205 newdims[0] = dims[0];
206 newdims[1] = dims[1];
209 newincrements[0] = increments[0];
210 newincrements[1] = increments[1];
211 newincrements[2] = 0;
212 return this->Download3D(type, data, newdims, numcomps, newincrements);
219 bool Download3D(
int type,
void*
data,
220 unsigned int dims[3],
227 { this->Bind(PACKED_BUFFER); }
231 { this->Bind(UNPACKED_BUFFER); }
240 {
return this->MapBuffer(PACKED_BUFFER); }
244 {
return this->MapBuffer(type, numtuples, comps, PACKED_BUFFER); }
247 {
return this->MapBuffer(numbytes, PACKED_BUFFER); }
250 {
return this->MapBuffer(UNPACKED_BUFFER); }
253 {
return this->MapBuffer(type, numtuples, comps, UNPACKED_BUFFER); }
256 {
return this->MapBuffer(numbytes, UNPACKED_BUFFER); }
262 { this->UnmapBuffer(UNPACKED_BUFFER); }
266 { this->UnmapBuffer(PACKED_BUFFER); }
276 void Bind(BufferType buffer);
283 void *MapBuffer(
int type,
unsigned int numtuples,
int comps, BufferType
mode);
284 void *MapBuffer(
unsigned int numbytes, BufferType
mode);
285 void *MapBuffer(BufferType
mode);
290 void UnmapBuffer(BufferType
mode);
297 unsigned int numtuples,
310 void ReleaseMemory();
328 void DestroyBuffer();
331 unsigned int BufferTarget;
bool Upload1D(int type, void *data, unsigned int numtuples, int comps, vtkIdType increment)
bool Upload2D(int type, void *data, unsigned int dims[2], int comps, vtkIdType increments[2])
abstract base class for most VTK objects
bool Download1D(int type, void *data, unsigned int dim, int numcomps, vtkIdType increment)
void BindToPackedBuffer()
#define VTKRENDERINGOPENGL2_EXPORT
bool Download2D(int type, void *data, unsigned int dims[2], int numcomps, vtkIdType increments[2])
void * MapUnpackedBuffer(int type, unsigned int numtuples, int comps)
virtual void PrintSelf(ostream &os, vtkIndent indent)
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)
Interface class for querying and using OpenGL extensions.
create a window for renderers to draw into
void * MapUnpackedBuffer()
void UnmapUnpackedBuffer()
void BindToUnPackedBuffer()