![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qquick3dshadergeometry_p.h>
Additional Inherited Members | |
| Public Types inherited from QQuick3DObjectPrivate | |
| enum class | Flags : quint32 { None = 0x0 , RequiresSecondaryUpdate = 0x1 } |
| enum | ChangeType { Geometry = 0x01 , SiblingOrder = 0x02 , Visibility = 0x04 , Opacity = 0x08 , Destroyed = 0x10 , Parent = 0x20 , Children = 0x40 , Rotation = 0x80 , ImplicitWidth = 0x100 , ImplicitHeight = 0x200 , Enabled = 0x400 } |
| enum | DirtyType { TransformOrigin = 0x00000001 , Transform = 0x00000002 , BasicTransform = 0x00000004 , Position = 0x00000008 , Size = 0x00000010 , ZValue = 0x00000020 , Content = 0x00000040 , Smooth = 0x00000080 , OpacityValue = 0x00000100 , ChildrenChanged = 0x00000200 , ChildrenStackingChanged = 0x00000400 , ParentChanged = 0x00000800 , Clip = 0x00001000 , Window = 0x00002000 , EffectReference = 0x00008000 , Visible = 0x00010000 , HideReference = 0x00020000 , Antialiasing = 0x00040000 , InstanceRootChanged = 0x00080000 , TransformUpdateMask = TransformOrigin | Transform | BasicTransform | Position | Window , ComplexTransformUpdateMask = Transform | Window , ContentUpdateMask = Size | Content | Smooth | Window | Antialiasing , ChildrenUpdateMask = ChildrenChanged | ChildrenStackingChanged | EffectReference | Window } |
| using | Type = QSSGRenderGraphObject::Type |
| using | FlagsT = std::underlying_type_t<Flags> |
| Flags::RequiresSecondaryUpdate indicates that the object needs a secondary update, meaning an additional call to updateSpatialNode() will be made after the first one. | |
| using | ConnectionMap = QHash<ConnectionKey, QMetaObject::Connection> |
| Public Types inherited from QObjectPrivate | |
| typedef void(*) | StaticMetaCallFunction(QObject *, QMetaObject::Call, int, void **) |
| using | ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData> |
| Static Public Member Functions inherited from QQuick3DGeometryPrivate | |
| static QQuick3DGeometry::Attribute::Semantic | semanticFromName (const QByteArray &namename) |
| static QQuick3DGeometry::Attribute::ComponentType | toComponentType (QSSGMesh::Mesh::ComponentType componentType) |
| Static Public Member Functions inherited from QQuick3DObjectPrivate | |
| template<typename SceneContext, typename CallContext, typename Setter> | |
| static void | attachWatcherPriv (SceneContext *sceneContext, CallContext *callContext, Setter setter, QQuick3DObject *newO, QObject *oldO) |
| template<typename Context, typename Setter, typename Object3D> | |
| static void | attachWatcher (Context *context, Setter setter, Object3D *newO, Object3D *oldO) |
| Attach a object-destroyed-watcher to an object that's not owned. | |
| static QQuick3DObjectPrivate * | get (QQuick3DObject *item) |
| static const QQuick3DObjectPrivate * | get (const QQuick3DObject *item) |
| static QSSGRenderGraphObject * | updateSpatialNode (QQuick3DObject *o, QSSGRenderGraphObject *nn) |
| static void | data_append (QQmlListProperty< QObject > *, QObject *) |
| static qsizetype | data_count (QQmlListProperty< QObject > *) |
| static QObject * | data_at (QQmlListProperty< QObject > *, qsizetype) |
| static void | data_clear (QQmlListProperty< QObject > *) |
| static QObject * | resources_at (QQmlListProperty< QObject > *, qsizetype) |
| static void | resources_append (QQmlListProperty< QObject > *, QObject *) |
| static qsizetype | resources_count (QQmlListProperty< QObject > *) |
| static void | resources_clear (QQmlListProperty< QObject > *) |
| static void | children_append (QQmlListProperty< QQuick3DObject > *, QQuick3DObject *) |
| static qsizetype | children_count (QQmlListProperty< QQuick3DObject > *) |
| static QQuick3DObject * | children_at (QQmlListProperty< QQuick3DObject > *, qsizetype) |
| static void | children_clear (QQmlListProperty< QQuick3DObject > *) |
| static void | refSceneManager (QQuick3DObject *objobj, QQuick3DSceneManager &mgr) |
| static void | derefSceneManager (QQuick3DObject *objobj) |
| Static Public Member Functions inherited from QObjectPrivate | |
| static bool | removeConnection (Connection *cc) |
| static QObjectPrivate * | get (QObject *o) |
| static const QObjectPrivate * | get (const QObject *o) |
| static void | deleteInOwnThread (QObject *objectobject) |
| template<typename Func1, typename Func2> | |
| static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType typetype=Qt::AutoConnection) |
| template<typename Func1, typename Func2> | |
| static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
| static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int typetype, const int *typestypes, const QMetaObject *senderMetaObject) |
| static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType typetype) |
| static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType typetype) |
| static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
| static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
| Static Public Attributes inherited from QQuick3DGeometryPrivate | |
| static const int | MAX_ATTRIBUTE_COUNT = 16 |
| static const int | MAX_TARGET_ATTRIBUTE_COUNT = 32 |
Definition at line 25 of file qquick3dshadergeometry_p.h.
|
default |
|
explicit |
\qmltype ShaderGeometry
\inherits Geometry
\inqmlmodule QtQuick3D
\since 6.13
\brief Geometry with no vertex data, generated in the vertex shader.
Draws \l vertexCount vertices with no vertex buffer. Each position is
derived in the vertex shader from \c VERTEX_INDEX.
This is for geometry that is cheaper to compute than to upload from CPU memory,
or that is already on the GPU in some other form, e.g. a storage buffer written
by a compute shader.
\note ShaderGeometry must be used with a \l CustomMaterial that has a vertex shader.
A warning will be printed otherwise.
A subdivided plane is a simple example of where this can be useful. It does not need stored
data, since every vertex position is a function of the index.
\badcode
Model {
geometry: ShaderGeometry {
vertexCount: 127 * 127 * 6 // two triangles per grid cell
boundsMinimum: Qt.vector3d(-2000, -300, -2000)
boundsMaximum: Qt.vector3d(2000, 300, 2000)
}
materials: CustomMaterial { vertexShader: "grid.vert" }
}
\endcode
where \c grid.vert turns the index into a position:
\badcode
void MAIN()
{
int tri = VERTEX_INDEX / 3;
int corner = VERTEX_INDEX % 3;
... derive x and z from the cell, y from wherever you like VERTEX = vec3(x, y, z); }
The shader above is for a shaded material. For an unshaded \l CustomMaterial, there is no generated code, so VERTEX has no effect. In this case, the shader has to calculate POSITION itself:
\badcode void MAIN() { ... derive pos from VERTEX_INDEX as above POSITION = MODELVIEWPROJECTION_MATRIX * vec4(pos, 1.0); }
Definition at line 83 of file qquick3dshadergeometry.cpp.
| QVector3D QQuick3DShaderGeometryBasePrivate::m_boundsMaximum |
Definition at line 33 of file qquick3dshadergeometry_p.h.
| QVector3D QQuick3DShaderGeometryBasePrivate::m_boundsMinimum |
Definition at line 32 of file qquick3dshadergeometry_p.h.
| bool QQuick3DShaderGeometryBasePrivate::m_boundsSet = false |
Definition at line 34 of file qquick3dshadergeometry_p.h.
| QQuick3DGeometry::PrimitiveType QQuick3DShaderGeometryBasePrivate::m_primitive = QQuick3DGeometry::PrimitiveType::Triangles |
Definition at line 31 of file qquick3dshadergeometry_p.h.