From 06f060ffccac6fd625a796ba21d39fdde02ded68 Mon Sep 17 00:00:00 2001 From: assiduous Date: Mon, 3 Feb 2020 00:32:13 -0800 Subject: Fixed another linux build issue --- Graphics/GraphicsEngineOpenGL/include/GLContextLinux.hpp | 4 ++-- Graphics/GraphicsEngineOpenGL/src/GLContextLinux.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/include/GLContextLinux.hpp b/Graphics/GraphicsEngineOpenGL/include/GLContextLinux.hpp index 2e30183f..5e616492 100644 --- a/Graphics/GraphicsEngineOpenGL/include/GLContextLinux.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/GLContextLinux.hpp @@ -38,8 +38,8 @@ public: NativeGLContextType GetCurrentNativeGLContext(); private: - void* m_pNativeWindow = nullptr; - void* m_pDisplay = nullptr; + Uint32 m_WindowId = 0; + void* m_pDisplay = nullptr; NativeGLContextType m_Context; }; diff --git a/Graphics/GraphicsEngineOpenGL/src/GLContextLinux.cpp b/Graphics/GraphicsEngineOpenGL/src/GLContextLinux.cpp index 8a3174fe..e091b8cc 100644 --- a/Graphics/GraphicsEngineOpenGL/src/GLContextLinux.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/GLContextLinux.cpp @@ -87,7 +87,7 @@ void openglCallbackFunction(GLenum source, GLContext::GLContext(const EngineGLCreateInfo& InitAttribs, DeviceCaps& deviceCaps, const struct SwapChainDesc* /*pSCDesc*/) : m_Context(0), - m_pNativeWindow(InitAttribs.Window.pWindow), + m_WindowId(InitAttribs.Window.WindowId), m_pDisplay(InitAttribs.Window.pDisplay) { auto CurrentCtx = glXGetCurrentContext(); @@ -101,7 +101,7 @@ GLContext::GLContext(const EngineGLCreateInfo& InitAttribs, DeviceCaps& deviceCa if (GLEW_OK != err) LOG_ERROR_AND_THROW("Failed to initialize GLEW"); - if (InitAttribs.Window.pWindow != nullptr && InitAttribs.Window.pDisplay != nullptr) + if (InitAttribs.Window.WindowId != 0 && InitAttribs.Window.pDisplay != nullptr) { //glXSwapIntervalEXT(0); @@ -127,7 +127,7 @@ GLContext::GLContext(const EngineGLCreateInfo& InitAttribs, DeviceCaps& deviceCa //Or better yet, use the GL3 way to get the version number glGetIntegerv(GL_MAJOR_VERSION, &MajorVersion); glGetIntegerv(GL_MINOR_VERSION, &MinorVersion); - LOG_INFO_MESSAGE(InitAttribs.Window.pWindow != nullptr ? "Initialized OpenGL " : "Attached to OpenGL ", MajorVersion, '.', MinorVersion, " context (", GLVersionString, ", ", GLRenderer, ')'); + LOG_INFO_MESSAGE(InitAttribs.Window.WindowId != 0 ? "Initialized OpenGL " : "Attached to OpenGL ", MajorVersion, '.', MinorVersion, " context (", GLVersionString, ", ", GLRenderer, ')'); // Under the standard filtering rules for cubemaps, filtering does not work across faces of the cubemap. // This results in a seam across the faces of a cubemap. This was a hardware limitation in the past, but @@ -157,9 +157,9 @@ GLContext::~GLContext() void GLContext::SwapBuffers() { - if (m_pNativeWindow != nullptr && m_pDisplay != nullptr) + if (m_WindowId != nullptr && m_pDisplay != nullptr) { - auto wnd = static_cast(reinterpret_cast(m_pNativeWindow)); + auto wnd = static_cast(m_WindowId); auto display = reinterpret_cast(m_pDisplay); glXSwapBuffers(display, wnd); } -- cgit v1.2.3