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
qandroidplatformvulkanwindow.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 QANDROIDPLATFORMVULKANWINDOW_H
5#define QANDROIDPLATFORMVULKANWINDOW_H
6
7#if defined(VULKAN_H_) && !defined(VK_USE_PLATFORM_ANDROID_KHR)
8#error "vulkan.h included without Android WSI"
9#endif
10
11#define VK_USE_PLATFORM_ANDROID_KHR
12
15
16#include <QWaitCondition>
17#include <QtCore/QJniEnvironment>
18#include <QtCore/QJniObject>
19
21
23{
24public:
25 explicit QAndroidPlatformVulkanWindow(QWindow *window);
27
28 void setGeometry(const QRect &rect) override;
29 QSurfaceFormat format() const override;
31
33
34protected:
35 void clearSurface() override;
36
37private:
38 void destroyAndClearSurface();
39
40 ANativeWindow *m_nativeWindow;
41 QSurfaceFormat m_format;
42 VkSurfaceKHR m_vkSurface;
43 PFN_vkCreateAndroidSurfaceKHR m_createVkSurface;
44 PFN_vkDestroySurfaceKHR m_destroyVkSurface;
45};
46
47QT_END_NAMESPACE
48
49#endif // QANDROIDPLATFORMVULKANWINDOW_H
void applicationStateChanged(Qt::ApplicationState) override
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
QSurfaceFormat format() const override
Returns the actual surface format of the window.
QAndroidPlatformWindow(QWindow *window)
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.