26 #ifndef vtkTextureObject_h
27 #define vtkTextureObject_h
29 #include "vtkRenderingOpenGLModule.h"
55 NumberOfDepthTextureCompareFunctions
64 NumberOfDepthTextureModes
87 NumberOfMinificationModes
121 vtkGetMacro(Width,
unsigned int);
122 vtkGetMacro(Height,
unsigned int);
123 vtkGetMacro(Depth,
unsigned int);
124 vtkGetMacro(Components,
int);
126 {
return this->Width*this->Height*this->Depth; }
129 vtkGetMacro(NumberOfDimensions,
int);
135 vtkGetMacro(Target,
unsigned int);
142 vtkGetMacro(Handle,
unsigned int);
159 void Activate(
unsigned int texUnit);
160 void Deactivate(
unsigned int texUnit);
177 void SendParameters();
179 vtkGetMacro(AutoParameters,
int);
192 bool Create1D(
int numComps,
194 bool shaderSupportsTextureInt);
202 bool Create2D(
unsigned int width,
unsigned int height,
int numComps,
204 bool shaderSupportsTextureInt);
210 bool CreateDepth(
unsigned int width,
219 bool CreateDepthFromRaw(
unsigned int width,
228 bool AllocateDepth(
unsigned int width,
unsigned int height,
235 bool Allocate1D(
unsigned int width,
int numComps,
int vtkType);
241 bool Allocate2D(
unsigned int width,
unsigned int height,
int numComps,
248 bool Allocate3D(
unsigned int width,
unsigned int height,
249 unsigned int depth,
int numComps,
259 bool Create3D(
unsigned int width,
unsigned int height,
unsigned int depth,
261 bool shaderSupportsTextureInt);
270 bool Create2D(
unsigned int width,
unsigned int height,
int numComps,
272 bool shaderSupportsTextureInt);
273 bool Create3D(
unsigned int width,
unsigned int height,
unsigned int depth,
274 int numComps,
int vtktype,
275 bool shaderSupportsTextureInt);
291 unsigned int GetInternalFormat(
int vtktype,
int numComps,
292 bool shaderSupportsTextureInt);
293 unsigned int GetFormat(
int vtktype,
int numComps,
294 bool shaderSupportsTextureInt);
304 vtkGetMacro(RequireDepthBufferFloat,
bool);
305 vtkGetMacro(SupportsDepthBufferFloat,
bool);
316 vtkGetMacro(RequireTextureFloat,
bool);
317 vtkGetMacro(SupportsTextureFloat,
bool);
328 vtkGetMacro(RequireTextureInteger,
bool);
329 vtkGetMacro(SupportsTextureInteger,
bool);
343 vtkGetMacro(WrapS,
int);
358 vtkGetMacro(WrapT,
int);
373 vtkGetMacro(WrapR,
int);
391 vtkGetMacro(MinificationFilter,
int);
403 vtkGetMacro(MagnificationFilter,
int);
412 { this->SetMagnificationFilter(val?Linear:Nearest); }
415 {
return this->MagnificationFilter==Linear; }
423 vtkSetVector4Macro(BorderColor,
float);
424 vtkGetVector4Macro(BorderColor,
float);
434 vtkGetMacro(Priority,
float);
443 vtkGetMacro(MinLOD,
float);
452 vtkGetMacro(MaxLOD,
float);
462 vtkGetMacro(BaseLevel,
int);
472 vtkGetMacro(MaxLevel,
int);
486 vtkGetMacro(DepthTextureCompare,
bool);
511 vtkGetMacro(DepthTextureCompareFunction,
int);
525 vtkGetMacro(DepthTextureMode,
int);
535 vtkGetMacro(GenerateMipmap,
bool);
544 static bool IsSupported(
546 bool requireTexFloat,
547 bool requireDepthFloat,
582 void CopyToFrameBuffer(
int srcXmin,
603 void CopyFromFrameBuffer(
int srcXmin,
622 void CreateTexture();
627 void DestroyTexture();
654 float BorderColor[4];