Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquickshapestrokenode_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKSHAPESTROKENODE_P_P_H
5#define QQUICKSHAPESTROKENODE_P_P_H
6
7#include <QtQuick/qsgmaterial.h>
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists for the convenience
14// of a number of Qt sources files. This header file may change from
15// version to version without notice, or even be removed.
16//
17// We mean it.
18//
19
21
24
26{
27public:
29 {
31 QStringLiteral(":/qt-project.org/shapes/shaders_ng/shapestroke.vert.qsb"));
33 QStringLiteral(":/qt-project.org/shapes/shaders_ng/shapestroke.frag.qsb"));
34 }
35
36 bool updateUniformData(RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override;
37};
38
39
41{
42public:
44 : m_node(node)
45 {
46 setFlag(Blending, true);
47 }
48
49 int compare(const QSGMaterial *other) const override;
50
52 {
53 return m_node;
54 }
55
56protected:
57 QSGMaterialType *type() const override
58 {
59 static QSGMaterialType t;
60 return &t;
61 }
63 {
65 }
66
68};
69
71
72#endif // QQUICKSHAPESTROKENODE_P_P_H
bool updateUniformData(RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override
This function is called by the scene graph to get the contents of the shader program's uniform buffer...
int compare(const QSGMaterial *other) const override
Compares this material to other and returns 0 if they are equal; -1 if this material should sort befo...
QSGMaterialType * type() const override
This function is called by the scene graph to query an identifier that is unique to the QSGMaterialSh...
QQuickShapeStrokeNode * node() const
QQuickShapeStrokeMaterial(QQuickShapeStrokeNode *node)
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode) const override
This function returns a new instance of a the QSGMaterialShader implementation used to render geometr...
The QSGMaterialShader class represents a graphics API independent shader program.
void setShaderFileName(Stage stage, const QString &filename)
Sets the filename for the shader for the specified stage.
The QSGMaterial class encapsulates rendering state for a shader program.
Definition qsgmaterial.h:15
void setFlag(Flags flags, bool on=true)
Sets the flags flags on this material if on is true; otherwise clears the attribute.
RenderMode
\value RenderMode2D Normal 2D rendering \value RenderMode2DNoDepthBuffer Normal 2D rendering with dep...
else opt state
[0]
Combined button and popup list for selecting options.
GLdouble GLdouble t
Definition qopenglext.h:243
#define QStringLiteral(str)
QSharedPointer< T > other(t)
[5]
The QSGMaterialType class is used as a unique type token in combination with QSGMaterial.