mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
[287/906] fix a regression about glXChooseVisual which failed when using mesa, so attributes must be less restrictives.
This commit is contained in:
parent
76b6fcab5b
commit
20298ee810
1 changed files with 7 additions and 9 deletions
|
@ -251,16 +251,8 @@ gst_gl_window_new (gint width, gint height)
|
||||||
|
|
||||||
gint attrib[] = {
|
gint attrib[] = {
|
||||||
GLX_RGBA,
|
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_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
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -322,6 +314,12 @@ gst_gl_window_new (gint width, gint height)
|
||||||
|
|
||||||
priv->visual_info = glXChooseVisual (priv->device, priv->screen_num, attrib);
|
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)
|
if (priv->visual_info->visual != priv->visual)
|
||||||
g_debug ("selected visual is different from the default\n");
|
g_debug ("selected visual is different from the default\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue