summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-02-24 20:10:45 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-02-24 20:10:45 +0000
commite4a86e26c6a63794bda4d6423458ab36829c8014 (patch)
treed2a5af5ec657b9962f9e241706e82da360922ca2 /Graphics/GraphicsEngineOpenGL
parentEnabled VSync control in GL backend (on Windows and Linux) (diff)
downloadDiligentCore-e4a86e26c6a63794bda4d6423458ab36829c8014.tar.gz
DiligentCore-e4a86e26c6a63794bda4d6423458ab36829c8014.zip
Fixed Linux build issues
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/pch.h1
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/GLContextLinux.cpp7
2 files changed, 4 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/include/pch.h b/Graphics/GraphicsEngineOpenGL/include/pch.h
index 384b1ae5..739cfa4c 100644
--- a/Graphics/GraphicsEngineOpenGL/include/pch.h
+++ b/Graphics/GraphicsEngineOpenGL/include/pch.h
@@ -62,6 +62,7 @@
# endif
# include "GL/glew.h"
+# include "GL/glxew.h"
# include <GL/glx.h>
// Undefine beautiful defines from GL/glx.h -> X11/Xlib.h
diff --git a/Graphics/GraphicsEngineOpenGL/src/GLContextLinux.cpp b/Graphics/GraphicsEngineOpenGL/src/GLContextLinux.cpp
index dac8af2d..6abc2822 100644
--- a/Graphics/GraphicsEngineOpenGL/src/GLContextLinux.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/GLContextLinux.cpp
@@ -159,15 +159,14 @@ void GLContext::SwapBuffers(int SwapInterval)
{
if (m_WindowId != 0 && m_pDisplay != nullptr)
{
+ auto wnd = static_cast<Window>(m_WindowId);
+ auto display = reinterpret_cast<Display*>(m_pDisplay);
#if GLX_EXT_swap_control
if (glXSwapIntervalEXT != nullptr)
{
- glXSwapIntervalEXT(SwapInterval);
+ glXSwapIntervalEXT(display, wnd, SwapInterval);
}
#endif
-
- auto wnd = static_cast<Window>(m_WindowId);
- auto display = reinterpret_cast<Display*>(m_pDisplay);
glXSwapBuffers(display, wnd);
}
else