VTK
vtkDataTransferHelper.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkDataTransferHelper.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
31#ifndef vtkDataTransferHelper_h
32#define vtkDataTransferHelper_h
33
34#include "vtkRenderingOpenGL2Module.h" // For export macro
35#include "vtkObject.h"
36#include "vtkWeakPointer.h" // needed for vtkWeakPointer.
37#include "vtkSmartPointer.h" // needed for vtkSmartPointer.
38
39class vtkDataArray;
42class vtkRenderWindow;
43
44class VTKRENDERINGOPENGL2_EXPORT vtkDataTransferHelper : public vtkObject
45{
46public:
49 void PrintSelf(ostream& os, vtkIndent indent);
50
52
62
64
74 vtkSetVector6Macro(CPUExtent, int);
75 vtkGetVector6Macro(CPUExtent, int);
77
79
86 vtkSetVector6Macro(GPUExtent, int);
87 vtkGetVector6Macro(GPUExtent, int);
89
91
98 vtkSetVector6Macro(TextureExtent, int);
99 vtkGetVector6Macro(TextureExtent, int);
101
108
113
118
123
125
138 vtkSetMacro(MinTextureDimension,int);
139 vtkGetMacro(MinTextureDimension,int);
141
143
146 vtkGetObjectMacro(Array, vtkDataArray);
147 void SetArray(vtkDataArray* array);
149
151
154 vtkGetObjectMacro(Texture, vtkTextureObject);
157
178 bool Upload(int components=0,
179 int *componentList=NULL);
180
204 bool Download();
205
207
215
218
222 static bool IsSupported(vtkRenderWindow* renWin);
223
224protected:
227
228 int CPUExtent[6];
229 int GPUExtent[6];
230 int TextureExtent[6];
231
233 vtkTextureObject* Texture;
234 vtkDataArray* Array;
235 bool ShaderSupportsTextureInt;
236 int MinTextureDimension;
237
239
241
242 // We try to reuse the PBO if possible.
244private:
245 vtkDataTransferHelper(const vtkDataTransferHelper&) VTK_DELETE_FUNCTION;
246 void operator=(const vtkDataTransferHelper&) VTK_DELETE_FUNCTION;
247
248};
249
250#endif
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
is a helper class that aids in transferring data between CPU memory and GPU memory.
bool GetTextureExtentIsValid()
Tells if TextureExtent is valid.
bool GetGPUExtentIsValid()
Tells if GPUExtent is valid.
void SetContext(vtkRenderWindow *context)
Get/Set the context.
static vtkDataTransferHelper * New()
bool Download()
old comment: Download Extent from GPU data buffer to CPU.
vtkRenderWindow * GetContext()
bool GetExtentIsValid(int *extent)
Tells if the given extent (6 int) is valid.
bool GetCPUExtentIsValid()
Tells if CPUExtent is valid.
bool DownloadAsync1()
Splits the download in two operations.
bool GetShaderSupportsTextureInt()
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static bool IsSupported(vtkRenderWindow *renWin)
Returns if the context supports the required extensions.
void SetTexture(vtkTextureObject *texture)
void SetArray(vtkDataArray *array)
bool Upload(int components=0, int *componentList=NULL)
Old comment.
vtkPixelBufferObject * GetPBO()
void SetShaderSupportsTextureInt(bool value)
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
abstracts an OpenGL pixel buffer object.
create a window for renderers to draw into
abstracts an OpenGL texture object.
@ value
Definition: vtkX3D.h:220
@ extent
Definition: vtkX3D.h:345
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.