1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QVULKANDEFAULTINSTANCE_P_H
5#define QVULKANDEFAULTINSTANCE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of a number of Qt sources files. This header file may change from
13// version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/private/qtguiglobal_p.h>
19
20#if QT_CONFIG(vulkan)
21
22#include <QtGui/qvulkaninstance.h>
23
24QT_BEGIN_NAMESPACE
25
26struct Q_GUI_EXPORT QVulkanDefaultInstance
27{
28 enum Flag {
29 EnableValidation = 0x01
30 };
31 Q_DECLARE_FLAGS(Flags, Flag)
32
33 static Flags flags();
34 static void setFlag(Flag flag, bool on = true);
35 static bool hasInstance();
36 static QVulkanInstance *instance();
37 static void cleanup();
38};
39
40Q_DECLARE_OPERATORS_FOR_FLAGS(QVulkanDefaultInstance::Flags)
41
42QT_END_NAMESPACE
43
44#endif // QT_CONFIG(vulkan)
45
46#endif
47

source code of qtbase/src/gui/vulkan/qvulkandefaultinstance_p.h