Fluid 1.3.0
Material Design for QtQuick and Qml
Loading...
Searching...
No Matches
elevationmaterial.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2// SPDX-FileCopyrightText: 2024-2025 hypengw <hypengwip@gmail.com>
3// SPDX-License-Identifier: MPL-2.0
4
5#pragma once
6
7#include <QSGMaterial>
8
9namespace Fluid::SceneGraph {
10
11class ElevationMaterial : public QSGMaterial
12{
13public:
16
17 QSGMaterialShader *createShader(QSGRendererInterface::RenderMode) const override;
18 QSGMaterialType *type() const override;
19 int compare(const QSGMaterial *other) const override;
20
21 void init_fadeoff_texture(QQuickWindow *win);
22 auto strength_texture() -> QSGTexture *;
23
24private:
25 QSGTexture *m_fadeoff_texture;
26};
27
28class ElevationShader : public QSGMaterialShader
29{
30public:
32
33 bool updateUniformData(QSGMaterialShader::RenderState &state, QSGMaterial *newMaterial,
34 QSGMaterial *oldMaterial) override;
35
36 void updateSampledImage(RenderState &, int binding, QSGTexture **texture,
37 QSGMaterial *newMaterial, QSGMaterial *) override;
38};
39
40} // namespace Fluid::SceneGraph
QSGMaterialType * type() const override
int compare(const QSGMaterial *other) const override
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode) const override
void init_fadeoff_texture(QQuickWindow *win)
bool updateUniformData(QSGMaterialShader::RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
void updateSampledImage(RenderState &, int binding, QSGTexture **texture, QSGMaterial *newMaterial, QSGMaterial *) override