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
qwindowsvulkaninstance.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 QWINDOWSVULKANINSTANCE_H
5#define QWINDOWSVULKANINSTANCE_H
6
7#if defined(VULKAN_H_) && !defined(VK_USE_PLATFORM_WIN32_KHR)
8#error "vulkan.h included without Win32 WSI"
9#endif
10
11#define VK_USE_PLATFORM_WIN32_KHR
12
13#include <QtGui/private/qbasicvulkanplatforminstance_p.h>
14#include <QtCore/qlibrary.h>
15
16QT_BEGIN_NAMESPACE
17
18class QWindowsVulkanInstance : public QBasicPlatformVulkanInstance
19{
20 Q_DISABLE_COPY_MOVE(QWindowsVulkanInstance)
21public:
22 QWindowsVulkanInstance(QVulkanInstance *instance);
23
24 void createOrAdoptInstance() override;
25 bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window) override;
26
27 VkSurfaceKHR createSurface(HWND win);
28
29private:
30 QVulkanInstance *m_instance;
31 PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR m_getPhysDevPresSupport;
32 PFN_vkCreateWin32SurfaceKHR m_createSurface;
33};
34
36
37#endif // QWINDOWSVULKANINSTANCE_H