VTK  9.4.20241221
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkQWidgetTexture Class Reference

Allows a QWidget to be used as a texture in VTK with OpenGL. More...

#include <vtkQWidgetTexture.h>

Inheritance diagram for vtkQWidgetTexture:
[legend]
Collaboration diagram for vtkQWidgetTexture:
[legend]

Public Types

typedef vtkTextureObject Superclass
 
- Public Types inherited from vtkTextureObject
enum  {
  Lequal = 0 , Gequal , Less , Greater ,
  Equal , NotEqual , AlwaysTrue , Never ,
  NumberOfDepthTextureCompareFunctions
}
 
enum  {
  ClampToEdge = 0 , Repeat , MirroredRepeat , ClampToBorder ,
  NumberOfWrapModes
}
 
enum  {
  Nearest = 0 , Linear , NearestMipmapNearest , NearestMipmapLinear ,
  LinearMipmapNearest , LinearMipmapLinear , NumberOfMinificationModes
}
 
enum  {
  Native = 0 , Fixed8 , Fixed16 , Fixed24 ,
  Fixed32 , Float16 , Float32 , NumberOfDepthFormats
}
 
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkQWidgetTextureNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
QGraphicsScene * GetScene ()
 get the QScene used for rendering, this is where events will be forwarded to.
 
void Activate () override
 Activate and Bind the texture.
 
void ReleaseGraphicsResources (vtkWindow *win) override
 Free resources.
 
void SetWidget (QWidget *w)
 Set/Get the QWidget that this TextureObject will render/use.
 
QWidget * GetWidget ()
 Set/Get the QWidget that this TextureObject will render/use.
 
- Public Member Functions inherited from vtkTextureObject
virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkTextureObjectNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
virtual int GetNumberOfDimensions ()
 
virtual void SetSamples (unsigned int)
 
int GetTextureUnit ()
 Return the texture unit used for this texture.
 
virtual void Activate ()
 Activate and Bind the texture.
 
void Deactivate ()
 Deactivate and UnBind the texture.
 
virtual void ReleaseGraphicsResources (vtkWindow *win)
 Deactivate and UnBind the texture.
 
bool IsBound ()
 Tells if the texture object is bound to the active texture image unit.
 
void SendParameters ()
 Send all the texture object parameters to the hardware if not done yet.
 
bool Create2DFromRaw (unsigned int width, unsigned int height, int numComps, int dataType, void *data)
 Create a 2D texture from client memory numComps must be in [1-4].
 
bool CreateDepthFromRaw (unsigned int width, unsigned int height, int internalFormat, int rawType, void *raw)
 Create a 2D depth texture using a raw pointer.
 
bool CreateTextureBuffer (unsigned int numValues, int numComps, int dataType, vtkOpenGLBufferObject *bo)
 Create a texture buffer basically a 1D texture that can be very large for passing data into the fragment shader.
 
bool EmulateTextureBufferWith2DTextures (unsigned int numValues, int numComps, int dataType, vtkOpenGLBufferObject *bo)
 Emulates a texture buffer with 2D texture.
 
bool CreateCubeFromRaw (unsigned int width, unsigned int height, int numComps, int dataType, void *data[6])
 Create a cube texture from 6 buffers from client memory.
 
bool Create1D (int numComps, vtkPixelBufferObject *pbo, bool shaderSupportsTextureInt)
 Create a 1D texture using the PBO.
 
bool Create1DFromRaw (unsigned int width, int numComps, int dataType, void *data)
 Create 1D texture from client memory.
 
bool Create2D (unsigned int width, unsigned int height, int numComps, vtkPixelBufferObject *pbo, bool shaderSupportsTextureInt)
 Create a 2D texture using the PBO.
 
bool Create3D (unsigned int width, unsigned int height, unsigned int depth, int numComps, vtkPixelBufferObject *pbo, bool shaderSupportsTextureInt)
 Create a 3D texture using the PBO.
 
bool Create3DFromRaw (unsigned int width, unsigned int height, unsigned int depth, int numComps, int dataType, void *data)
 Create a 3D texture from client memory numComps must be in [1-4].
 
bool AllocateProxyTexture3D (unsigned int width, unsigned int height, unsigned int depth, int numComps, int dataType)
 Create a 3D texture using the GL_PROXY_TEXTURE_3D target.
 
vtkPixelBufferObjectDownload ()
 This is used to download raw data from the texture into a pixel buffer.
 
vtkPixelBufferObjectDownload (unsigned int target, unsigned int level)
 
