Implement wglGetDefaultProcAddress

------------------------------------
Simple copy the wglGetProcAddress, it is only one different between them
it is wglGetProcAddress should call on glflush to clear the interface
before it give the address. 

svn path=/trunk/; revision=30459
This commit is contained in:
Magnus Olsen 2007-11-15 12:57:21 +00:00
parent 2ac23d7f2c
commit c698adf067
2 changed files with 32 additions and 1 deletions

View file

@ -383,7 +383,7 @@ wglDescribeLayerPlane@20=rosglDescribeLayerPlane@20
wglDescribePixelFormat@16=rosglDescribePixelFormat@16
wglGetCurrentContext@0=rosglGetCurrentContext@0
wglGetCurrentDC@0=rosglGetCurrentDC@0
;wglGetDefaultProcAddress=rosglGetDefaultProcAddress@
wglGetDefaultProcAddress=rosglGetDefaultProcAddress@4
wglGetLayerPaletteEntries@20=rosglGetLayerPaletteEntries@20
wglGetPixelFormat@4=rosglGetPixelFormat@4
wglGetProcAddress@4=rosglGetProcAddress@4

View file

@ -909,6 +909,37 @@ rosglGetProcAddress( LPCSTR proc )
PROC func;
GLDRIVERDATA *icd;
/* FIXME we should Flush the gl here */
if (OPENGL32_threaddata->glrc == NULL)
{
DBGPRINT( "Error: No current GLRC!" );
SetLastError( ERROR_INVALID_FUNCTION );
return NULL;
}
icd = OPENGL32_threaddata->glrc->icd;
func = icd->DrvGetProcAddress( proc );
if (func != NULL)
{
DBGPRINT( "Info: Proc \"%s\" loaded from ICD.", proc );
return func;
}
/* FIXME: Should we return wgl/gl 1.1 functions? */
SetLastError( ERROR_PROC_NOT_FOUND );
return NULL;
}
PROC
APIENTRY
rosglGetDefaultProcAddress( LPCSTR proc )
{
PROC func;
GLDRIVERDATA *icd;
/* wglGetDefaultProcAddress does not flush the gl */
if (OPENGL32_threaddata->glrc == NULL)
{
DBGPRINT( "Error: No current GLRC!" );