Add support for quad-buffer stereo

Track the stereo status of windows using the new EXT_stereo_tree
GLX extension.

When stereo is enabled or disabled, a restart is triggered via
meta_restart() after a timeout, setting a _META_ENABLE_STEREO
property on the root window to indicate whether we should
turn on a stereo stage for clutter. The property avoids a loop,
since we need to enable stereo *before* initializing Clutter and GL,
but we need GL to figure out whether we have stereo windows.

Stereo windows are drawn to the stage using new functionality
in Cogl to setup a stereo context, select which buffer to draw
to, and draw either the left or right buffer of a stereo
texture_from_pixmap.
This commit is contained in:
Owen W. Taylor
2014-05-08 18:44:15 -04:00
committed by Ray Strode
parent 4c765238ae
commit c15c8facfe
14 changed files with 483 additions and 23 deletions

View File

@@ -47,6 +47,7 @@
#include <meta/main.h>
#include "util-private.h"
#include "display-private.h"
#include "stereo.h"
#include <meta/errors.h>
#include "ui.h"
#include <meta/prefs.h>
@@ -582,6 +583,9 @@ meta_init (void)
meta_init_backend (backend_gtype);
if (!meta_is_wayland_compositor ())
meta_stereo_init ();
meta_clutter_init ();
#ifdef HAVE_WAYLAND