[287/906] fix a regression about glXChooseVisual which failed when using mesa, so attributes must be less restrictives.

This commit is contained in:
julien 2008-12-13 19:36:32 -05:00 committed by Tim-Philipp Müller
parent 76b6fcab5b
commit 20298ee810

View file

@ -251,16 +251,8 @@ gst_gl_window_new (gint width, gint height)
gint attrib[] = {
GLX_RGBA,
GLX_RED_SIZE, 8, GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8,
GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1,
GLX_DOUBLEBUFFER,
GLX_DEPTH_SIZE, 8,
GLX_ALPHA_SIZE, 8,
GLX_STENCIL_SIZE, 8,
GLX_ACCUM_RED_SIZE, 8,
GLX_ACCUM_GREEN_SIZE, 8,
GLX_ACCUM_BLUE_SIZE, 8,
GLX_ACCUM_ALPHA_SIZE, 8,
GLX_LEVEL, 0,
None
};
@ -322,6 +314,12 @@ gst_gl_window_new (gint width, gint height)
priv->visual_info = glXChooseVisual (priv->device, priv->screen_num, attrib);
if (!priv->visual_info)
{
g_warning ("glx visual is null (bad attributes)\n");
return NULL;
}
if (priv->visual_info->visual != priv->visual)
g_debug ("selected visual is different from the default\n");