diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-02-24 20:10:45 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-02-24 20:10:45 +0000 |
| commit | e4a86e26c6a63794bda4d6423458ab36829c8014 (patch) | |
| tree | d2a5af5ec657b9962f9e241706e82da360922ca2 /Graphics/GraphicsEngineOpenGL | |
| parent | Enabled VSync control in GL backend (on Windows and Linux) (diff) | |
| download | DiligentCore-e4a86e26c6a63794bda4d6423458ab36829c8014.tar.gz DiligentCore-e4a86e26c6a63794bda4d6423458ab36829c8014.zip | |
Fixed Linux build issues
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/include/pch.h | 1 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/GLContextLinux.cpp | 7 |
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 |
