starting add wgl support to icd

Thx Kamil Hornicek tykef at atlas dot cz (irc nick : Pigglesworth) 
for the help getting this change

svn path=/trunk/; revision=30750
This commit is contained in:
Magnus Olsen 2007-11-25 19:42:51 +00:00
parent fbfd6f38a5
commit c92208e81e
3 changed files with 49 additions and 0 deletions

View file

@ -236,6 +236,7 @@
<directory name="windows">
<directory name="gdi">
<file>wmesa.c</file>
<file>wgl.c</file>
</directory>
<directory name="icd">
<file>icd.c</file>

View file

@ -703,3 +703,12 @@ WINGDIAPI const char * GLAPIENTRY wglGetExtensionsStringARB(HDC hdc)
{
return "WGL_ARB_extensions_string";
}
GLAPI const char * GLAPIENTRY
wglGetExtensionsStringEXT (void)
{
return
// "WGL_EXT_swap_control "
"WGL_EXT_extensions_string WGL_ARB_extensions_string"
/*WGL_ARB_pixel_format WGL_ARB_render_texture WGL_ARB_pbuffer*/;
}

View file

@ -49,6 +49,8 @@ extern "C" {
#include "mtypes.h"
#include "glapi.h"
GLAPI const char * GLAPIENTRY wglGetExtensionsStringEXT (void);
#define MAX_MESA_ATTRS 20
typedef struct wmesa_context *PWMC;
@ -306,12 +308,49 @@ WGLAPI int GLAPIENTRY DrvDescribePixelFormat(HDC hdc,int iPixelFormat,UINT nByte
/*
* GetProcAddress - return the address of an appropriate extension
*/
static struct {
const char *name;
PROC func;
} wgl_ext[] = {
{"wglGetExtensionsStringARB", (PROC)wglGetExtensionsStringARB},
{"wglGetExtensionsStringEXT", (PROC)wglGetExtensionsStringEXT},
// {"wglSwapIntervalEXT", (PROC)wglSwapIntervalEXT},
// {"wglGetSwapIntervalEXT", (PROC)wglGetSwapIntervalEXT},
// {"wglGetDeviceGammaRamp3DFX", (PROC)wglGetDeviceGammaRamp3DFX},
// {"wglSetDeviceGammaRamp3DFX", (PROC)wglSetDeviceGammaRamp3DFX},
/* WGL_ARB_pixel_format */
// {"wglGetPixelFormatAttribivARB", (PROC)wglGetPixelFormatAttribivARB},
// {"wglGetPixelFormatAttribfvARB", (PROC)wglGetPixelFormatAttribfvARB},
// {"wglChoosePixelFormatARB", (PROC)wglChoosePixelFormatARB},
/* WGL_ARB_render_texture */
// {"wglBindTexImageARB", (PROC)wglBindTexImageARB},
// {"wglReleaseTexImageARB", (PROC)wglReleaseTexImageARB},
// {"wglSetPbufferAttribARB", (PROC)wglSetPbufferAttribARB},
// /* WGL_ARB_pbuffer */
// {"wglCreatePbufferARB", (PROC)wglCreatePbufferARB},
// {"wglGetPbufferDCARB", (PROC)wglGetPbufferDCARB},
// {"wglReleasePbufferDCARB", (PROC)wglReleasePbufferDCARB},
// {"wglDestroyPbufferARB", (PROC)wglDestroyPbufferARB},
// {"wglQueryPbufferARB", (PROC)wglQueryPbufferARB},
{NULL, NULL}
};
WGLAPI PROC GLAPIENTRY DrvGetProcAddress(LPCSTR lpszProc)
{
int i;
PROC p = (PROC) (int) _glapi_get_proc_address((const char *) lpszProc);
if (p)
return p;
for (i = 0; wgl_ext[i].name; i++)
{
if (!strcmp(lpszProc, wgl_ext[i].name))
{
return wgl_ext[i].func;
}
}
SetLastError(0);
return(NULL);
}