File indexing completed on 2024-05-12 07:52:10
0001 /* 0002 * This file is part of KQuickCharts 0003 * SPDX-FileCopyrightText: 2019 Arjen Hiemstra <ahiemstra@heimr.nl> 0004 * 0005 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 0008 #include "SDFShader.h" 0009 0010 #include <QOpenGLContext> 0011 #include <QSurfaceFormat> 0012 0013 static const char shaderRoot[] = ":/qt/qml/org/kde/quickcharts/shaders/"; 0014 0015 SDFShader::SDFShader() 0016 { 0017 } 0018 0019 SDFShader::~SDFShader() 0020 { 0021 } 0022 0023 void SDFShader::setShaders(const QString &vertex, const QString &fragment) 0024 { 0025 setShaderFileName(QSGMaterialShader::VertexStage, QLatin1String(shaderRoot) + vertex + QLatin1String(".qsb")); 0026 setShaderFileName(QSGMaterialShader::FragmentStage, QLatin1String(shaderRoot) + fragment + QLatin1String(".qsb")); 0027 }