Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQuickSpriteMaterial Class Reference
+ Inheritance diagram for QQuickSpriteMaterial:
+ Collaboration diagram for QQuickSpriteMaterial:

Public Member Functions

 QQuickSpriteMaterial ()
 
 ~QQuickSpriteMaterial ()
 
QSGMaterialTypetype () const override
 This function is called by the scene graph to query an identifier that is unique to the QSGMaterialShader instantiated by createShader().
 
QSGMaterialShadercreateShader (QSGRendererInterface::RenderMode renderMode) const override
 This function returns a new instance of a the QSGMaterialShader implementation used to render geometry for a specific implementation of QSGMaterial.
 
- Public Member Functions inherited from QSGMaterial
 QSGMaterial ()
 
virtual ~QSGMaterial ()
 
virtual int compare (const QSGMaterial *other) const
 Compares this material to other and returns 0 if they are equal; -1 if this material should sort before other and 1 if other should sort before.
 
QSGMaterial::Flags flags () const
 Returns the material's flags.
 
void setFlag (Flags flags, bool on=true)
 Sets the flags flags on this material if on is true; otherwise clears the attribute.
 
int viewCount () const
 

Public Attributes

QSGTexturetexture = nullptr
 
float animT = 0.0f
 
float animX1 = 0.0f
 
float animY1 = 0.0f
 
float animX2 = 0.0f
 
float animY2 = 0.0f
 
float animW = 1.0f
 
float animH = 1.0f
 

Additional Inherited Members

- Public Types inherited from QSGMaterial
enum  Flag {
  Blending = 0x0001 , RequiresDeterminant = 0x0002 , RequiresFullMatrixExceptTranslate = 0x0004 | RequiresDeterminant , RequiresFullMatrix = 0x0008 | RequiresFullMatrixExceptTranslate ,
  NoBatching = 0x0010 , MultiView2 = 0x10000 , MultiView3 = 0x20000 , MultiView4 = 0x40000
}
 \value Blending Set this flag to true if the material requires blending to be enabled during rendering. More...
 

Detailed Description

Definition at line 24 of file qsgdefaultspritenode.cpp.

Constructor & Destructor Documentation

◆ QQuickSpriteMaterial()

QQuickSpriteMaterial::QQuickSpriteMaterial ( )

Definition at line 43 of file qsgdefaultspritenode.cpp.

References QSGMaterial::Blending, and QSGMaterial::setFlag().

+ Here is the call graph for this function:

◆ ~QQuickSpriteMaterial()

QQuickSpriteMaterial::~QQuickSpriteMaterial ( )

Definition at line 48 of file qsgdefaultspritenode.cpp.

References texture.

Member Function Documentation

◆ createShader()

QSGMaterialShader * QQuickSpriteMaterial::createShader ( QSGRendererInterface::RenderMode renderMode) const
overridevirtual

This function returns a new instance of a the QSGMaterialShader implementation used to render geometry for a specific implementation of QSGMaterial.

The function will be called only once for each combination of material type and renderMode and will be cached internally.

For most materials, the renderMode can be ignored. A few materials may need custom handling for specific render modes. For instance if the material implements antialiasing in a way that needs to account for perspective transformations when RenderMode3D is in use.

Implements QSGMaterial.

Definition at line 124 of file qsgdefaultspritenode.cpp.

References Q_UNUSED, and QSGMaterial::viewCount().

+ Here is the call graph for this function:

◆ type()

QSGMaterialType * QQuickSpriteMaterial::type ( ) const
inlineoverridevirtual

This function is called by the scene graph to query an identifier that is unique to the QSGMaterialShader instantiated by createShader().

For many materials, the typical approach will be to return a pointer to a static, and so globally available, QSGMaterialType instance. The QSGMaterialType is an opaque object. Its purpose is only to serve as a type-safe, simple way to generate unique material identifiers.

QSGMaterialType *type() const override
{
return &type;
}
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
The QSGMaterialType class is used as a unique type token in combination with QSGMaterial.

Implements QSGMaterial.

Definition at line 29 of file qsgdefaultspritenode.cpp.

References type().

Referenced by type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ animH

float QQuickSpriteMaterial::animH = 1.0f

◆ animT

float QQuickSpriteMaterial::animT = 0.0f

Definition at line 34 of file qsgdefaultspritenode.cpp.

Referenced by QSGDefaultSpriteNode::setTime().

◆ animW

float QQuickSpriteMaterial::animW = 1.0f

◆ animX1

float QQuickSpriteMaterial::animX1 = 0.0f

◆ animX2

float QQuickSpriteMaterial::animX2 = 0.0f

◆ animY1

float QQuickSpriteMaterial::animY1 = 0.0f

◆ animY2

float QQuickSpriteMaterial::animY2 = 0.0f

◆ texture


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