bool CreateDepth (unsigned int width, unsigned int height, int internalFormat, vtkPixelBufferObject *pbo)
 Create a 2D depth texture using a PBO.
 
bool AllocateDepth (unsigned int width, unsigned int height, int internalFormat)
 Create a 2D depth texture but does not initialize its values.
 
bool AllocateDepthStencil (unsigned int width, unsigned int height)
 Create a 2D septh stencil texture but does not initialize its values.
 
bool Allocate1D (unsigned int width, int numComps, int vtkType)
 Create a 1D color texture but does not initialize its values.
 
bool Allocate2D (unsigned int width, unsigned int height, int numComps, int vtkType, int level=0)
 Create a 2D color texture but does not initialize its values.
 
bool Allocate3D (unsigned int width, unsigned int height, unsigned int depth, int numComps, int vtkType)
 Create a 3D color texture but does not initialize its values.
 
int GetVTKDataType ()
 Get the data type for the texture as a vtk type int i.e.
 
void ResetFormatAndType ()
 Reset format, internal format, and type of the texture.
 
unsigned int GetMinificationFilterMode (int vtktype)
 
unsigned int GetMagnificationFilterMode (int vtktype)
 
unsigned int GetWrapSMode (int vtktype)
 
unsigned int GetWrapTMode (int vtktype)
 
unsigned int GetWrapRMode (int vtktype)
 
void SetLinearMagnification (bool val)
 Tells if the magnification mode is linear (true) or nearest (false).
 
bool GetLinearMagnification ()
 
void CopyFromFrameBuffer (int srcXmin, int srcYmin, int dstXmin, int dstYmin, int width, int height)
 Copy a sub-part of a logical buffer of the framebuffer (color or depth) to the texture object.
 
void GetShiftAndScale (float &shift, float &scale)
 Get the shift and scale required in the shader to return the texture values to their original range.
 
void Resize (unsigned int width, unsigned int height)
 
void AssignToExistingTexture (unsigned int handle, unsigned int target)
 Assign the TextureObject to a externally provided Handle and Target.
 
void SetContext (vtkOpenGLRenderWindow *)
 Get/Set the context.
 
vtkOpenGLRenderWindowGetContext ()
 Get/Set the context.
 
virtual unsigned int GetWidth ()
 Get the texture dimensions.
 
virtual unsigned int GetHeight ()
 Get the texture dimensions.
 
virtual unsigned int GetDepth ()
 Get the texture dimensions.
 
virtual unsigned int GetSamples ()
 Get the texture dimensions.
 
virtual int GetComponents ()
 Get the texture dimensions.
 
unsigned int GetTuples ()
 Get the texture dimensions.
 
virtual unsigned int GetTarget ()
 Returns OpenGL texture target to which the texture is/can be bound.
 
virtual unsigned int GetHandle ()
 Returns the OpenGL handle.
 
void Bind ()
 Bind the texture, must have been created using Create().
 
virtual void SetAutoParameters (int)
 Get/Set AutoParameters flag.
 
virtual int GetAutoParameters ()
 Get/Set AutoParameters flag.
 
virtual void AutoParametersOn ()
 Get/Set AutoParameters flag.
 
virtual void AutoParametersOff ()
 Get/Set AutoParameters flag.
 
bool Create2D (unsigned int width, unsigned int height, int numComps, int vtktype, bool)
 Create texture without uploading any data.
 
bool Create3D (unsigned int width, unsigned int height, unsigned int depth, int numComps, int vtktype, bool)
 Create texture without uploading any data.
 
int GetDataType (int vtk_scalar_type)
 Get the data type for the texture as GLenum type.
 
void SetDataType (unsigned int glType)
 Get the data type for the texture as GLenum type.
 
int GetDefaultDataType (int vtk_scalar_type)
 Get the data type for the texture as GLenum type.
 
unsigned int GetInternalFormat (int vtktype, int numComps, bool shaderSupportsTextureInt)
 Get/Set internal format (OpenGL internal format) that should be used.
 
void SetInternalFormat (unsigned int glInternalFormat)
 Get/Set internal format (OpenGL internal format) that should be used.
 
unsigned int GetDefaultInternalFormat (int vtktype, int numComps, bool shaderSupportsTextureInt)
 Get/Set internal format (OpenGL internal format) that should be used.
 
unsigned int GetFormat (int vtktype, int numComps, bool shaderSupportsTextureInt)
 Get/Set format (OpenGL internal format) that should be used.
 
