From 111757c3f424963a5ceaafbb358183de0ea7f6e3 Mon Sep 17 00:00:00 2001 From: reimar Date: Wed, 10 Nov 2010 22:48:41 +0000 Subject: vo_gl: create stereo-capable window when using Quadbuffer 3D Select a stereo pixel format for window when Quadbuffer OpenGL was selected as 3D mode. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32620 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/video_out.h | 1 + libvo/vo_gl.c | 2 ++ libvo/w32_common.c | 2 ++ 3 files changed, 5 insertions(+) (limited to 'libvo') 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; -- cgit v1.2.3