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
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_EXPORT QQuickShaderEffect : public QQuickItem
31{
33 Q_PROPERTY(QUrl fragmentShader READ fragmentShader WRITE setFragmentShader NOTIFY fragmentShaderChanged)
34 Q_PROPERTY(QUrl vertexShader READ vertexShader WRITE setVertexShader NOTIFY vertexShaderChanged)
35 Q_PROPERTY(bool blending READ blending WRITE setBlending NOTIFY blendingChanged)
36 Q_PROPERTY(QVariant mesh READ mesh WRITE setMesh NOTIFY meshChanged)
37 Q_PROPERTY(CullMode cullMode READ cullMode WRITE setCullMode NOTIFY cullModeChanged)
38 Q_PROPERTY(QString log READ log NOTIFY logChanged)
39 Q_PROPERTY(Status status READ status NOTIFY statusChanged)
40 Q_PROPERTY(bool supportsAtlasTextures READ supportsAtlasTextures WRITE setSupportsAtlasTextures NOTIFY supportsAtlasTexturesChanged REVISION(2, 4))
41 QML_NAMED_ELEMENT(ShaderEffect)
43
44public:
45 enum CullMode {
48 FrontFaceCulling
49 };
50 Q_ENUM(CullMode)
51
57 Q_ENUM(Status)
58
59 QQuickShaderEffect(QQuickItem *parent = nullptr);
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:63
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
Definition qquickitem.h:144
void vertexShaderChanged()
void supportsAtlasTexturesChanged()
void fragmentShaderChanged()
\inmodule QtCore\reentrant
Definition qrect.h:484
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
Definition qsgnode.h:37
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
\inmodule QtCore
Definition qvariant.h:65
void statusChanged(QQmlComponent::Status status)
[1]
Definition qlogging.cpp:11
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
\inmodule QtQuick
Definition qquickitem.h:159