More Linux fixes

This commit is contained in:
Lynix 2020-05-27 21:01:14 +02:00
parent 7ed0543ad2
commit 4f9380da11
4 changed files with 6 additions and 5 deletions

View File

@ -14,7 +14,7 @@ namespace Nz
{ {
enum class WindowManager enum class WindowManager
{ {
None, Invalid,
X11, X11,
Wayland, Wayland,
@ -23,7 +23,7 @@ namespace Nz
struct WindowHandle struct WindowHandle
{ {
WindowManager type = WindowManager::None; WindowManager type = WindowManager::Invalid;
union union
{ {

View File

@ -27,8 +27,9 @@
namespace GLX namespace GLX
{ {
#include <GL/glx.h> // Defined in a namespace to avoid conflict #include <GL/glx.h> // Defined in a namespace to avoid conflict
}
#include <GL/glxext.h> #include <GL/glxext.h>
}
#endif #endif
namespace Nz namespace Nz

View File

@ -141,7 +141,7 @@ namespace Nz
} }
// If context is shared by multiple windows // If context is shared by multiple windows
if (parameters.window) if (parameters.window.type != WindowManager::Invalid)
{ {
NazaraAssert(parameters.window.type == WindowManager::X11, "Cannot create a context for a non-x11 window"); NazaraAssert(parameters.window.type == WindowManager::X11, "Cannot create a context for a non-x11 window");

View File

@ -25,7 +25,7 @@ namespace Nz
bool ContextImpl::Create(ContextParameters& parameters) bool ContextImpl::Create(ContextParameters& parameters)
{ {
if (parameters.window.type != WindowManager::None) if (parameters.window.type != WindowManager::Invalid)
{ {
NazaraAssert(parameters.window.type == WindowManager::Windows, "Cannot create a context for a non-win32 window"); NazaraAssert(parameters.window.type == WindowManager::Windows, "Cannot create a context for a non-win32 window");