12
12
namespace nbl ::video
13
13
{
14
14
15
- template <class Window , template <typename > typename Base, class CRTP = void >
16
- class CSurfaceGLImpl : public Base <Window>
15
+ template <class Window , template <typename , typename > typename Base, class CRTP = void >
16
+ class CSurfaceGLImpl : public Base <Window,ISurface >
17
17
{
18
18
public:
19
19
using this_t = std::conditional_t <std::is_void_v<CRTP>,CSurfaceGLImpl<Window,Base>,CRTP>;
20
- using base_t = Base<Window>;
20
+ using base_t = Base<Window,ISurface >;
21
21
22
22
template <video::E_API_TYPE API_TYPE>
23
23
static inline core::smart_refctd_ptr<this_t > create (core::smart_refctd_ptr<video::COpenGL_Connection<API_TYPE>>&& api, core::smart_refctd_ptr<Window>&& window)
@@ -96,36 +96,31 @@ using CSurfaceNativeGL = CSurfaceGLImpl<Window, CSurfaceNative, CRTP>;
96
96
// TODO: conditional defines
97
97
#ifdef _NBL_PLATFORM_WINDOWS_
98
98
using CSurfaceGLWin32 = CSurfaceGL<ui::IWindowWin32>;
99
- class CSurfaceNativeGLWin32 : public CSurfaceNativeGL <ui::IWindowWin32, CSurfaceNativeGLWin32>
99
+ class CSurfaceNativeGLWin32 : public CSurfaceNativeGL <ui::IWindowWin32,CSurfaceNativeGLWin32>
100
100
{
101
- protected:
102
- using base_t = CSurfaceNativeGL<ui::IWindowWin32, CSurfaceNativeGLWin32>;
103
- using base_t ::base_t ;
104
-
105
- uint32_t getWidth () const override
106
- {
107
- RECT wr;
108
- GetWindowRect (m_handle, &wr);
109
- return wr.right - wr.left ;
110
- }
111
- uint32_t getHeight () const override
112
- {
113
- RECT wr;
114
- GetWindowRect (m_handle, &wr);
115
- return wr.top - wr.bottom ;
116
- }
101
+ protected:
102
+ using base_t = CSurfaceNativeGL<ui::IWindowWin32,CSurfaceNativeGLWin32>;
103
+ using base_t ::base_t ;
104
+
105
+ uint32_t getWidth () const override
106
+ {
107
+ RECT wr;
108
+ GetWindowRect (m_handle, &wr);
109
+ return wr.right - wr.left ;
110
+ }
111
+ uint32_t getHeight () const override
112
+ {
113
+ RECT wr;
114
+ GetWindowRect (m_handle, &wr);
115
+ return wr.top - wr.bottom ;
116
+ }
117
117
};
118
118
#elif defined(_NBL_PLATFORM_LINUX_)
119
119
using CSurfaceGLX11 = CSurfaceGL<ui::IWindowX11>;
120
120
#elif defined(_NBL_PLATFORM_ANDROID_)
121
121
using CSurfaceGLAndroid = CSurfaceGL<ui::IWindowAndroid>;
122
122
#endif
123
123
124
-
125
- // using CSurfaceGLAndroid = CSurfaceGL<ui::IWindowAndroid>;
126
- // using CSurfaceGLX11 = CSurfaceGL<ui::IWindowX11>;
127
- // using CSurfaceGLWayland = CSurfaceGL<ui::IWindowWayland>;
128
-
129
124
}
130
125
131
126
#endif
0 commit comments