1/*
2 * This file is part of KQuickCharts
3 * SPDX-FileCopyrightText: 2019 Arjen Hiemstra <ahiemstra@heimr.nl>
4 *
5 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7
8#include "SDFShader.h"
9
10#include <QOpenGLContext>
11#include <QSurfaceFormat>
12
13static const char shaderRoot[] = ":/qt/qml/org/kde/quickcharts/shaders/";
14
15SDFShader::SDFShader()
16{
17}
18
19SDFShader::~SDFShader()
20{
21}
22
23void SDFShader::setShaders(const QString &vertex, const QString &fragment)
24{
25 setShaderFileName(stage: QSGMaterialShader::VertexStage, filename: QLatin1String(shaderRoot) + vertex + QLatin1String(".qsb"));
26 setShaderFileName(stage: QSGMaterialShader::FragmentStage, filename: QLatin1String(shaderRoot) + fragment + QLatin1String(".qsb"));
27}
28

source code of kquickcharts/src/scenegraph/SDFShader.cpp