29 #ifndef vtkTextureObject_h
30 #define vtkTextureObject_h
32 #include "vtkRenderingOpenGLModule.h"
58 NumberOfDepthTextureCompareFunctions
67 NumberOfDepthTextureModes
90 NumberOfMinificationModes
124 vtkGetMacro(Width,
unsigned int);
125 vtkGetMacro(Height,
unsigned int);
126 vtkGetMacro(Depth,
unsigned int);
127 vtkGetMacro(Components,
int);
129 {
return this->Width*this->Height*this->Depth; }
132 vtkGetMacro(NumberOfDimensions,
int);
138 vtkGetMacro(Target,
unsigned int);
145 vtkGetMacro(Handle,
unsigned int);
162 void Activate(
unsigned int texUnit);
163 void Deactivate(
unsigned int texUnit);
180 void SendParameters();
182 vtkGetMacro(AutoParameters,
int);
195 bool Create1D(
int numComps,
197 bool shaderSupportsTextureInt);
205 bool Create2D(
unsigned int width,
unsigned int height,
int numComps,
207 bool shaderSupportsTextureInt);
213 bool CreateDepth(
unsigned int width,
222 bool CreateDepthFromRaw(
unsigned int width,
231 bool AllocateDepth(
unsigned int width,
unsigned int height,
238 bool Allocate1D(
unsigned int width,
int numComps,
int vtkType);
244 bool Allocate2D(
unsigned int width,
unsigned int height,
int numComps,
251 bool Allocate3D(
unsigned int width,
unsigned int height,
252 unsigned int depth,
int numComps,
262 bool Create3D(
unsigned int width,
unsigned int height,
unsigned int depth,
264 bool shaderSupportsTextureInt);
273 bool Create2D(
unsigned int width,
unsigned int height,
int numComps,
275 bool shaderSupportsTextureInt);
276 bool Create3D(
unsigned int width,
unsigned int height,
unsigned int depth,
277 int numComps,
int vtktype,
278 bool shaderSupportsTextureInt);
294 unsigned int GetInternalFormat(
int vtktype,
int numComps,
295 bool shaderSupportsTextureInt);
296 unsigned int GetFormat(
int vtktype,
int numComps,
297 bool shaderSupportsTextureInt);
307 vtkGetMacro(RequireDepthBufferFloat,
bool);
308 vtkGetMacro(SupportsDepthBufferFloat,
bool);
319 vtkGetMacro(RequireTextureFloat,
bool);
320 vtkGetMacro(SupportsTextureFloat,
bool);
331 vtkGetMacro(RequireTextureInteger,
bool);
332 vtkGetMacro(SupportsTextureInteger,
bool);
346 vtkGetMacro(WrapS,
int);
361 vtkGetMacro(WrapT,
int);
376 vtkGetMacro(WrapR,
int);
394 vtkGetMacro(MinificationFilter,
int);
406 vtkGetMacro(MagnificationFilter,
int);
415 { this->SetMagnificationFilter(val?Linear:Nearest); }
418 {
return this->MagnificationFilter==Linear; }
426 vtkSetVector4Macro(BorderColor,
float);
427 vtkGetVector4Macro(BorderColor,
float);
437 vtkGetMacro(Priority,
float);
446 vtkGetMacro(MinLOD,
float);
455 vtkGetMacro(MaxLOD,
float);
465 vtkGetMacro(BaseLevel,
int);
475 vtkGetMacro(MaxLevel,
int);
489 vtkGetMacro(DepthTextureCompare,
bool);
514 vtkGetMacro(DepthTextureCompareFunction,
int);
528 vtkGetMacro(DepthTextureMode,
int);
538 vtkGetMacro(GenerateMipmap,
bool);
547 static bool IsSupported(
549 bool requireTexFloat,
550 bool requireDepthFloat,
585 void CopyToFrameBuffer(
int srcXmin,
606 void CopyFromFrameBuffer(
int srcXmin,
625 void CreateTexture();
630 void DestroyTexture();
657 float BorderColor[4];