1 | // Copyright (C) 2019 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef VULKANWRAPPER_H |
5 | #define VULKANWRAPPER_H |
6 | |
7 | #include <QOpenGLContext> |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | class VulkanWrapper; |
12 | struct VulkanImageWrapper; |
13 | class VulkanWrapperPrivate; |
14 | |
15 | class QOpenGLContext; |
16 | class QImage; |
17 | |
18 | class VulkanWrapper |
19 | { |
20 | public: |
21 | VulkanWrapper(QOpenGLContext *glContext); |
22 | |
23 | VulkanImageWrapper *createTextureImage(const QImage &img); |
24 | VulkanImageWrapper *createTextureImageFromData(const uchar *pixels, uint bufferSize, const QSize &size, uint glInternalFormat); |
25 | int getImageInfo(const VulkanImageWrapper *imgWrapper, int *memSize, int *w = nullptr, int *h = nullptr); |
26 | void freeTextureImage(VulkanImageWrapper *imageWrapper); |
27 | |
28 | private: |
29 | VulkanWrapperPrivate *d_ptr; |
30 | }; |
31 | |
32 | QT_END_NAMESPACE |
33 | |
34 | #endif // VULKANWRAPPER_H |
35 |