Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qplatformvulkaninstance.h
Go to the documentation of this file.
1// Copyright (C) 2017 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 QPLATFORMVULKANINSTANCE_H
5#define QPLATFORMVULKANINSTANCE_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is part of the QPA API and is not meant to be used
12// in applications. Usage of this API may make your code
13// source and binary incompatible with future versions of Qt.
14//
15
16#include <QtGui/qtguiglobal.h>
17
18#if QT_CONFIG(vulkan) || defined(Q_QDOC)
19
20#include <qvulkaninstance.h>
21
23
25
26class Q_GUI_EXPORT QPlatformVulkanInstance
27{
28 Q_DECLARE_PRIVATE(QPlatformVulkanInstance)
29
30public:
33
34 virtual QVulkanInfoVector<QVulkanLayer> supportedLayers() const = 0;
35 virtual QVulkanInfoVector<QVulkanExtension> supportedExtensions() const = 0;
36 virtual QVersionNumber supportedApiVersion() const = 0;
37 virtual void createOrAdoptInstance() = 0;
38 virtual bool isValid() const = 0;
39 virtual VkResult errorCode() const = 0;
40 virtual VkInstance vkInstance() const = 0;
41 virtual QByteArrayList enabledLayers() const = 0;
42 virtual QByteArrayList enabledExtensions() const = 0;
43 virtual PFN_vkVoidFunction getInstanceProcAddr(const char *name) = 0;
44 virtual bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window) = 0;
45 virtual void presentAboutToBeQueued(QWindow *window);
46 virtual void presentQueued(QWindow *window);
47 virtual void setDebugFilters(const QList<QVulkanInstance::DebugFilter> &filters);
48 virtual void setDebugUtilsFilters(const QList<QVulkanInstance::DebugUtilsFilter> &filters);
49 virtual void beginFrame(QWindow *window);
50 virtual void endFrame(QWindow *window);
51
52private:
53 QScopedPointer<QPlatformVulkanInstancePrivate> d_ptr;
54 Q_DISABLE_COPY(QPlatformVulkanInstance)
55};
56
58
59#endif // QT_CONFIG(vulkan)
60
61#if defined(Q_QDOC)
62/*
63 The following include file did not exist for clang-qdoc running
64 in macOS, but the classes are documented in qvulkanfunctions.cpp.
65 clang-qdoc must parse the class declarations in an include file,
66 or else it can't find a place to put the documentation for the
67 classes. Apparently these classes are created at build time if
68 Vulkan is present.
69 */
70#ifndef QVULKANFUNCTIONS_H
71#define QVULKANFUNCTIONS_H
72
73#include <QtGui/qtguiglobal.h>
74
75#if QT_CONFIG(vulkan) || defined(Q_QDOC)
76
77#ifndef VK_NO_PROTOTYPES
78#define VK_NO_PROTOTYPES
79#endif
80#include <vulkan/vulkan.h>
81
82#include <QtCore/qscopedpointer.h>
83
85
86class QVulkanInstance;
87class QVulkanFunctionsPrivate;
88class QVulkanDeviceFunctionsPrivate;
89
90class Q_GUI_EXPORT QVulkanFunctions
91{
92public:
94
95private:
96 Q_DISABLE_COPY(QVulkanFunctions)
98
99 QScopedPointer<QVulkanFunctionsPrivate> d_ptr;
100 friend class QVulkanInstance;
101};
102
103class Q_GUI_EXPORT QVulkanDeviceFunctions
104{
105public:
107
108private:
109 Q_DISABLE_COPY(QVulkanDeviceFunctions)
111
112 QScopedPointer<QVulkanDeviceFunctionsPrivate> d_ptr;
113 friend class QVulkanInstance;
114};
115
117
118#endif // QT_CONFIG(vulkan) || defined(Q_QDOC)
119#endif // QVULKANFUNCTIONS_H;
120#endif // Q_QDOC
121
122#endif // QPLATFORMVULKANINSTANCE_H
IOBluetoothDevice * device
\inmodule QtCore
The QPlatformVulkanInstance class provides an abstraction for Vulkan instances.
\inmodule QtCore
The QVulkanDeviceFunctions class provides cross-platform access to the device level core Vulkan 1....
The QVulkanFunctions class provides cross-platform access to the instance level core Vulkan 1....
The QVulkanInstance class represents a native Vulkan instance, enabling Vulkan rendering onto a QSurf...
\inmodule QtGui
Definition qwindow.h:63
Combined button and popup list for selecting options.
GLuint name
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]
aWidget window() -> setWindowTitle("New Window Title")
[2]