[MPlayer-cvslog] r32620 - in trunk/libvo: video_out.h vo_gl.c w32_common.c

reimar subversion at mplayerhq.hu
Wed Nov 10 23:48:42 CET 2010


Author: reimar
Date: Wed Nov 10 23:48:41 2010
New Revision: 32620

Log:
gl/win32: select a stereo pixel format for window when
Quadbuffer OpenGL was selected as 3D mode.

Modified:
   trunk/libvo/video_out.h
   trunk/libvo/vo_gl.c
   trunk/libvo/w32_common.c

Modified: trunk/libvo/video_out.h
==============================================================================
--- trunk/libvo/video_out.h	Wed Nov 10 23:10:30 2010	(r32619)
+++ trunk/libvo/video_out.h	Wed Nov 10 23:48:41 2010	(r32620)
@@ -106,6 +106,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

Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c	Wed Nov 10 23:10:30 2010	(r32619)
+++ trunk/libvo/vo_gl.c	Wed Nov 10 23:48:41 2010	(r32620)
@@ -595,6 +595,8 @@ static int initGl(uint32_t d_width, uint
 
 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;

Modified: trunk/libvo/w32_common.c
==============================================================================
--- trunk/libvo/w32_common.c	Wed Nov 10 23:10:30 2010	(r32619)
+++ trunk/libvo/w32_common.c	Wed Nov 10 23:48:41 2010	(r32620)
@@ -397,6 +397,8 @@ int vo_w32_config(uint32_t width, uint32
     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;


More information about the MPlayer-cvslog mailing list