32 #ifndef __vtkPixelBufferObject_h
33 #define __vtkPixelBufferObject_h
101 unsigned int numtuples,
int comps,
vtkIdType increment)
103 unsigned int newdims[3];
104 newdims[0] = numtuples;
108 newinc[0] = increment;
111 return this->Upload3D(type, data, newdims, comps, newinc,0,0);
122 unsigned int dims[2],
126 unsigned int newdims[3];
127 newdims[0] = dims[0];
128 newdims[1] = dims[1];
131 newinc[0] = increments[0];
132 newinc[1] = increments[1];
134 return this->Upload3D(type, data, newdims, comps, newinc,0,0);
145 unsigned int dims[3],
int comps,
170 void SetSize(
unsigned int nTups,
int nComps);
186 unsigned int newdims[3];
191 newincrements[0] = increment;
192 newincrements[1] = 0;
193 newincrements[2] = 0;
194 return this->Download3D(type, data, newdims, numcomps, newincrements);
203 unsigned int dims[2],
206 unsigned int newdims[3];
207 newdims[0] = dims[0];
208 newdims[1] = dims[1];
211 newincrements[0] = increments[0];
212 newincrements[1] = increments[1];
213 newincrements[2] = 0;
214 return this->Download3D(type, data, newdims, numcomps, newincrements);
221 bool Download3D(
int type,
void*
data,
222 unsigned int dims[3],
229 { this->Bind(PACKED_BUFFER); }
233 { this->Bind(UNPACKED_BUFFER); }
242 {
return this->
MapBuffer(PACKED_BUFFER); }
246 {
return this->
MapBuffer(type, numtuples, comps, PACKED_BUFFER); }
249 {
return this->
MapBuffer(numbytes, PACKED_BUFFER); }
252 {
return this->
MapBuffer(UNPACKED_BUFFER); }
255 {
return this->
MapBuffer(type, numtuples, comps, UNPACKED_BUFFER); }
258 {
return this->
MapBuffer(numbytes, UNPACKED_BUFFER); }
279 void Bind(BufferType
buffer);
300 unsigned int numtuples,
313 void ReleaseMemory();
333 void DestroyBuffer();
bool Upload1D(int type, void *data, unsigned int numtuples, int comps, vtkIdType increment)
GLsizei GLsizei GLenum GLenum const GLvoid * data
bool Upload2D(int type, void *data, unsigned int dims[2], int comps, vtkIdType increments[2])
GLuint GLuint GLsizei GLenum type
vtkWeakPointer< vtkRenderWindow > Context
abstract base class for most VTK objects
bool Download1D(int type, void *data, unsigned int dim, int numcomps, vtkIdType increment)
void BindToPackedBuffer()
#define vtkGetMacro(name, type)
GLenum GLenum GLuint components
bool Download2D(int type, void *data, unsigned int dims[2], int numcomps, vtkIdType increments[2])
#define vtkTypeMacro(thisClass, superclass)
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
#define VTKRENDERINGOPENGL_EXPORT
VTKRENDERINGOPENGL_EXPORT PFNGLMAPBUFFERPROC MapBuffer
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()
unsigned int BufferTarget
VTKRENDERINGOPENGL_EXPORT PFNGLUNMAPBUFFERPROC UnmapBuffer
#define vtkSetMacro(name, type)