void SetFormat (unsigned int glFormat)
 Get/Set format (OpenGL internal format) that should be used.
 
unsigned int GetDefaultFormat (int vtktype, int numComps, bool shaderSupportsTextureInt)
 Get/Set format (OpenGL internal format) that should be used.
 
virtual void SetRequireDepthBufferFloat (bool)
 Optional, require support for floating point depth buffer formats.
 
virtual bool GetRequireDepthBufferFloat ()
 Optional, require support for floating point depth buffer formats.
 
virtual bool GetSupportsDepthBufferFloat ()
 Optional, require support for floating point depth buffer formats.
 
virtual void SetRequireTextureFloat (bool)
 Optional, require support for floating point texture formats.
 
virtual bool GetRequireTextureFloat ()
 Optional, require support for floating point texture formats.
 
virtual bool GetSupportsTextureFloat ()
 Optional, require support for floating point texture formats.
 
virtual void SetRequireTextureInteger (bool)
 Optional, require support for integer texture formats.
 
virtual bool GetRequireTextureInteger ()
 Optional, require support for integer texture formats.
 
virtual bool GetSupportsTextureInteger ()
 Optional, require support for integer texture formats.
 
virtual int GetWrapS ()
 Wrap mode for the first texture coordinate "s" Valid values are:
 
virtual void SetWrapS (int)
 Wrap mode for the first texture coordinate "s" Valid values are:
 
virtual int GetWrapT ()
 Wrap mode for the first texture coordinate "t" Valid values are:
 
virtual void SetWrapT (int)
 Wrap mode for the first texture coordinate "t" Valid values are:
 
virtual int GetWrapR ()
 Wrap mode for the first texture coordinate "r" Valid values are:
 
virtual void SetWrapR (int)
 Wrap mode for the first texture coordinate "r" Valid values are:
 
virtual int GetMinificationFilter ()
 Minification filter mode.
 
virtual void SetMinificationFilter (int)
 Minification filter mode.
 
virtual int GetMagnificationFilter ()
 Magnification filter mode.
 
virtual void SetMagnificationFilter (int)
 Magnification filter mode.
 
virtual void SetBorderColor (float, float, float, float)
 Border Color (RGBA).
 
virtual void SetBorderColor (float[4])
 Border Color (RGBA).
 
virtual float * GetBorderColor ()
 Border Color (RGBA).
 
virtual void GetBorderColor (float &, float &, float &, float &)
 Border Color (RGBA).
 
virtual void GetBorderColor (float[4])
 Border Color (RGBA).
 
virtual void SetMinLOD (float)
 Lower-clamp the computed LOD against this value.
 
virtual float GetMinLOD ()
 Lower-clamp the computed LOD against this value.
 
virtual void SetMaxLOD (float)
 Upper-clamp the computed LOD against this value.
 
virtual float GetMaxLOD ()
 Upper-clamp the computed LOD against this value.
 
virtual void SetBaseLevel (int)
 Level of detail of the first texture image.
 
virtual int GetBaseLevel ()
 Level of detail of the first texture image.
 
virtual void SetMaxLevel (int)
 Level of detail of the first texture image.
 
virtual int GetMaxLevel ()
 Level of detail of the first texture image.
 
virtual bool GetDepthTextureCompare ()
 Tells if the output of a texture unit with a depth texture uses comparison or not.
 
virtual void SetDepthTextureCompare (bool)
 Tells if the output of a texture unit with a depth texture uses comparison or not.
 
virtual int GetDepthTextureCompareFunction ()
 In case DepthTextureCompare is true, specify the comparison function in use.
 
virtual void SetDepthTextureCompareFunction (int)
 In case DepthTextureCompare is true, specify the comparison function in use.
 
virtual bool GetGenerateMipmap ()
 Tells the hardware to generate mipmap textures from the first texture image at BaseLevel.
 
virtual void SetGenerateMipmap (bool)
 Tells the hardware to generate mipmap textures from the first texture image at BaseLevel.
 
virtual void SetMaximumAnisotropicFiltering (float)
 Set/Get the maximum anisotropic filtering to use.
 
virtual float GetMaximumAnisotropicFiltering ()
 Set/Get the maximum anisotropic filtering to use.
 
void CopyToFrameBuffer (vtkShaderProgram *program, vtkOpenGLVertexArrayObject *vao)
 Copy the texture (src) in the current framebuffer.
 
