summaryrefslogtreecommitdiffstats
path: root/client/x11/red_window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'client/x11/red_window.cpp')
-rw-r--r--client/x11/red_window.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/x11/red_window.cpp b/client/x11/red_window.cpp
index 83144a54..b6e11e14 100644
--- a/client/x11/red_window.cpp
+++ b/client/x11/red_window.cpp
@@ -2122,6 +2122,18 @@ void RedWindow::untouch_context()
glXMakeCurrent(x_display, 0, 0);
}
+void RedWindow::swap_gl()
+{
+ PixelsSource_p *pix_source = (PixelsSource_p*)get_opaque();
+ RedGlContext context = pix_source->x_drawable.context;
+
+ if (!context)
+ return;
+
+ glXMakeCurrent(x_display, get_window(), context);
+ glXSwapBuffers(x_display, get_window());
+}
+
void RedWindow::set_type_gl()
{
PixelsSource_p *pix_source = (PixelsSource_p*)get_opaque();