diff --git a/libvo/video_out.h b/libvo/video_out.h index 380e3b7f95..39ea26a53a 100644 --- a/libvo/video_out.h +++ b/libvo/video_out.h @@ -121,6 +121,7 @@ typedef struct { #define VOFLAG_SWSCALE 0x04 #define VOFLAG_FLIPPING 0x08 #define VOFLAG_HIDDEN 0x10 //< Use to create a hidden window +#define VOFLAG_STEREO 0x20 //< Use to create a stereo-capable window #define VOFLAG_XOVERLAY_SUB_VO 0x10000 typedef struct vo_info_s diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 2af082da71..ea454c8f0e 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -613,6 +613,8 @@ static int initGl(uint32_t d_width, uint32_t d_height) { static int create_window(uint32_t d_width, uint32_t d_height, uint32_t flags, const char *title) { + if (stereo_mode == GL_3D_QUADBUFFER) + flags |= VOFLAG_STEREO; #ifdef CONFIG_GL_WIN32 if (glctx.type == GLTYPE_W32 && !vo_w32_config(d_width, d_height, flags)) return -1; diff --git a/libvo/w32_common.c b/libvo/w32_common.c index c5ab27f0ac..7cf374f717 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -400,6 +400,8 @@ int vo_w32_config(uint32_t width, uint32_t height, uint32_t flags) { pfd.nSize = sizeof pfd; pfd.nVersion = 1; pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; + if (flags & VOFLAG_STEREO) + pfd.dwFlags |= PFD_STEREO; pfd.iPixelType = PFD_TYPE_RGBA; pfd.cColorBits = 24; pfd.iLayerType = PFD_MAIN_PLANE;