summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-07-05 19:40:21 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:14:20 +0200
commit14d00a65e9641c44721879c62a3a992fdd746c69 (patch)
tree0a3ffb76b975e5b42c40dfac0057361fd8f20eec /libvo
parent42a8c42eb2cd66debdab3c1da79bfcd290a27964 (diff)
downloadmpv-14d00a65e9641c44721879c62a3a992fdd746c69.tar.bz2
mpv-14d00a65e9641c44721879c62a3a992fdd746c69.tar.xz
vo_gl: Try to get a quadbuffered visual for corresponding 3D mode
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31638 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 0708769553..b8d35088ca 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -609,7 +609,19 @@ static int create_window(uint32_t d_width, uint32_t d_height, uint32_t flags, co
#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");