Author: greatlrd
Date: Thu Nov 15 15:57:21 2007
New Revision: 30459
URL:
http://svn.reactos.org/svn/reactos?rev=30459&view=rev
Log:
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.
Modified:
trunk/reactos/dll/win32/opengl32/opengl32.def
trunk/reactos/dll/win32/opengl32/wgl.c
Modified: trunk/reactos/dll/win32/opengl32/opengl32.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/opengl32/opengl3…
==============================================================================
--- trunk/reactos/dll/win32/opengl32/opengl32.def (original)
+++ trunk/reactos/dll/win32/opengl32/opengl32.def Thu Nov 15 15:57:21 2007
@@ -383,7 +383,7 @@
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
Modified: trunk/reactos/dll/win32/opengl32/wgl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/opengl32/wgl.c?r…
==============================================================================
--- trunk/reactos/dll/win32/opengl32/wgl.c (original)
+++ trunk/reactos/dll/win32/opengl32/wgl.c Thu Nov 15 15:57:21 2007
@@ -909,6 +909,37 @@
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!" );