mirror of
https://github.com/reactos/reactos.git
synced 2024-08-19 09:59:44 +00:00
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:
parent
fbfd6f38a5
commit
c92208e81e
1
reactos/dll/3rdparty/mesa32/mesa32.rbuild
vendored
1
reactos/dll/3rdparty/mesa32/mesa32.rbuild
vendored
|
@ -236,6 +236,7 @@
|
||||||
<directory name="windows">
|
<directory name="windows">
|
||||||
<directory name="gdi">
|
<directory name="gdi">
|
||||||
<file>wmesa.c</file>
|
<file>wmesa.c</file>
|
||||||
|
<file>wgl.c</file>
|
||||||
</directory>
|
</directory>
|
||||||
<directory name="icd">
|
<directory name="icd">
|
||||||
<file>icd.c</file>
|
<file>icd.c</file>
|
||||||
|
|
|
@ -703,3 +703,12 @@ WINGDIAPI const char * GLAPIENTRY wglGetExtensionsStringARB(HDC hdc)
|
||||||
{
|
{
|
||||||
return "WGL_ARB_extensions_string";
|
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*/;
|
||||||
|
}
|
||||||
|
|
|
@ -49,6 +49,8 @@ extern "C" {
|
||||||
#include "mtypes.h"
|
#include "mtypes.h"
|
||||||
#include "glapi.h"
|
#include "glapi.h"
|
||||||
|
|
||||||
|
GLAPI const char * GLAPIENTRY wglGetExtensionsStringEXT (void);
|
||||||
|
|
||||||
#define MAX_MESA_ATTRS 20
|
#define MAX_MESA_ATTRS 20
|
||||||
|
|
||||||
typedef struct wmesa_context *PWMC;
|
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
|
* 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)
|
WGLAPI PROC GLAPIENTRY DrvGetProcAddress(LPCSTR lpszProc)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
PROC p = (PROC) (int) _glapi_get_proc_address((const char *) lpszProc);
|
PROC p = (PROC) (int) _glapi_get_proc_address((const char *) lpszProc);
|
||||||
if (p)
|
if (p)
|
||||||
return 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);
|
SetLastError(0);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue