Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qcocoavulkaninstance.h
Go to the documentation of this file.
1// Copyright (C) 2018 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 QCOCOAVULKANINSTANCE_H
5#define QCOCOAVULKANINSTANCE_H
6
7// Include mvk_vulkan.h first. The order is important since
8// mvk_vulkan.h just defines VK_USE_PLATFORM_MACOS_MVK (or the IOS
9// variant) and includes vulkan.h. If something else included vulkan.h
10// before this then we wouldn't get the MVK specifics...
11#include <MoltenVK/mvk_vulkan.h>
12
13#include <QtCore/QHash>
14#include <QtGui/private/qbasicvulkanplatforminstance_p.h>
15
16QT_BEGIN_NAMESPACE
17
18class QCocoaVulkanInstance : public QBasicPlatformVulkanInstance
19{
20public:
21 QCocoaVulkanInstance(QVulkanInstance *instance);
22 ~QCocoaVulkanInstance();
23
24 void createOrAdoptInstance() override;
25
26 VkSurfaceKHR *surface(QWindow *window);
27
28private:
29 VkSurfaceKHR createSurface(NSView *view);
30
31 QVulkanInstance *m_instance = nullptr;
32 QLibrary m_lib;
33 VkSurfaceKHR m_nullSurface = nullptr;
34 PFN_vkCreateMacOSSurfaceMVK m_createSurface = nullptr;
35};
36
37QT_END_NAMESPACE
38
39#endif // QXCBVULKANINSTANCE_H
Combined button and popup list for selecting options.