28 #ifndef vtkTextureObject_h
29 #define vtkTextureObject_h
31 #include "vtkRenderingOpenGLModule.h"
58 NumberOfDepthTextureCompareFunctions
67 NumberOfDepthTextureModes
90 NumberOfMinificationModes
122 vtkGetMacro(Width,
unsigned int);
123 vtkGetMacro(Height,
unsigned int);
124 vtkGetMacro(Depth,
unsigned int);
125 vtkGetMacro(Components,
int);
127 {
return this->Width*this->Height*this->Depth; }
130 vtkGetMacro(NumberOfDimensions,
int);
134 vtkGetMacro(Target,
unsigned int);
139 vtkGetMacro(Handle,
unsigned int);
152 void Activate(
unsigned int texUnit);
153 void Deactivate(
unsigned int texUnit);
165 void SendParameters();
166 vtkSetMacro(AutoParameters,
int);
167 vtkGetMacro(AutoParameters,
int);
178 bool Create1D(
int numComps,
180 bool shaderSupportsTextureInt);
187 bool Create2D(
unsigned int width,
unsigned int height,
int numComps,
189 bool shaderSupportsTextureInt);
195 bool CreateDepth(
unsigned int width,
204 bool CreateDepthFromRaw(
unsigned int width,
213 bool AllocateDepth(
unsigned int width,
unsigned int height,
219 bool Allocate1D(
unsigned int width,
int numComps,
int vtkType);
224 bool Allocate2D(
unsigned int width,
unsigned int height,
int numComps,
231 bool Allocate3D(
unsigned int width,
unsigned int height,
232 unsigned int depth,
int numComps,
241 bool Create3D(
unsigned int width,
unsigned int height,
unsigned int depth,
243 bool shaderSupportsTextureInt);
251 bool Create2D(
unsigned int width,
unsigned int height,
int numComps,
253 bool shaderSupportsTextureInt);
254 bool Create3D(
unsigned int width,
unsigned int height,
unsigned int depth,
255 int numComps,
int vtktype,
256 bool shaderSupportsTextureInt);
268 unsigned int GetInternalFormat(
int vtktype,
int numComps,
269 bool shaderSupportsTextureInt);
270 unsigned int GetFormat(
int vtktype,
int numComps,
271 bool shaderSupportsTextureInt);
277 vtkSetMacro(RequireDepthBufferFloat,
bool);
278 vtkGetMacro(RequireDepthBufferFloat,
bool);
279 vtkGetMacro(SupportsDepthBufferFloat,
bool);
286 vtkSetMacro(RequireTextureFloat,
bool);
287 vtkGetMacro(RequireTextureFloat,
bool);
288 vtkGetMacro(SupportsTextureFloat,
bool);
295 vtkSetMacro(RequireTextureInteger,
bool);
296 vtkGetMacro(RequireTextureInteger,
bool);
297 vtkGetMacro(SupportsTextureInteger,
bool);
304 vtkGetMacro(WrapS,
int);
305 vtkSetMacro(WrapS,
int);
312 vtkGetMacro(WrapT,
int);
313 vtkSetMacro(WrapT,
int);
320 vtkGetMacro(WrapR,
int);
321 vtkSetMacro(WrapR,
int);
330 vtkGetMacro(MinificationFilter,
int);
331 vtkSetMacro(MinificationFilter,
int);
337 vtkGetMacro(MagnificationFilter,
int);
338 vtkSetMacro(MagnificationFilter,
int);
345 { this->SetMagnificationFilter(val?Linear:Nearest); }
349 {
return this->MagnificationFilter==Linear; }
355 vtkSetVector4Macro(BorderColor,
float);
356 vtkGetVector4Macro(BorderColor,
float);
363 vtkSetMacro(Priority,
float);
364 vtkGetMacro(Priority,
float);
370 vtkSetMacro(MinLOD,
float);
371 vtkGetMacro(MinLOD,
float);
377 vtkSetMacro(MaxLOD,
float);
378 vtkGetMacro(MaxLOD,
float);
385 vtkSetMacro(BaseLevel,
int);
386 vtkGetMacro(BaseLevel,
int);
393 vtkSetMacro(MaxLevel,
int);
394 vtkGetMacro(MaxLevel,
int);
404 vtkGetMacro(DepthTextureCompare,
bool);
405 vtkSetMacro(DepthTextureCompare,
bool);
419 vtkGetMacro(DepthTextureCompareFunction,
int);
420 vtkSetMacro(DepthTextureCompareFunction,
int);
429 vtkGetMacro(DepthTextureMode,
int);
430 vtkSetMacro(DepthTextureMode,
int);
436 vtkGetMacro(GenerateMipmap,
bool);
437 vtkSetMacro(GenerateMipmap,
bool);
444 static bool IsSupported(
446 bool requireTexFloat,
447 bool requireDepthFloat,
477 void CopyToFrameBuffer(
int srcXmin,
497 void CopyFromFrameBuffer(
int srcXmin,
516 void CreateTexture();
519 void DestroyTexture();
546 float BorderColor[4];
bool SupportsTextureFloat
abstract base class for most VTK objects
int DepthTextureCompareFunction
bool GetLinearMagnification()
vtkWeakPointer< vtkRenderWindow > Context
record modification and/or execution time
dynamic, self-adjusting array of float
static bool IsSupported(vtkRenderWindow *renWin, bool requireTexFloat, bool requireDepthFloat, bool requireTexInt)
vtkTimeStamp SendParametersTime
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
bool SupportsDepthBufferFloat
void SetLinearMagnification(bool val)
static bool IsSupported(vtkRenderWindow *renWin)
abstracts an OpenGL pixel buffer object.
Interface class for querying and using OpenGL extensions.
bool RequireTextureInteger
abstracts an OpenGL texture object.
create a window for renderers to draw into
bool SupportsTextureInteger
bool RequireDepthBufferFloat