mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
94f543d114
commit
111757c3f4
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue