Commit 52159856 authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

wgl: Fix a violation of the GLX specs in ConvertAttribWGLtoGLX.

Nvidia and Mesa ignore GLX_RENDER_TYPE when it is set to an invalid value like 0 but AMD for instance doesn't, which is legal.
parent f4a5294c
......@@ -600,7 +600,7 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
int pop;
int drawattrib = 0;
int nvfloatattrib = GLX_DONT_CARE;
int pixelattrib = 0;
int pixelattrib = ~0;
/* The list of WGL attributes is allowed to be NULL. We don't return here for NULL
* because we need to do fixups for GLX_DRAWABLE_TYPE/GLX_RENDER_TYPE/GLX_FLOAT_COMPONENTS_NV. */
......@@ -801,7 +801,9 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
PUSH2(oGLXAttr, GLX_DRAWABLE_TYPE, drawattrib);
TRACE("pAttr[?] = GLX_DRAWABLE_TYPE: %#x\n", drawattrib);
/* Set GLX_RENDER_TYPE all the time */
/* By default glXChooseFBConfig uses GLX_RGBA_BIT as the default value. Since wglChoosePixelFormatARB
* searches in all formats we have to do the same. For this reason we set GLX_RENDER_TYPE to ~0 unless
* it is overridden. */
PUSH2(oGLXAttr, GLX_RENDER_TYPE, pixelattrib);
TRACE("pAttr[?] = GLX_RENDER_TYPE: %#x\n", pixelattrib);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment