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
qwaylandvulkaninstance_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 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 QWAYLANDVULKANINSTANCE_P_H
5#define QWAYLANDVULKANINSTANCE_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 purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#if defined(VULKAN_H_) && !defined(VK_USE_PLATFORM_WAYLAND_KHR)
19#error "vulkan.h included without Wayland WSI"
20#endif
21
22#define VK_USE_PLATFORM_WAYLAND_KHR
23
24#include <QtGui/private/qbasicvulkanplatforminstance_p.h>
25#include <QLibrary>
26
28
29namespace QtWaylandClient {
30
31class QWaylandWindow;
32
34{
35public:
36 explicit QWaylandVulkanInstance(QVulkanInstance *instance);
38
39 void createOrAdoptInstance() override;
40 bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window) override;
42
43 VkSurfaceKHR createSurface(QWaylandWindow *window);
44
45 void beginFrame(QWindow *window) override;
46 void endFrame(QWindow *window) override;
47
48private:
49 QVulkanInstance *m_instance = nullptr;
50 PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR m_getPhysDevPresSupport = nullptr;
51 PFN_vkCreateWaylandSurfaceKHR m_createSurface = nullptr;
52 int mFrameCallbackTimeout = 100;
53};
54
55} // namespace QtWaylandClient
56
58
59#endif // QWAYLANDVULKANINSTANCE_P_H
A generic platform Vulkan instance implementation.
The QVulkanInstance class represents a native Vulkan instance, enabling Vulkan rendering onto a QSurf...
\inmodule QtGui
Definition qwindow.h:63
VkSurfaceKHR createSurface(QWaylandWindow *window)
void presentAboutToBeQueued(QWindow *window) override
bool supportsPresent(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, QWindow *window) override
Combined button and popup list for selecting options.
aWidget window() -> setWindowTitle("New Window Title")
[2]