Author: greatlrd Date: Sun Nov 25 22:42:51 2007 New Revision: 30750
URL: http://svn.reactos.org/svn/reactos?rev=30750&view=rev Log: starting add wgl support to icd Thx Kamil Hornicek tykef at atlas dot cz (irc nick : Pigglesworth) for the help getting this change
Modified: trunk/reactos/dll/3rdparty/mesa32/mesa32.rbuild 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/mesa32.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/mesa32/mesa32.... ============================================================================== --- trunk/reactos/dll/3rdparty/mesa32/mesa32.rbuild (original) +++ trunk/reactos/dll/3rdparty/mesa32/mesa32.rbuild Sun Nov 25 22:42:51 2007 @@ -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>
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/dri... ============================================================================== --- trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c (original) +++ trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wgl.c Sun Nov 25 22:42:51 2007 @@ -703,3 +703,12 @@ { 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*/; +}
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/dri... ============================================================================== --- trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/icd/icd.c (original) +++ trunk/reactos/dll/3rdparty/mesa32/src/drivers/windows/icd/icd.c Sun Nov 25 22:42:51 2007 @@ -48,6 +48,8 @@ #include "GL/wmesa.h" #include "mtypes.h" #include "glapi.h" + +GLAPI const char * GLAPIENTRY wglGetExtensionsStringEXT (void);
#define MAX_MESA_ATTRS 20
@@ -306,11 +308,48 @@ /* * 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);