summaryrefslogtreecommitdiffstats
path: root/src/graphs3d/utils/qutils.h
blob: 6dd534c956a962eb5d3d1e5b31e6083ab105d0ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef QTGRAPHS_QUTILS_H
#define QTGRAPHS_QUTILS_H

#include <QtGraphs/qgraphsglobal.h>
#include <QtCore/qcoreapplication.h>
#include <QtGui/qsurfaceformat.h>
#include <QtQuick3D/qquick3d.h>


QT_BEGIN_NAMESPACE

[[maybe_unused]] static inline QSurfaceFormat qDefaultSurfaceFormat(bool antialias)
{
    QSurfaceFormat surfaceFormat;

    if (antialias)
        surfaceFormat = QQuick3D::idealSurfaceFormat(8);
    else
        surfaceFormat = QQuick3D::idealSurfaceFormat();

    return surfaceFormat;
}

QT_END_NAMESPACE

#endif