Skip to content

Commit a55cbe6

Browse files
Hello Swapchain Example finished
1 parent 1e2c964 commit a55cbe6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

include/nbl/video/surface/ISurface.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ class ISurface : public core::IReferenceCounted
194194

195195
virtual bool getSurfaceCapabilitiesForPhysicalDevice(const IPhysicalDevice* physicalDevice, ISurface::SCapabilities& capabilities) const = 0;
196196

197+
virtual ui::IWindow* getWindow() = 0;
198+
inline const ui::IWindow* getWindow() const {return const_cast<ui::IWindow*>(const_cast<ISurface*>(this)->getWindow());}
199+
197200
// used by some drivers
198201
virtual const void* getNativeWindowHandle() const = 0;
199202
};
@@ -203,6 +206,11 @@ template<class Window, class ImmediateBase>
203206
class CSurface : public ImmediateBase
204207
{
205208
public:
209+
inline ui::IWindow* getWindow() override final
210+
{
211+
return m_window.get();
212+
}
213+
206214
inline const void* getNativeWindowHandle() const override final
207215
{
208216
return m_window->getNativeHandle();

0 commit comments

Comments
 (0)