[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-patches
Subject: WGL: pixel format attributes
From: "Roderick Colenbrander" <thunderbird2k () gmx ! net>
Date: 2006-11-30 22:55:08
Message-ID: 20061130225508.58810 () gmx ! net
[Download RAW message or body]
Hi,
This patch relaxes our pixel format attribute conversion code a bit. The code was for \
a part wrong as multiple 'different' options touched GLX_X_RENDERABLE. All could be \
set at the same time and 'undo' each other. This caused issues in some demos and \
games. Second the number of pixelformats we support is limited to 1 right now. Due to \
this setting of this flag to false prevents us from selecting any formats (all \
formats we support are renderable by X). We have to 'lie' to prevent programs from \
crashing.
Regards,
Roderick Colenbrander
--
"Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de
Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht!
["wgl_attributes.patch" (text/x-patch)]
Index: dlls/winex11.drv/opengl.c
===================================================================
RCS file: /home/wine/wine/dlls/winex11.drv/opengl.c,v
retrieving revision 1.40
diff -u -r1.40 opengl.c
--- dlls/winex11.drv/opengl.c 27 Nov 2006 18:56:05 -0000 1.40
+++ dlls/winex11.drv/opengl.c 30 Nov 2006 22:43:20 -0000
@@ -667,14 +667,18 @@
case WGL_SUPPORT_GDI_ARB:
pop = iWGLAttr[++cur];
- PUSH2(oGLXAttr, GLX_X_RENDERABLE, pop);
- TRACE("pAttr[%d] = GLX_RENDERABLE: %d\n", cur, pop);
+ /* We only support a limited number of formats which are all renderable by X \
(similar to GDI). + * Ignore this attribute to prevent us from not finding a \
match due to the limited + * amount of formats supported right now. This option \
could be matched to GLX_X_RENDERABLE + * but the issue is that when a program \
asks for no GDI support, there's no format we can return + * as all our \
supported formats are renderable by X. + */
+ TRACE("pAttr[%d] = WGL_SUPPORT_GDI_ARB: %d\n", cur, pop);
break;
case WGL_DRAW_TO_BITMAP_ARB:
pop = iWGLAttr[++cur];
- PUSH2(oGLXAttr, GLX_X_RENDERABLE, pop);
- TRACE("pAttr[%d] = GLX_RENDERABLE: %d\n", cur, pop);
+ TRACE("pAttr[%d] = WGL_DRAW_TO_BITMAP_ARB: %d\n", cur, pop);
if (pop) {
PUSH2(oGLXAttr, GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT);
TRACE("pAttr[%d] = GLX_DRAWABLE_TYPE: GLX_PIXMAP_BIT\n", cur);
@@ -691,8 +695,6 @@
case WGL_DRAW_TO_PBUFFER_ARB:
pop = iWGLAttr[++cur];
- PUSH2(oGLXAttr, GLX_X_RENDERABLE, pop);
- TRACE("pAttr[%d] = GLX_RENDERABLE: %d\n", cur, pop);
if (pop) {
PUSH2(oGLXAttr, GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT);
TRACE("pAttr[%d] = GLX_DRAWABLE_TYPE: GLX_PBUFFER_BIT\n", cur);
@@ -2399,13 +2401,17 @@
case WGL_AUX_BUFFERS_ARB:
curGLXAttr = GLX_AUX_BUFFERS;
break;
-
case WGL_SUPPORT_GDI_ARB:
case WGL_DRAW_TO_WINDOW_ARB:
case WGL_DRAW_TO_BITMAP_ARB:
+ /* We only supported a limited number of formats right now which are \
all renderable by X 'GLX_X_RENDERABLE' */ + piValues[i] = GL_TRUE;
+ continue;
case WGL_DRAW_TO_PBUFFER_ARB:
- curGLXAttr = GLX_X_RENDERABLE;
- break;
+ hTest = pglXGetFBConfigAttrib(gdi_display, curCfg, \
GLX_DRAWABLE_TYPE, &tmp); + if (hTest) goto get_error;
+ piValues[i] = (tmp & GLX_PBUFFER_BIT) ? GL_TRUE : GL_FALSE;
+ continue;
case WGL_PBUFFER_LARGEST_ARB:
curGLXAttr = GLX_LARGEST_PBUFFER;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic