Vulkan SDK for Android 1.1.1 Mali Developer Center
xcb.hpp
1 #ifndef PLATFORM_XCB_HPP
2 #define PLATFORM_XCB_HPP
3 
4 #include "platform.hpp"
5 #include "platform/os/linux.hpp"
6 #include "platform/wsi/wsi.hpp"
7 
8 namespace MaliSDK
9 {
10 
12 class XCBPlatform : public WSIPlatform
13 {
14 public:
15  XCBPlatform();
16  virtual ~XCBPlatform();
17 
20  virtual Result initialize() override;
21 
24  virtual SwapchainDimensions getPreferredSwapchain() override;
25 
32  virtual Result createWindow(const SwapchainDimensions &swapchain) override;
33 
36  virtual Status getWindowStatus() override;
37 
42  virtual Result presentImage(unsigned index) override;
43 
45  virtual void terminate() override;
46 
47 private:
48  xcb_connection_t *connection;
49  xcb_window_t window;
50  Platform::Status status;
51  xcb_intern_atom_reply_t *atom_delete_window;
52 
53  void handleEvents();
54 
55  LinuxAssetManager assetManager;
56  virtual VkSurfaceKHR createSurface() override;
57 };
58 }
59 
60 #endif
The Linux asset manager. It is based on regular fopen(), with the exception that all paths passed to ...
Definition: linux.hpp:35
virtual Result createWindow(const SwapchainDimensions &swapchain) override
Creates a window with desired swapchain dimensions.
Definition: xcb.cpp:107
virtual void terminate() override
Terminates the platform.
Definition: xcb.cpp:112
virtual Result initialize() override
Initialize the platform.
Definition: xcb.cpp:61
Describes the size and format of the swapchain.
Definition: platform.hpp:54
Status
Describes the status of the application lifecycle.
Definition: platform.hpp:65
virtual Result presentImage(unsigned index) override
Presents an image to the swapchain.
Definition: xcb.cpp:133
The XCB specific platform. Inherits from WSIPlatform.
Definition: xcb.hpp:12
virtual Status getWindowStatus() override
Gets current window status.
Definition: xcb.cpp:35
The WSI platform is a common platform for all platforms which support the VK_KHRSurface extension...
Definition: wsi.hpp:36
virtual SwapchainDimensions getPreferredSwapchain() override
Gets the preferred swapchain size.
Definition: xcb.cpp:101