summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-02-03 08:32:13 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-02-03 08:32:13 +0000
commit06f060ffccac6fd625a796ba21d39fdde02ded68 (patch)
tree2b72be9d63c3152f47d54af508e2d4b567c12b30 /Graphics/GraphicsEngineOpenGL
parentFixed issue with Platform definitions (diff)
downloadDiligentCore-06f060ffccac6fd625a796ba21d39fdde02ded68.tar.gz
DiligentCore-06f060ffccac6fd625a796ba21d39fdde02ded68.zip
Fixed another linux build issue
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/GLContextLinux.hpp4
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/GLContextLinux.cpp10
2 files changed, 7 insertions, 7 deletions
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<Window>(reinterpret_cast<size_t>(m_pNativeWindow));
+ auto wnd = static_cast<Window>(m_WindowId);
auto display = reinterpret_cast<Display*>(m_pDisplay);
glXSwapBuffers(display, wnd);
}