From 24d18e2aaac91675b5dcf9ba43b1caf25af67a2e Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Tue, 27 Nov 2007 23:41:57 +0000 Subject: [PATCH] start implement wglGetPixelFormatAttribivARB and wglGetPixelFormatAttribfARB svn path=/trunk/; revision=30828 --- .../dll/3rdparty/mesa32/include/GL/mesa_wgl.h | 4 +- .../mesa32/src/drivers/windows/gdi/wgl.c | 57 +++++++++++++++++-- .../mesa32/src/drivers/windows/icd/icd.c | 4 +- 3 files changed, 55 insertions(+), 10 deletions(-) diff --git a/reactos/dll/3rdparty/mesa32/include/GL/mesa_wgl.h b/reactos/dll/3rdparty/mesa32/include/GL/mesa_wgl.h index 7b26d91c765..9c93c5c600b 100644 --- a/reactos/dll/3rdparty/mesa32/include/GL/mesa_wgl.h +++ b/reactos/dll/3rdparty/mesa32/include/GL/mesa_wgl.h @@ -114,8 +114,8 @@ GLAPI const char * GLAPIENTRY wglGetExtensionsStringEXT (void); GLAPI BOOL GLAPIENTRY wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); GLAPI BOOL GLAPIENTRY wglSwapIntervalEXT (int interval); GLAPI int GLAPIENTRY wglGetSwapIntervalEXT (void); -GLAPI BOOL GLAPIENTRY wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); -GLAPI BOOL GLAPIENTRY wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +GLAPI BOOL GLAPIENTRY wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); +GLAPI BOOL GLAPIENTRY wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); GLAPI BOOL GLAPIENTRY wglMakeContextCurrentARB(HDC hDrawDC, HDC hReadDC, HGLRC hglrc); GLAPI HANDLE GLAPIENTRY wglGetCurrentReadDCARB(void); GLAPI HPBUFFERARB GLAPIENTRY wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); diff --git a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c b/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c index 09fd05a5d77..eb9bb180751 100644 --- a/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c +++ b/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c @@ -771,16 +771,40 @@ wglGetSwapIntervalEXT (void) } /* WGL_ARB_pixel_format */ +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_SUPPORT_OPENGL_ARB 0x2010 + GLAPI BOOL GLAPIENTRY wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, - const int *piAttributes, + int *piAttributes, int *piValues) { - SetLastError(0); - return FALSE; + BOOL retVal = FALSE; + int i; + + for (i=0;i