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
QSGGeometry::Attribute Class Reference

The QSGGeometry::Attribute describes a single vertex attribute in a QSGGeometry. More...

#include <qsggeometry.h>

+ Collaboration diagram for QSGGeometry::Attribute:

Static Public Member Functions

static Attribute create (int pos, int tupleSize, int primitiveType, bool isPosition=false)
 Creates a new QSGGeometry::Attribute for attribute register pos with tupleSize.
 
static Attribute createWithAttributeType (int pos, int tupleSize, int primitiveType, AttributeType attributeType)
 Creates a new QSGGeometry::Attribute for attribute register pos with tupleSize.
 

Public Attributes

int position
 
int tupleSize
 
int type
 
uint isVertexCoordinate: 1
 
AttributeType attributeType: 4
 
uint reserved: 27
 

Detailed Description

The QSGGeometry::Attribute describes a single vertex attribute in a QSGGeometry.

\inmodule QtQuick

The QSGGeometry::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
QSGGeometry

Definition at line 57 of file qsggeometry.h.

Member Function Documentation

◆ create()

QSGGeometry::Attribute QSGGeometry::Attribute::create ( int pos,
int tupleSize,
int primitiveType,
bool isPosition = false )
static

Creates a new QSGGeometry::Attribute for attribute register pos with tupleSize.

The primitiveType can be any of the supported types from QSGGeometry::Type, such as QSGGeometry::FloatType or QSGGeometry::UnsignedByteType.

If the attribute describes the position for the vertex, the isPosition hint should be set to true. The scene graph renderer may use this information to perform optimizations.

Use the create function to construct the attribute, rather than an initialization list, to ensure that all fields are initialized.

Definition at line 14 of file qsggeometry.cpp.

References tupleSize, and QSGGeometry::UnknownAttribute.

◆ createWithAttributeType()

QSGGeometry::Attribute QSGGeometry::Attribute::createWithAttributeType ( int pos,
int tupleSize,
int primitiveType,
AttributeType attributeType )
static

Creates a new QSGGeometry::Attribute for attribute register pos with tupleSize.

The primitiveType can be any of the supported types from QSGGeometry::Type, such as QSGGeometry::FloatType or QSGGeometry::UnsignedByteType.

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.

Definition at line 20 of file qsggeometry.cpp.

References pos, position, and QSGGeometry::PositionAttribute.

Referenced by QSGCurveStrokeNode::attributes(), QSGGeometry::defaultAttributes_ColoredPoint2D(), QSGGeometry::defaultAttributes_Point2D(), QSGGeometry::defaultAttributes_TexturedPoint2D(), QT_BEGIN_NAMESPACE::smoothAttributeSet(), and QT_BEGIN_NAMESPACE::smoothImageAttributeSet().

+ Here is the caller graph for this function:

Member Data Documentation

◆ attributeType

AttributeType QSGGeometry::Attribute::attributeType

Definition at line 65 of file qsggeometry.h.

◆ isVertexCoordinate

uint QSGGeometry::Attribute::isVertexCoordinate

Definition at line 63 of file qsggeometry.h.

Referenced by QSGBatchRenderer::qsg_positionAttribute().

◆ position

int QSGGeometry::Attribute::position

Definition at line 59 of file qsggeometry.h.

Referenced by createWithAttributeType().

◆ reserved

uint QSGGeometry::Attribute::reserved

Definition at line 67 of file qsggeometry.h.

◆ tupleSize

int QSGGeometry::Attribute::tupleSize

Definition at line 60 of file qsggeometry.h.

Referenced by create(), and QSGBatchRenderer::qsg_positionAttribute().

◆ type

int QSGGeometry::Attribute::type

Definition at line 61 of file qsggeometry.h.

Referenced by QSGBatchRenderer::qsg_positionAttribute().


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