void CopyToFrameBuffer (int srcXmin, int srcYmin, int srcXmax, int srcYmax, int dstXmin, int dstYmin, int dstXmax, int dstYmax, int dstSizeX, int dstSizeY, vtkShaderProgram *program, vtkOpenGLVertexArrayObject *vao)
 Copy the texture (src) in the current framebuffer.
 
void CopyToFrameBuffer (int srcXmin, int srcYmin, int srcXmax, int srcYmax, int dstXmin, int dstYmin, int dstSizeX, int dstSizeY, vtkShaderProgram *program, vtkOpenGLVertexArrayObject *vao)
 Copy the texture (src) in the current framebuffer.
 
void CopyToFrameBuffer (float *tcoords, float *verts, vtkShaderProgram *program, vtkOpenGLVertexArrayObject *vao)
 Copy the texture (src) in the current framebuffer.
 
virtual bool GetUseSRGBColorSpace ()
 Is this texture using the sRGB color space.
 
virtual void SetUseSRGBColorSpace (bool)
 Is this texture using the sRGB color space.
 
virtual void UseSRGBColorSpaceOn ()
 Is this texture using the sRGB color space.
 
virtual void UseSRGBColorSpaceOff ()
 Is this texture using the sRGB color space.
 
int GetMaximumTextureSize3D ()
 Overload which uses the internal context to query the maximum 3D texture size.
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on.
 
virtual void DebugOff ()
 Turn debugging output off.
 
bool GetDebug ()
 Get the value of the debug flag.
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag.
 
virtual void Modified ()
 Update the modification time for this object.
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time.
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
vtkTypeBool InvokeEvent (unsigned long event)
 
vtkTypeBool InvokeEvent (const char *event)
 
std::string GetObjectDescription () const override
 The object description printed in messages and PrintSelf output.
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method.
 
vtkTypeBool InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
vtkTypeBool InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
virtual void SetObjectName (const std::string &objectName)
 Set/get the name of this object for reporting purposes.
 
virtual std::string GetObjectName () const
 Set/get the name of this object for reporting purposes.
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string.
 
virtual std::string GetObjectDescription () const
 The object description printed in messages and PrintSelf output.
 
virtual vtkTypeBool IsA (const char *name)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
 Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
 
virtual void Delete ()
 Delete a VTK object.
 
virtual void FastDelete ()
 Delete a reference to this object.
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream.
 
void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object).
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object).
 
int GetReferenceCount ()
 Return the current reference count of this object.
 
void SetReferenceCount (int)
 Sets the reference count.
 
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space.
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 
virtual bool UsesGarbageCollector () const
 Indicate whether the class uses vtkGarbageCollector or not.
 

Static Public Member Functions

static vtkQWidgetTextureNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkQWidgetTextureSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkTextureObject
static vtkTextureObjectNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkTextureObjectSafeDownCast (vtkObjectBase *o)
 
static bool IsSupported (vtkOpenGLRenderWindow *renWin, bool requireTexFloat, bool requireDepthFloat, bool requireTexInt)
 Returns if the context supports the required extensions.
 
static bool IsSupported (vtkOpenGLRenderWindow *renWin)
 Check for feature support, without any optional features.
 
static int GetMaximumTextureSize (vtkOpenGLRenderWindow *context)
 Query and return maximum texture size (dimension) supported by the OpenGL driver for a particular context.
 
static int GetMaximumTextureSize3D (vtkOpenGLRenderWindow *context)
 Query and return maximum texture size (dimension) supported by the OpenGL driver for a particular context.
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes.
 
static void SetGlobalWarningDisplay (vtkTypeBool val)
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static vtkTypeBool GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class.
 
static vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within.
 
static bool GetUsingMemkind ()
 A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space.
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkQWidgetTexture ()
 
 ~vtkQWidgetTexture () override
 
void AllocateFromWidget ()
 
- Protected Member Functions inherited from vtkTextureObject
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkTextureObject ()
 
 ~vtkTextureObject () override
 
bool LoadRequiredExtensions (vtkOpenGLRenderWindow *renWin)
 Load all necessary extensions.
 
void CreateTexture ()
 Creates a texture handle if not already created.
 
void DestroyTexture ()
 Destroy the texture.
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events.
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events.
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void RegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
virtual void ObjectFinalize ()
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

QGraphicsScene * Scene
 
QWidget * Widget
 
std::function< void()> RedrawMethod
 
unsigned char * ImageBuffer
 
std::array< int, 2 > ImageBufferDimensions
 
- Protected Attributes inherited from vtkTextureObject
vtkGenericOpenGLResourceFreeCallbackResourceCallback
 
int NumberOfDimensions
 
