@@ -36,18 +36,49 @@ namespace Ogre
3636{
3737 class VulkanWindow : public Window
3838 {
39+ protected:
40+ VulkanDevice *mDevice ;
41+
42+ public:
43+ VulkanWindow ( const String &title, uint32 width, uint32 height, bool fullscreenMode );
44+
45+ void _setDevice ( VulkanDevice *device );
46+ void _initialize ( TextureGpuManager *textureGpuManager ) override ;
47+ virtual void _initialize ( TextureGpuManager *textureGpuManager,
48+ const NameValuePairList *miscParams ) = 0;
49+ };
50+
51+ class VulkanWindowNull : public VulkanWindow
52+ {
53+ public:
54+ VulkanWindowNull ( const String &title, uint32 width, uint32 height, bool fullscreenMode );
55+
56+ void destroy () override ;
57+ void reposition ( int32 leftPt, int32 topPt ) override ;
58+ bool isClosed () const override ;
59+ void _setVisible ( bool visible ) override ;
60+ bool isVisible () const override ;
61+ void setHidden ( bool hidden ) override ;
62+ bool isHidden () const override ;
63+ void _initialize ( TextureGpuManager *textureGpuManager,
64+ const NameValuePairList *miscParams ) override ;
65+ void swapBuffers () override ;
66+ };
67+
68+ class VulkanWindowSwapChainBased : public VulkanWindow
69+ {
3970 public:
4071 enum Backend
4172 {
4273 BackendX11 = 1u << 0u
4374 };
4475 enum SwapchainStatus
4576 {
46- // / We already called VulkanWindow ::acquireNextSwapchain.
77+ // / We already called VulkanWindowSwapChainBased ::acquireNextSwapchain.
4778 // /
4879 // / Can only go into this state if we're coming from SwapchainReleased
4980 SwapchainAcquired,
50- // / We already called VulkanWindow ::getImageAcquiredSemaphore.
81+ // / We already called VulkanWindowSwapChainBased ::getImageAcquiredSemaphore.
5182 // / Further calls to getImageAcquiredSemaphore will return null.
5283 // / Ogre is rendering or intends to into this swapchain.
5384 // /
@@ -66,8 +97,6 @@ namespace Ogre
6697 bool mHwGamma ;
6798 bool mClosed ;
6899
69- VulkanDevice *mDevice ;
70-
71100 VkSurfaceKHR mSurfaceKHR ;
72101 VkSwapchainKHR mSwapchain ;
73102 FastArray<VkImage> mSwapchainImages ;
@@ -89,16 +118,11 @@ namespace Ogre
89118 void acquireNextSwapchain ();
90119
91120 public:
92- VulkanWindow ( const String &title, uint32 width, uint32 height, bool fullscreenMode );
93- ~VulkanWindow () override ;
121+ VulkanWindowSwapChainBased ( const String &title, uint32 width, uint32 height, bool fullscreenMode );
122+ ~VulkanWindowSwapChainBased () override ;
94123
95124 void destroy () override ;
96125
97- void _setDevice ( VulkanDevice *device );
98- void _initialize ( TextureGpuManager *textureGpuManager ) override ;
99- virtual void _initialize ( TextureGpuManager *textureGpuManager,
100- const NameValuePairList *miscParams ) = 0;
101-
102126 // / Returns null if getImageAcquiredSemaphore has already been called during this frame
103127 VkSemaphore getImageAcquiredSemaphore ();
104128
0 commit comments