diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-11-10 22:48:41 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-14 12:32:00 +0200 |
commit | 111757c3f424963a5ceaafbb358183de0ea7f6e3 (patch) | |
tree | 87faf116a4bb5aa2667dff9d11bfed59f171a795 /libvo | |
parent | 94f543d114560dae933c102bd861e801fb37a280 (diff) | |
download | mpv-111757c3f424963a5ceaafbb358183de0ea7f6e3.tar.bz2 mpv-111757c3f424963a5ceaafbb358183de0ea7f6e3.tar.xz |
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
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/video_out.h | 1 | ||||
-rw-r--r-- | libvo/vo_gl.c | 2 | ||||
-rw-r--r-- | libvo/w32_common.c | 2 |
3 files changed, 5 insertions, 0 deletions
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; |