QSGGeometry.Attribute¶
The
Attribute
describes a single vertex attribute in aQSGGeometry
. More…
Synopsis¶
Static functions¶
def
create
(pos, tupleSize, primitiveType[, isPosition=false])def
createWithAttributeType
(pos, tupleSize, primitiveType, attributeType)
Detailed Description¶
The
Attribute
struct describes the attribute register position, the size of the attribute tuple and the attribute type.It also contains a hint to the renderer if this attribute is the attribute describing the position. The scene graph renderer may use this information to perform optimizations.
It contains a number of bits which are reserved for future use.
See also
-
class
PySide2.QtQuick.QSGGeometry.
Attribute
¶ PySide2.QtQuick.QSGGeometry.Attribute(Attribute)
- Parameters
Attribute –
Attribute
-
PySide2.QtQuick.QSGGeometry.Attribute.
position
¶
-
PySide2.QtQuick.QSGGeometry.Attribute.
tupleSize
¶
-
PySide2.QtQuick.QSGGeometry.Attribute.
type
¶
-
PySide2.QtQuick.QSGGeometry.Attribute.
isVertexCoordinate
¶
-
PySide2.QtQuick.QSGGeometry.Attribute.
attributeType
¶
-
PySide2.QtQuick.QSGGeometry.Attribute.
reserved
¶
-
static
PySide2.QtQuick.QSGGeometry.Attribute.
create
(pos, tupleSize, primitiveType[, isPosition=false])¶ - Parameters
pos –
int
tupleSize –
int
primitiveType –
int
isPosition –
bool
- Return type
Attribute
Creates a new
Attribute
for attribute registerpos
withtupleSize
. TheprimitiveType
can be any of the supported types fromType
, such asFloatType
orUnsignedByteType
.If the attribute describes the position for the vertex, the
isPosition
hint should be set totrue
. The scene graph renderer may use this information to perform optimizations.Note
Scene graph backends for APIs other than OpenGL may require an accurate description of attributes’ usage, and therefore it is recommended to use
createWithAttributeType()
instead.Use the create function to construct the attribute, rather than an initialization list, to ensure that all fields are initialized.
-
static
PySide2.QtQuick.QSGGeometry.Attribute.
createWithAttributeType
(pos, tupleSize, primitiveType, attributeType)¶ - Parameters
pos –
int
tupleSize –
int
primitiveType –
int
attributeType –
AttributeType
- Return type
Attribute
Creates a new
Attribute
for attribute registerpos
withtupleSize
. TheprimitiveType
can be any of the supported types fromType
, such asFloatType
orUnsignedByteType
.attributeType
describes the intended use of the attribute.Use the create function to construct the attribute, rather than an initialization list, to ensure that all fields are initialized.
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.