Fix X11DRV_ChoosePixelFormat to choose 24 bpp as 32 bpp for depth
buffers (needed as many X11 drivers only support 24bpp).
This commit is contained in:
parent
5e1b41854c
commit
075f8cfe8f
|
@ -203,7 +203,15 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
|
|||
if (ppfd->iPixelType == PFD_TYPE_RGBA) {
|
||||
ADD2(GLX_RENDER_TYPE, GLX_RGBA_BIT);
|
||||
ADD2(GLX_BUFFER_SIZE, ppfd->cColorBits);
|
||||
if (32 == ppfd->cDepthBits) {
|
||||
/**
|
||||
* for 32 bpp depth buffers force to use 24.
|
||||
* needed as some drivers don't support 32bpp
|
||||
*/
|
||||
TEST_AND_ADD2(ppfd->cDepthBits, GLX_DEPTH_SIZE, 24);
|
||||
} else {
|
||||
TEST_AND_ADD2(ppfd->cDepthBits, GLX_DEPTH_SIZE, ppfd->cDepthBits);
|
||||
}
|
||||
TEST_AND_ADD2(ppfd->cAlphaBits, GLX_ALPHA_SIZE, ppfd->cAlphaBits);
|
||||
}
|
||||
TEST_AND_ADD2(ppfd->cStencilBits, GLX_STENCIL_SIZE, ppfd->cStencilBits);
|
||||
|
|
Loading…
Reference in New Issue