Kirigami2

shadowedtexturematerial.h
1/*
2 * SPDX-FileCopyrightText: 2020 Arjen Hiemstra <ahiemstra@heimr.nl>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#pragma once
8
9#include <QSGTexture>
10
11#include "shadowedrectanglematerial.h"
12
13/**
14 * A material rendering a rectangle with a shadow.
15 *
16 * This material uses a distance field shader to render a rectangle with a
17 * shadow below it, optionally with rounded corners.
18 */
20{
21public:
23
24 QSGMaterialShader *createShader(QSGRendererInterface::RenderMode) const override;
25 QSGMaterialType *type() const override;
26 int compare(const QSGMaterial *other) const override;
27
28 QSGTexture *textureSource = nullptr;
29
30 static QSGMaterialType staticType;
31};
32
33class ShadowedTextureShader : public ShadowedRectangleShader
34{
35public:
36 ShadowedTextureShader(ShadowedRectangleMaterial::ShaderType shaderType);
37
38 void
39 updateSampledImage(QSGMaterialShader::RenderState &state, int binding, QSGTexture **texture, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override;
40};
A material rendering a rectangle with a shadow.
A material rendering a rectangle with a shadow.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:05:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.