24 #ifndef vtkTextureObject_h 25 #define vtkTextureObject_h 28 #include "vtkRenderingOpenGL2Module.h" 54 NumberOfDepthTextureCompareFunctions
59 #ifndef GL_ES_VERSION_3_0 60 enum { ClampToEdge = 0,
Repeat, MirroredRepeat, ClampToBorder, NumberOfWrapModes };
80 NumberOfMinificationModes
119 vtkGetMacro(Width,
unsigned int);
120 vtkGetMacro(Height,
unsigned int);
121 vtkGetMacro(Depth,
unsigned int);
122 vtkGetMacro(Samples,
unsigned int);
123 vtkGetMacro(Components,
int);
124 unsigned int GetTuples() {
return this->Width * this->Height * this->Depth; }
127 vtkGetMacro(NumberOfDimensions,
int);
130 vtkSetMacro(Samples,
unsigned int);
136 vtkGetMacro(
Target,
unsigned int);
143 vtkGetMacro(Handle,
unsigned int);
149 int GetTextureUnit();
163 virtual void Activate();
173 virtual void ReleaseGraphicsResources(
vtkWindow* win);
187 void SendParameters();
194 vtkSetMacro(AutoParameters,
int);
195 vtkGetMacro(AutoParameters,
int);
196 vtkBooleanMacro(AutoParameters,
int);
203 bool Create2DFromRaw(
204 unsigned int width,
unsigned int height,
int numComps,
int dataType,
void*
data);
211 bool CreateDepthFromRaw(
212 unsigned int width,
unsigned int height,
int internalFormat,
int rawType,
void* raw);
218 bool CreateTextureBuffer(
226 bool CreateCubeFromRaw(
227 unsigned int width,
unsigned int height,
int numComps,
int dataType,
void*
data[6]);
230 #ifndef GL_ES_VERSION_3_0 247 bool Create1DFromRaw(
unsigned int width,
int numComps,
int dataType,
void*
data);
257 bool shaderSupportsTextureInt);
265 bool Create3D(
unsigned int width,
unsigned int height,
unsigned int depth,
int numComps,
272 bool Create3DFromRaw(
unsigned int width,
unsigned int height,
unsigned int depth,
int numComps,
273 int dataType,
void*
data);
281 bool AllocateProxyTexture3D(
unsigned int const width,
unsigned int const height,
282 unsigned int const depth,
int const numComps,
int const dataType);
303 bool AllocateDepth(
unsigned int width,
unsigned int height,
int internalFormat);
308 bool AllocateDepthStencil(
unsigned int width,
unsigned int height);
314 bool Allocate1D(
unsigned int width,
int numComps,
int vtkType);
321 unsigned int width,
unsigned int height,
int numComps,
int vtkType,
int level = 0);
328 unsigned int width,
unsigned int height,
unsigned int depth,
int numComps,
int vtkType);
334 bool Create2D(
unsigned int width,
unsigned int height,
int numComps,
int vtktype,
bool)
336 return this->Allocate2D(width,
height, numComps, vtktype);
339 unsigned int width,
unsigned int height,
unsigned int depth,
int numComps,
int vtktype,
bool)
341 return this->Allocate3D(width,
height, depth, numComps, vtktype);
348 int GetVTKDataType();
354 int GetDataType(
int vtk_scalar_type);
355 void SetDataType(
unsigned int glType);
356 int GetDefaultDataType(
int vtk_scalar_type);
365 unsigned int GetInternalFormat(
int vtktype,
int numComps,
bool shaderSupportsTextureInt);
366 void SetInternalFormat(
unsigned int glInternalFormat);
367 unsigned int GetDefaultInternalFormat(
int vtktype,
int numComps,
bool shaderSupportsTextureInt);
376 unsigned int GetFormat(
int vtktype,
int numComps,
bool shaderSupportsTextureInt);
377 void SetFormat(
unsigned int glFormat);
378 unsigned int GetDefaultFormat(
int vtktype,
int numComps,
bool shaderSupportsTextureInt);
389 void ResetFormatAndType();
391 unsigned int GetMinificationFilterMode(
int vtktype);
392 unsigned int GetMagnificationFilterMode(
int vtktype);
393 unsigned int GetWrapSMode(
int vtktype);
394 unsigned int GetWrapTMode(
int vtktype);
395 unsigned int GetWrapRMode(
int vtktype);
404 vtkSetMacro(RequireDepthBufferFloat,
bool);
405 vtkGetMacro(RequireDepthBufferFloat,
bool);
406 vtkGetMacro(SupportsDepthBufferFloat,
bool);
416 vtkSetMacro(RequireTextureFloat,
bool);
417 vtkGetMacro(RequireTextureFloat,
bool);
418 vtkGetMacro(SupportsTextureFloat,
bool);
428 vtkSetMacro(RequireTextureInteger,
bool);
429 vtkGetMacro(RequireTextureInteger,
bool);
430 vtkGetMacro(SupportsTextureInteger,
bool);
444 vtkGetMacro(WrapS,
int);
445 vtkSetMacro(WrapS,
int);
459 vtkGetMacro(WrapT,
int);
460 vtkSetMacro(WrapT,
int);
474 vtkGetMacro(WrapR,
int);
475 vtkSetMacro(WrapR,
int);
492 vtkGetMacro(MinificationFilter,
int);
493 vtkSetMacro(MinificationFilter,
int);
504 vtkGetMacro(MagnificationFilter,
int);
505 vtkSetMacro(MagnificationFilter,
int);
522 vtkSetVector4Macro(BorderColor,
float);
523 vtkGetVector4Macro(BorderColor,
float);
531 vtkSetMacro(MinLOD,
float);
532 vtkGetMacro(MinLOD,
float);
540 vtkSetMacro(MaxLOD,
float);
541 vtkGetMacro(MaxLOD,
float);
550 vtkSetMacro(BaseLevel,
int);
551 vtkGetMacro(BaseLevel,
int);
560 vtkSetMacro(MaxLevel,
int);
561 vtkGetMacro(MaxLevel,
int);
575 vtkGetMacro(DepthTextureCompare,
bool);
576 vtkSetMacro(DepthTextureCompare,
bool);
600 vtkGetMacro(DepthTextureCompareFunction,
int);
601 vtkSetMacro(DepthTextureCompareFunction,
int);
610 vtkGetMacro(GenerateMipmap,
bool);
611 vtkSetMacro(GenerateMipmap,
bool);
620 vtkSetMacro(MaximumAnisotropicFiltering,
float);
621 vtkGetMacro(MaximumAnisotropicFiltering,
float);
642 int GetMaximumTextureSize3D();
669 void CopyToFrameBuffer(
int srcXmin,
int srcYmin,
int srcXmax,
int srcYmax,
int dstXmin,
670 int dstYmin,
int dstXmax,
int dstYmax,
int dstSizeX,
int dstSizeY,
vtkShaderProgram* program,
673 void CopyToFrameBuffer(
int srcXmin,
int srcYmin,
int srcXmax,
int srcYmax,
int dstXmin,
677 void CopyToFrameBuffer(
692 void CopyFromFrameBuffer(
693 int srcXmin,
int srcYmin,
int dstXmin,
int dstYmin,
int width,
int height);
707 void GetShiftAndScale(
float& shift,
float&
scale);
711 void Resize(
unsigned int width,
unsigned int height);
720 vtkGetMacro(UseSRGBColorSpace,
bool);
721 vtkSetMacro(UseSRGBColorSpace,
bool);
722 vtkBooleanMacro(UseSRGBColorSpace,
bool);
733 void AssignToExistingTexture(
unsigned int handle,
unsigned int target);
744 void CreateTexture();
749 void DestroyTexture();
786 float BorderColor[4];
bool SupportsTextureFloat
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph *>::edge_descriptor e, vtkGraph *)
abstract base class for most VTK objects
int DepthTextureCompareFunction
vtkOpenGLHelper * ShaderProgram
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
unsigned int GetTuples()
Get the texture dimensions.
bool GetLinearMagnification()
record modification and/or execution time
unsigned int InternalFormat
vtkTimeStamp SendParametersTime
window superclass for vtkRenderWindow
a simple class to control print indentation
The VertexArrayObject class uses, or emulates, vertex array objects.
bool SupportsDepthBufferFloat
vtkWeakPointer< vtkOpenGLRenderWindow > Context
void SetLinearMagnification(bool val)
Tells if the magnification mode is linear (true) or nearest (false).
abstracts an OpenGL pixel buffer object.
bool Create2D(unsigned int width, unsigned int height, int numComps, int vtktype, bool)
Create texture without uploading any data.
vtkOpenGLBufferObject * BufferObject
static bool IsSupported(vtkOpenGLRenderWindow *, bool, bool, bool)
Returns if the context supports the required extensions.
bool RequireTextureInteger
abstracts an OpenGL texture object.
float MaximumAnisotropicFiltering
static bool IsSupported(vtkOpenGLRenderWindow *)
Check for feature support, without any optional features.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkGenericOpenGLResourceFreeCallback * ResourceCallback
bool SupportsTextureInteger
bool RequireDepthBufferFloat
bool Create3D(unsigned int width, unsigned int height, unsigned int depth, int numComps, int vtktype, bool)
Create texture without uploading any data.
The ShaderProgram uses one or more Shader objects.