start implement wglGetPixelFormatAttribivARB and wglGetPixelFormatAttribfARB

svn path=/trunk/; revision=30828
This commit is contained in:
Magnus Olsen 2007-11-27 23:41:57 +00:00
parent a141ea751d
commit 24d18e2aaa
3 changed files with 55 additions and 10 deletions

View file

@ -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);

View file

@ -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<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 @@ wglGetPixelFormatAttribfvARB (HDC hdc,
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

View file

@ -55,8 +55,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);