Module: wine Branch: master Commit: 8922e20096f2c5c1de9108fee57ab0e1f93acddc URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=8922e20096f2c5c1de9108fe...
Author: Roderick Colenbrander thunderbird2k@gmx.net Date: Wed Aug 23 00:03:16 2006 +0000
winex11.drv: Fix opengl pixel format bug.
---
dlls/winex11.drv/opengl.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 1793a09..22930ac 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -2,6 +2,7 @@ * X11DRV OpenGL functions * * Copyright 2000 Lionel Ulmer + * Copyright 2006 Roderick Colenbrander * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -255,7 +256,7 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEV int value = 0;
/* Pixel type */ - pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_RENDER_TYPE, &value); + pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index - 1], GLX_RENDER_TYPE, &value); if (value & GLX_RGBA_BIT) iPixelType = PFD_TYPE_RGBA; else @@ -266,7 +267,7 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEV }
/* Doublebuffer */ - pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_DOUBLEBUFFER, &value); if (value) dwFlags |= PFD_DOUBLEBUFFER; + pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index - 1], GLX_DOUBLEBUFFER, &value); if (value) dwFlags |= PFD_DOUBLEBUFFER; if (!(ppfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE)) { if ((ppfd->dwFlags & PFD_DOUBLEBUFFER) != (dwFlags & PFD_DOUBLEBUFFER)) { goto choose_exit; @@ -274,7 +275,7 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEV }
/* Stereo */ - pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_STEREO, &value); if (value) dwFlags |= PFD_STEREO; + pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index - 1], GLX_STEREO, &value); if (value) dwFlags |= PFD_STEREO; if (!(ppfd->dwFlags & PFD_STEREO_DONTCARE)) { if ((ppfd->dwFlags & PFD_STEREO) != (dwFlags & PFD_STEREO)) { goto choose_exit; @@ -282,25 +283,25 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEV }
/* Alpha bits */ - pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_ALPHA_SIZE, &value); + pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index - 1], GLX_ALPHA_SIZE, &value); if (ppfd->iPixelType==PFD_TYPE_RGBA && ppfd->cAlphaBits && !value) { goto choose_exit; }
/* Depth bits */ - pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_DEPTH_SIZE, &value); + pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index - 1], GLX_DEPTH_SIZE, &value); if (ppfd->cDepthBits && !value) { goto choose_exit; }
/* Stencil bits */ - pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_STENCIL_SIZE, &value); + pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index - 1], GLX_STENCIL_SIZE, &value); if (ppfd->cStencilBits && !value) { goto choose_exit; }
/* Aux buffers */ - pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_AUX_BUFFERS, &value); + pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index - 1], GLX_AUX_BUFFERS, &value); if (ppfd->cAuxBuffers && !value) { goto choose_exit; }