27 #ifndef vtkTextureObject_h 28 #define vtkTextureObject_h 30 #include "vtkRenderingOpenGL2Module.h" 59 NumberOfDepthTextureCompareFunctions
64 #if GL_ES_VERSION_3_0 != 1 92 NumberOfMinificationModes
123 NumberOfDepthModeFormats
149 vtkGetMacro(Width,
unsigned int);
150 vtkGetMacro(Height,
unsigned int);
151 vtkGetMacro(Depth,
unsigned int);
152 vtkGetMacro(Components,
int);
154 {
return this->Width*this->Height*this->Depth; }
157 vtkGetMacro(NumberOfDimensions,
int);
163 vtkGetMacro(Target,
unsigned int);
170 vtkGetMacro(Handle,
unsigned int);
176 int GetTextureUnit();
201 void ReleaseGraphicsResources(
vtkWindow *win);
216 void SendParameters();
218 vtkGetMacro(AutoParameters,
int);
225 bool Create2DFromRaw(
unsigned int width,
unsigned int height,
226 int numComps,
int dataType,
void *
data);
232 bool CreateDepthFromRaw(
unsigned int width,
unsigned int height,
233 int internalFormat,
int rawType,
240 bool CreateTextureBuffer(
unsigned int numValues,
int numComps,
248 bool CreateCubeFromRaw(
unsigned int width,
unsigned int height,
249 int numComps,
int dataType,
void *data[6]);
252 #if GL_ES_VERSION_3_0 != 1 264 bool Create1D(
int numComps,
266 bool shaderSupportsTextureInt);
271 bool Create1DFromRaw(
unsigned int width,
int numComps,
272 int dataType,
void *data);
277 bool CreateAlphaFromRaw(
unsigned int width,
289 bool Create2D(
unsigned int width,
unsigned int height,
int numComps,
291 bool shaderSupportsTextureInt);
299 bool Create3D(
unsigned int width,
unsigned int height,
unsigned int depth,
301 bool shaderSupportsTextureInt);
307 bool Create3DFromRaw(
unsigned int width,
unsigned int height,
308 unsigned int depth,
int numComps,
309 int dataType,
void *data);
323 bool CreateDepth(
unsigned int width,
331 bool AllocateDepth(
unsigned int width,
unsigned int height,
338 bool Allocate1D(
unsigned int width,
int numComps,
int vtkType);
344 bool Allocate2D(
unsigned int width,
unsigned int height,
int numComps,
351 bool Allocate3D(
unsigned int width,
unsigned int height,
352 unsigned int depth,
int numComps,
360 bool Create2D(
unsigned int width,
unsigned int height,
int numComps,
361 int vtktype,
bool shaderSupportsTextureInt);
362 bool Create3D(
unsigned int width,
unsigned int height,
unsigned int depth,
363 int numComps,
int vtktype,
bool shaderSupportsTextureInt);
369 int GetVTKDataType();
375 int GetDataType(
int vtk_scalar_type);
376 void SetDataType(
unsigned int glType);
377 int GetDefaultDataType(
int vtk_scalar_type);
386 unsigned int GetInternalFormat(
int vtktype,
int numComps,
387 bool shaderSupportsTextureInt);
388 void SetInternalFormat(
unsigned int glInternalFormat);
389 unsigned int GetDefaultInternalFormat(
int vtktype,
int numComps,
390 bool shaderSupportsTextureInt);
399 unsigned int GetFormat(
int vtktype,
int numComps,
400 bool shaderSupportsTextureInt);
401 void SetFormat(
unsigned int glFormat);
402 unsigned int GetDefaultFormat(
int vtktype,
int numComps,
403 bool shaderSupportsTextureInt);
414 void ResetFormatAndType();
416 unsigned int GetMinificationFilterMode(
int vtktype);
417 unsigned int GetMagnificationFilterMode(
int vtktype);
418 unsigned int GetWrapSMode(
int vtktype);
419 unsigned int GetWrapTMode(
int vtktype);
420 unsigned int GetWrapRMode(
int vtktype);
430 vtkGetMacro(RequireDepthBufferFloat,
bool);
431 vtkGetMacro(SupportsDepthBufferFloat,
bool);
442 vtkGetMacro(RequireTextureFloat,
bool);
443 vtkGetMacro(SupportsTextureFloat,
bool);
454 vtkGetMacro(RequireTextureInteger,
bool);
455 vtkGetMacro(SupportsTextureInteger,
bool);
469 vtkGetMacro(WrapS,
int);
484 vtkGetMacro(WrapT,
int);
499 vtkGetMacro(WrapR,
int);
517 vtkGetMacro(MinificationFilter,
int);
529 vtkGetMacro(MagnificationFilter,
int);
538 { this->SetMagnificationFilter(val?Linear:Nearest); }
541 {
return this->MagnificationFilter==Linear; }
549 vtkSetVector4Macro(BorderColor,
float);
550 vtkGetVector4Macro(BorderColor,
float);
559 vtkGetMacro(MinLOD,
float);
568 vtkGetMacro(MaxLOD,
float);
578 vtkGetMacro(BaseLevel,
int);
588 vtkGetMacro(MaxLevel,
int);
602 vtkGetMacro(DepthTextureCompare,
bool);
627 vtkGetMacro(DepthTextureCompareFunction,
int);
637 vtkGetMacro(GenerateMipmap,
bool);
657 static bool IsSupported(
659 bool requireTexFloat,
660 bool requireDepthFloat,
678 void CopyToFrameBuffer(
int srcXmin,
int srcYmin,
679 int srcXmax,
int srcYmax,
680 int dstXmin,
int dstYmin,
681 int dstXmax,
int dstYmax,
682 int dstSizeX,
int dstSizeY,
687 void CopyToFrameBuffer(
int srcXmin,
int srcYmin,
688 int srcXmax,
int srcYmax,
689 int dstXmin,
int dstYmin,
690 int dstSizeX,
int dstSizeY,
695 void CopyToFrameBuffer(
float *tcoords,
float *verts,
713 void CopyFromFrameBuffer(
int srcXmin,
732 void GetShiftAndScale(
float &shift,
float &
scale);
748 void CreateTexture();
753 void DestroyTexture();
755 int NumberOfDimensions;
768 bool RequireTextureInteger;
769 bool SupportsTextureInteger;
770 bool RequireTextureFloat;
771 bool SupportsTextureFloat;
772 bool RequireDepthBufferFloat;
773 bool SupportsDepthBufferFloat;
778 int MinificationFilter;
779 int MagnificationFilter;
785 float BorderColor[4];
787 bool DepthTextureCompare;
788 int DepthTextureCompareFunction;
static bool IsSupported(vtkOpenGLRenderWindow *renWin)
Check for feature support, without any optional features.
abstract base class for most VTK objects
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
static bool IsSupported(vtkRenderWindow *renWin, bool requireTexFloat, bool requireDepthFloat, bool requireTexInt)
Returns if the context supports the required extensions.
window superclass for vtkRenderWindow
a simple class to control print indentation
The VertexArrayObject class uses, or emulates, vertex array objects.
vtkWeakPointer< vtkOpenGLRenderWindow > Context
void SetLinearMagnification(bool val)
Tells if the magnification mode is linear (true) or nearest (false).
abstracts an OpenGL pixel buffer object.
vtkOpenGLBufferObject * BufferObject
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
abstracts an OpenGL texture object.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkGenericOpenGLResourceFreeCallback * ResourceCallback
The ShaderProgram uses one or more Shader objects.