Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquickshadereffect_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QQUICKSHADEREFFECT_P_H
5#define QQUICKSHADEREFFECT_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <private/qtquickglobal_p.h>
19
20QT_REQUIRE_CONFIG(quick_shadereffect);
21
22#include <QtQuick/qquickitem.h>
23#include <private/qtquickglobal_p.h>
24#include <private/qsgadaptationlayer_p.h>
25
27
29
30class Q_QUICK_PRIVATE_EXPORT QQuickShaderEffect : public QQuickItem
31{
33 Q_PROPERTY(QUrl fragmentShader READ fragmentShader WRITE setFragmentShader NOTIFY fragmentShaderChanged FINAL)
34 Q_PROPERTY(QUrl vertexShader READ vertexShader WRITE setVertexShader NOTIFY vertexShaderChanged FINAL)
35 Q_PROPERTY(bool blending READ blending WRITE setBlending NOTIFY blendingChanged FINAL)
36 Q_PROPERTY(QVariant mesh READ mesh WRITE setMesh NOTIFY meshChanged FINAL)
37 Q_PROPERTY(CullMode cullMode READ cullMode WRITE setCullMode NOTIFY cullModeChanged FINAL)
38 Q_PROPERTY(QString log READ log NOTIFY logChanged FINAL)
39 Q_PROPERTY(Status status READ status NOTIFY statusChanged FINAL)
40 Q_PROPERTY(bool supportsAtlasTextures READ supportsAtlasTextures WRITE setSupportsAtlasTextures NOTIFY supportsAtlasTexturesChanged REVISION(2, 4) FINAL)
41 QML_NAMED_ELEMENT(ShaderEffect)
43
44public:
45 enum CullMode {
48 FrontFaceCulling
49 };
50 Q_ENUM(CullMode)
51
52 enum Status {
55 Error
56 };
57 Q_ENUM(Status)
58
60 ~QQuickShaderEffect() override;
61
62 QUrl fragmentShader() const;
63 void setFragmentShader(const QUrl &fileUrl);
64
65 QUrl vertexShader() const;
66 void setVertexShader(const QUrl &fileUrl);
67
68 bool blending() const;
69 void setBlending(bool enable);
70
71 QVariant mesh() const;
72 void setMesh(const QVariant &mesh);
73
74 CullMode cullMode() const;
75 void setCullMode(CullMode face);
76
77 bool supportsAtlasTextures() const;
78 void setSupportsAtlasTextures(bool supports);
79
80 QString log() const;
81 Status status() const;
82
83 bool isComponentComplete() const;
84
85 bool updateUniformValue(const QByteArray &name, const QVariant &value);
86
93 void logChanged();
96
97protected:
98 bool event(QEvent *e) override;
99 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
100 QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) override;
101 void componentComplete() override;
102 void itemChange(ItemChange change, const ItemChangeData &value) override;
103
104private:
105 Q_DECLARE_PRIVATE(QQuickShaderEffect)
106};
107
109
110#endif // QQUICKSHADEREFFECT_P_H
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
Definition qcoreevent.h:45
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
virtual QSGNode * updatePaintNode(QSGNode *, UpdatePaintNodeData *)
Called on the render thread when it is time to sync the state of the item with the scene graph.
virtual void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
void componentComplete() override
\reimp Derived classes should call the base class method before adding their own actions to perform a...
virtual void itemChange(ItemChange, const ItemChangeData &)
Called when change occurs for this item.
bool isComponentComplete() const
Returns true if construction of the QML component is complete; otherwise returns false.
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
Definition qquickitem.h:143
void vertexShaderChanged()
void supportsAtlasTexturesChanged()
void fragmentShaderChanged()
\inmodule QtCore\reentrant
Definition qrect.h:483
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
Definition qsgnode.h:37
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\inmodule QtCore
Definition qurl.h:94
\inmodule QtCore
Definition qvariant.h:64
void statusChanged(QDeclarativeComponent::Status status)
[1]
Definition qlogging.cpp:9
double e
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum face
GLboolean enable
GLuint name
struct _cl_event * event
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QT_REQUIRE_CONFIG(feature)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
\inmodule QtQuick
Definition qquickitem.h:158