Fluid
Loading...
Searching...
No Matches
rectanglematerial.h
Go to the documentation of this file.
1/*
2 * This file is part of Fluid.
3 *
4 * Copyright (C) 2025 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 * Copyright (C) 2024-2025 hypengw <hypengwip@gmail.com>
6 *
7 * $BEGIN_LICENSE:MPL2$
8 *
9 * This Source Code Form is subject to the terms of the Mozilla Public
10 * License, v. 2.0. If a copy of the MPL was not distributed with this
11 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 *
13 * $END_LICENSE$
14 */
15
16#pragma once
17
18#include <QSGMaterial>
19
20namespace Fluid::SceneGraph {
21
22class RectangleMaterial : public QSGMaterial
23{
24public:
26
27 QSGMaterialShader *createShader(QSGRendererInterface::RenderMode) const override;
28 QSGMaterialType *type() const override;
29 int compare(const QSGMaterial *other) const override;
30};
31
32class RectangleShader : public QSGMaterialShader
33{
34public:
36
37 bool updateUniformData(QSGMaterialShader::RenderState &state, QSGMaterial *newMaterial,
38 QSGMaterial *oldMaterial) override;
39};
40
41} // namespace Fluid::SceneGraph
Definition rectanglematerial.h:23
QSGMaterialType * type() const override
Definition rectanglematerial.cpp:32
QSGMaterialShader * createShader(QSGRendererInterface::RenderMode) const override
Definition rectanglematerial.cpp:27
RectangleMaterial()
Definition rectanglematerial.cpp:22
int compare(const QSGMaterial *other) const override
Definition rectanglematerial.cpp:38
Definition rectanglematerial.h:33
bool updateUniformData(QSGMaterialShader::RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override
Definition rectanglematerial.cpp:52
RectangleShader()
Definition rectanglematerial.cpp:44
Definition rectangle.cpp:28