Platform/WindowManager: Rename to WindowBackend
This commit is contained in:
@@ -30,10 +30,7 @@ namespace Nz::GL
|
||||
template<typename FuncType, typename Func>
|
||||
bool Load(Func& func, const char* funcName, bool mandatory, bool implementFallback = true)
|
||||
{
|
||||
FuncType funcPtr = LoadRaw<FuncType>(funcName);
|
||||
if (funcPtr)
|
||||
func = funcPtr;
|
||||
|
||||
func = LoadRaw<FuncType>(funcName);
|
||||
if (!func)
|
||||
{
|
||||
if (!implementFallback || (!loader.ImplementFallback(funcName) && !func)) //< double-check
|
||||
@@ -151,22 +148,22 @@ namespace Nz::GL
|
||||
std::unique_ptr<EGLContextBase> context;
|
||||
switch (handle.type)
|
||||
{
|
||||
case WindowManager::Invalid:
|
||||
case WindowBackend::Invalid:
|
||||
break;
|
||||
|
||||
case WindowManager::X11:
|
||||
case WindowBackend::X11:
|
||||
#ifdef NAZARA_PLATFORM_LINUX
|
||||
context = std::make_unique<EGLContextX11>(device, *this);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case WindowManager::Windows:
|
||||
case WindowBackend::Windows:
|
||||
#ifdef NAZARA_PLATFORM_WINDOWS
|
||||
context = std::make_unique<EGLContextWin32>(device, *this);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case WindowManager::Wayland:
|
||||
case WindowBackend::Wayland:
|
||||
#ifdef NAZARA_PLATFORM_LINUX
|
||||
context = std::make_unique<EGLContextWayland>(device, *this);
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Nz::GL
|
||||
{
|
||||
bool EGLContextWayland::Create(const ContextParams& params, WindowHandle window, const EGLContextBase* shareContext)
|
||||
{
|
||||
assert(window.type == WindowManager::Wayland);
|
||||
assert(window.type == WindowBackend::Wayland);
|
||||
|
||||
NazaraError("Wayland is not yet supported");
|
||||
return false;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Nz::GL
|
||||
{
|
||||
bool EGLContextX11::Create(const ContextParams& params, WindowHandle window, const EGLContextBase* shareContext)
|
||||
{
|
||||
assert(window.type == WindowManager::X11);
|
||||
assert(window.type == WindowBackend::X11);
|
||||
|
||||
Destroy(); //< In case a previous display or surface hasn't been released
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Nz::GL
|
||||
|
||||
bool WGLContext::Create(const WGLContext* baseContext, const ContextParams& params, WindowHandle window, const WGLContext* shareContext)
|
||||
{
|
||||
NazaraAssert(window.type == WindowManager::Windows, "expected Windows window");
|
||||
NazaraAssert(window.type == WindowBackend::Windows, "expected Windows window");
|
||||
|
||||
Destroy();
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Nz::GL
|
||||
::ShowWindow(window.get(), FALSE);
|
||||
|
||||
WindowHandle windowHandle;
|
||||
windowHandle.type = WindowManager::Windows;
|
||||
windowHandle.type = WindowBackend::Windows;
|
||||
windowHandle.windows.window = window.get();
|
||||
|
||||
if (!Create(params, windowHandle, shareContext))
|
||||
@@ -34,7 +34,7 @@ namespace Nz::GL
|
||||
|
||||
bool EGLContextWin32::Create(const ContextParams& params, WindowHandle window, const EGLContextBase* shareContext)
|
||||
{
|
||||
assert(window.type == WindowManager::Windows);
|
||||
assert(window.type == WindowBackend::Windows);
|
||||
|
||||
Destroy(); //< In case a previous display or surface hasn't been released
|
||||
|
||||
|
||||
Reference in New Issue
Block a user