Author: greatlrd
Date: Wed Nov 28 02:41:57 2007
New Revision: 30828
URL:
http://svn.reactos.org/svn/reactos?rev=30828&view=rev
Log:
start implement wglGetPixelFormatAttribivARB and wglGetPixelFormatAttribfARB
Modified:
trunk/reactos/dll/3rdparty/mesa32/include/GL/mesa_wgl.h
trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c
trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/icd/icd.c
Modified: trunk/reactos/dll/3rdparty/mesa32/include/GL/mesa_wgl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/mesa32/includ…
==============================================================================
--- trunk/reactos/dll/3rdparty/mesa32/include/GL/mesa_wgl.h (original)
+++ trunk/reactos/dll/3rdparty/mesa32/include/GL/mesa_wgl.h Wed Nov 28 02:41:57 2007
@@ -114,8 +114,8 @@
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);
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 02:41:57
2007
@@ -771,16 +771,40 @@
}
/* 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<nAttributes;i++)
+ {
+ switch (piAttributes[i])
+ {
+ case WGL_NUMBER_PIXEL_FORMATS_ARB :
+ piValues[i] = (int)npfd;
+ retVal = TRUE;
+ break;
+
+ case WGL_SUPPORT_OPENGL_ARB:
+ piValues[i] = (int)TRUE;
+ retVal = TRUE;
+
+ default :
+ SetLastError(0);
+ break;
+ }
+ }
+
+ return retVal;
}
GLAPI BOOL GLAPIENTRY
@@ -788,11 +812,32 @@
int iPixelFormat,
int iLayerPlane,
UINT nAttributes,
- const int *piAttributes,
+ int *piAttributes,
FLOAT *pfValues)
{
- SetLastError(0);
- return FALSE;
+ BOOL retVal = FALSE;
+ int i;
+
+ for (i=0;i<nAttributes;i++)
+ {
+ switch (piAttributes[i])
+ {
+ case WGL_NUMBER_PIXEL_FORMATS_ARB :
+ pfValues[i] = (FLOAT)npfd;
+ retVal = TRUE;
+ break;
+
+ case WGL_SUPPORT_OPENGL_ARB:
+ pfValues[i] = (FLOAT)TRUE;
+ retVal = TRUE;
+
+ default :
+ SetLastError(0);
+ break;
+ }
+ }
+
+ return retVal;
}
GLAPI BOOL GLAPIENTRY
Modified: trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/icd/icd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/mesa32/src/dr…
==============================================================================
--- trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/icd/icd.c (original)
+++ trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/icd/icd.c Wed Nov 28 02:41:57
2007
@@ -55,8 +55,8 @@
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);