Go to the documentation of this file.
32 #ifndef vtkPixelBufferObject_h
33 #define vtkPixelBufferObject_h
36 #include "vtkRenderingOpenGL2Module.h"
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,
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);
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); }
297 unsigned int numtuples,
331 unsigned int BufferTarget;
GLsizei GLsizei GLenum GLenum const GLvoid * data
bool Download1D(int type, void *data, unsigned int dim, int numcomps, vtkIdType increment)
void BindToPackedBuffer()
bool Upload3D(int type, void *data, unsigned int dims[3], int comps, vtkIdType increments[3], int components, int *componentList)
bool Upload2D(int type, void *data, unsigned int dims[2], int comps, vtkIdType increments[2])
void * MapBuffer(int type, unsigned int numtuples, int comps, BufferType mode)
static bool IsSupported(vtkRenderWindow *renWin)
void Allocate(unsigned int nbytes, BufferType mode)
#define vtkTypeMacro(thisClass, superclass)
void PrintSelf(ostream &os, vtkIndent indent)
void Allocate(int vtkType, unsigned int numtuples, int comps, BufferType mode)
abstract base class for most VTK objects
void * MapUnpackedBuffer(int type, unsigned int numtuples, int comps)
static vtkPixelBufferObject * New()
void SetSize(unsigned int nTups, int nComps)
bool Download2D(int type, void *data, unsigned int dims[2], int numcomps, vtkIdType increments[2])
bool LoadRequiredExtensions(vtkRenderWindow *renWin)
bool Download3D(int type, void *data, unsigned int dims[3], int numcomps, vtkIdType increments[3])
void UnmapBuffer(BufferType mode)
Interface class for querying and using OpenGL extensions.
void Bind(BufferType buffer)
a simple class to control print indentation
void * MapPackedBuffer(int type, unsigned int numtuples, int comps)
void * MapBuffer(unsigned int numbytes, BufferType mode)
#define vtkGetMacro(name, type)
vtkRenderWindow * GetContext()
void * MapUnpackedBuffer(unsigned int numbytes)
void * MapPackedBuffer(unsigned int numbytes)
vtkSetMacro(IgnoreDriverBugs, bool)
void * MapUnpackedBuffer()
void BindToUnPackedBuffer()
void UnmapUnpackedBuffer()
create a window for renderers to draw into
void * MapBuffer(BufferType mode)
GLenum GLenum GLuint components
bool Upload1D(int type, void *data, unsigned int numtuples, int comps, vtkIdType increment)
GLuint GLuint GLsizei GLenum type
VTKRENDERINGOPENGL_EXPORT PFNGLUNMAPBUFFERPROC UnmapBuffer
void SetContext(vtkRenderWindow *context)
abstracts an OpenGL pixel buffer object.
VTKRENDERINGOPENGL_EXPORT PFNGLMAPBUFFERPROC MapBuffer