summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
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