You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
632 B
38 lines
632 B
1 week ago
|
#ifndef VULKANWINDOW_H
|
||
|
#define VULKANWINDOW_H
|
||
|
|
||
|
#include <QObject>
|
||
|
#include <QWindow>
|
||
|
#include <QDebug>
|
||
|
#include <QX11Info>
|
||
|
|
||
|
#include "Types.h"
|
||
|
|
||
|
#ifdef Q_OS_ANDROID
|
||
|
#include <vulkan_android.h>
|
||
|
#else
|
||
|
#include <vulkan_xcb.h>
|
||
|
#endif
|
||
|
|
||
|
|
||
|
#define VK_USE_PLATFORM_XCB_KHR // Enable Vulkan support for Linux (XCB)
|
||
|
#define VK_USE_PLATFORM_ANDROID_KHR // Enable Vulkan support for Android
|
||
|
|
||
|
class VulkanWindow : public QWindow
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
VulkanWindow();
|
||
|
virtual ~VulkanWindow();
|
||
|
|
||
|
private:
|
||
|
void createVulkanSurface();
|
||
|
void cleanup();
|
||
|
|
||
|
VkSurfaceKHR _surface;
|
||
|
VkInstance _instance;
|
||
|
};
|
||
|
|
||
|
#endif // VULKANWINDOW_H
|