Mercurial > mplayer.hg
changeset 31572:69bfe6277214
Try to get a quadbuffered visual if the corresponding 3D mode was selected.
author | reimar |
---|---|
date | Mon, 05 Jul 2010 19:40:21 +0000 |
parents | c45b2b0d48ff |
children | 8104d7a99bda |
files | libvo/vo_gl.c |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_gl.c Mon Jul 05 19:34:08 2010 +0000 +++ b/libvo/vo_gl.c Mon Jul 05 19:40:21 2010 +0000 @@ -590,7 +590,19 @@ #ifdef CONFIG_GL_X11 if (glctx.type == GLTYPE_X11) { static int default_glx_attribs[] = {GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, None}; - XVisualInfo *vinfo=glXChooseVisual(mDisplay, mScreen, default_glx_attribs); + static int stereo_glx_attribs[] = { + GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,GLX_BLUE_SIZE, 1, + GLX_DOUBLEBUFFER, GLX_STEREO, None + }; + XVisualInfo *vinfo = NULL; + if (stereo_mode == GL_3D_QUADBUFFER) { + vinfo = glXChooseVisual(mDisplay, mScreen, stereo_glx_attribs); + if (!vinfo) + mp_msg(MSGT_VO, MSGL_ERR, "[gl] Could not find a stereo visual, " + "3D will probably not work!\n"); + } + if (!vinfo) + vinfo = glXChooseVisual(mDisplay, mScreen, default_glx_attribs); if (vinfo == NULL) { mp_msg(MSGT_VO, MSGL_ERR, "[gl] no GLX support present\n");