unsigned int Width
 
unsigned int Height
 
unsigned int Depth
 
unsigned int Samples
 
bool UseSRGBColorSpace
 
float MaximumAnisotropicFiltering
 
unsigned int Target
 
unsigned int Format
 
unsigned int InternalFormat
 
unsigned int Type
 
int Components
 
vtkWeakPointer< vtkOpenGLRenderWindowContext
 
unsigned int Handle
 
bool OwnHandle
 
bool RequireTextureInteger
 
bool SupportsTextureInteger
 
bool RequireTextureFloat
 
bool SupportsTextureFloat
 
bool RequireDepthBufferFloat
 
bool SupportsDepthBufferFloat
 
int WrapS
 
int WrapT
 
int WrapR
 
int MinificationFilter
 
int MagnificationFilter
 
float MinLOD
 
float MaxLOD
 
int BaseLevel
 
int MaxLevel
 
float BorderColor [4]
 
bool DepthTextureCompare
 
int DepthTextureCompareFunction
 
bool GenerateMipmap
 
int AutoParameters
 
vtkTimeStamp SendParametersTime
 
vtkOpenGLHelperShaderProgram
 
vtkOpenGLBufferObjectBufferObject
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
std::string ObjectName
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 

Detailed Description

Allows a QWidget to be used as a texture in VTK with OpenGL.

This class works by rendering the QWidget into a Framebuffer and then sending the OpenGL texture handle to VTK for rendering.

Definition at line 23 of file vtkQWidgetTexture.h.

Member Typedef Documentation

◆ Superclass

Definition at line 27 of file vtkQWidgetTexture.h.

Constructor & Destructor Documentation

◆ vtkQWidgetTexture()

vtkQWidgetTexture::vtkQWidgetTexture ( )
protected

◆ ~vtkQWidgetTexture()

vtkQWidgetTexture::~vtkQWidgetTexture ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkQWidgetTexture * vtkQWidgetTexture::New ( )
static

◆ IsTypeOf()

static vtkTypeBool vtkQWidgetTexture::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool vtkQWidgetTexture::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class.

Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkTextureObject.

◆ SafeDownCast()

static vtkQWidgetTexture * vtkQWidgetTexture::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkQWidgetTexture::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkTextureObject.

◆ NewInstance()

vtkQWidgetTexture * vtkQWidgetTexture::NewInstance ( ) const

◆ PrintSelf()

void vtkQWidgetTexture::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Methods invoked by print to print information about the object including superclasses.

Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

◆ SetWidget()

void vtkQWidgetTexture::SetWidget ( QWidget *  w)

Set/Get the QWidget that this TextureObject will render/use.

◆ GetWidget()

QWidget * vtkQWidgetTexture::GetWidget ( )
inline

Set/Get the QWidget that this TextureObject will render/use.

Definition at line 35 of file vtkQWidgetTexture.h.

◆ GetScene()

QGraphicsScene * vtkQWidgetTexture::GetScene ( )
inline

get the QScene used for rendering, this is where events will be forwarded to.

Definition at line 42 of file vtkQWidgetTexture.h.

◆ Activate()

void vtkQWidgetTexture::Activate ( )
overridevirtual

Activate and Bind the texture.

Overloaded to handle the opengl related setup at the same time. as We know the context will be active then.

Reimplemented from vtkTextureObject.

◆ ReleaseGraphicsResources()

void vtkQWidgetTexture::ReleaseGraphicsResources ( vtkWindow win)
overridevirtual

Free resources.

Reimplemented from vtkTextureObject.

◆ AllocateFromWidget()

void vtkQWidgetTexture::AllocateFromWidget ( )
protected

Member Data Documentation

◆ Scene

QGraphicsScene* vtkQWidgetTexture::Scene
protected

Definition at line 59 of file vtkQWidgetTexture.h.

◆ Widget

QWidget* vtkQWidgetTexture::Widget
protected

Definition at line 60 of file vtkQWidgetTexture.h.

◆ RedrawMethod

std::function<void()> vtkQWidgetTexture::RedrawMethod
protected

Definition at line 63 of file vtkQWidgetTexture.h.

◆ ImageBuffer

unsigned char* vtkQWidgetTexture::ImageBuffer
protected

Definition at line 68 of file vtkQWidgetTexture.h.

◆ ImageBufferDimensions

std::array<int, 2> vtkQWidgetTexture::ImageBufferDimensions
protected

Definition at line 69 of file vtkQWidgetTexture.h.


The documentation for this class was generated from the following file: