Author: greatlrd
Date: Wed Nov 28 03:10:13 2007
New Revision: 30830
URL:
http://svn.reactos.org/svn/reactos?rev=30830&view=rev
Log:
hopply this will make wined3d more happy,
implement all need it flags for wglGetPixelFormatAttribfvARB and
wglGetPixelFormatAttribivARB
that wined3d using
Modified:
trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c
Modified: trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/mesa32/src/dr…
==============================================================================
--- trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c (original)
+++ trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c Wed Nov 28 03:10:13
2007
@@ -773,6 +773,24 @@
/* WGL_ARB_pixel_format */
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
#define WGL_SUPPORT_OPENGL_ARB 0x2010
+#define WGL_STEREO_ARB 0x2012
+#define WGL_PIXEL_TYPE_ARB 0x2013
+#define WGL_COLOR_BITS_ARB 0x2014
+#define WGL_RED_BITS_ARB 0x2015
+#define WGL_RED_SHIFT_ARB 0x2016
+#define WGL_GREEN_BITS_ARB 0x2017
+#define WGL_GREEN_SHIFT_ARB 0x2018
+#define WGL_BLUE_BITS_ARB 0x2019
+#define WGL_BLUE_SHIFT_ARB 0x201A
+#define WGL_ALPHA_BITS_ARB 0x201B
+#define WGL_ALPHA_SHIFT_ARB 0x201C
+#define WGL_ACCUM_BITS_ARB 0x201D
+#define WGL_ACCUM_RED_BITS_ARB 0x201E
+#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
+#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
+#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
+#define WGL_DEPTH_BITS_ARB 0x2022
+#define WGL_STENCIL_BITS_ARB 0x2023
GLAPI BOOL GLAPIENTRY
wglGetPixelFormatAttribivARB (HDC hdc,
@@ -792,11 +810,35 @@
case WGL_NUMBER_PIXEL_FORMATS_ARB :
piValues[i] = (int)npfd;
retVal = TRUE;
- break;
-
- case WGL_SUPPORT_OPENGL_ARB:
- piValues[i] = (int)TRUE;
+
+ case WGL_SUPPORT_OPENGL_ARB:
+ piValues[i] = (int)pfd[iPixelFormat - 1].pfd.dwFlags &
~PFD_SUPPORT_OPENGL;
retVal = TRUE;
+ break;
+
+ case WGL_RED_BITS_ARB :
+ piValues[i] = (int)pfd[iPixelFormat - 1].pfd.cRedBits;
+ break;
+
+ case WGL_GREEN_BITS_ARB :
+ piValues[i] = (int)pfd[iPixelFormat - 1].pfd.cGreenBits;
+ break;
+
+ case WGL_BLUE_BITS_ARB :
+ piValues[i] = (int)pfd[iPixelFormat - 1].pfd.cBlueBits;
+ break;
+
+ case WGL_ALPHA_BITS_ARB :
+ piValues[i] = (int)pfd[iPixelFormat - 1].pfd.cAlphaBits;
+ break;
+
+ case WGL_DEPTH_BITS_ARB :
+ piValues[i] = (int)pfd[iPixelFormat - 1].pfd.cDepthBits;
+ break;
+
+ case WGL_STENCIL_BITS_ARB :
+ piValues[i] = (int)pfd[iPixelFormat - 1].pfd.cAuxBuffers;
+ break;
default :
SetLastError(0);
@@ -825,11 +867,35 @@
case WGL_NUMBER_PIXEL_FORMATS_ARB :
pfValues[i] = (FLOAT)npfd;
retVal = TRUE;
- break;
-
- case WGL_SUPPORT_OPENGL_ARB:
- pfValues[i] = (FLOAT)TRUE;
+
+ case WGL_SUPPORT_OPENGL_ARB:
+ pfValues[i] = (FLOAT) (pfd[iPixelFormat - 1].pfd.dwFlags &
~PFD_SUPPORT_OPENGL);
retVal = TRUE;
+ break;
+
+ case WGL_RED_BITS_ARB :
+ pfValues[i] = (FLOAT)pfd[iPixelFormat - 1].pfd.cRedBits;
+ break;
+
+ case WGL_GREEN_BITS_ARB :
+ pfValues[i] = (FLOAT)pfd[iPixelFormat - 1].pfd.cGreenBits;
+ break;
+
+ case WGL_BLUE_BITS_ARB :
+ pfValues[i] = (FLOAT)pfd[iPixelFormat - 1].pfd.cBlueBits;
+ break;
+
+ case WGL_ALPHA_BITS_ARB :
+ pfValues[i] = (FLOAT)pfd[iPixelFormat - 1].pfd.cAlphaBits;
+ break;
+
+ case WGL_DEPTH_BITS_ARB :
+ pfValues[i] = (FLOAT)pfd[iPixelFormat - 1].pfd.cDepthBits;
+ break;
+
+ case WGL_STENCIL_BITS_ARB :
+ pfValues[i] = (FLOAT)pfd[iPixelFormat - 1].pfd.cAuxBuffers;
+ break;
default :
SetLastError(0);