mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 14:30:10 +01:00
If visual is 32bpp, set visual->alphaBits = 8.
This works since we always use XImages for color buffers. It wouldn't always work for Windows/Pixmaps.
This commit is contained in:
parent
39038c1169
commit
5935b16ff5
1 changed files with 8 additions and 0 deletions
|
|
@ -511,6 +511,14 @@ initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b,
|
|||
return GL_FALSE;
|
||||
}
|
||||
v->mesa_visual.indexBits = 0;
|
||||
|
||||
if (v->BitsPerPixel == 32) {
|
||||
/* We use XImages for all front/back buffers. If an X Window or
|
||||
* X Pixmap is 32bpp, there's no guarantee that the alpha channel
|
||||
* will be preserved. For XImages we're in luck.
|
||||
*/
|
||||
v->mesa_visual.alphaBits = 8;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue