[ros-diffs] [greatlrd] 30459: 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.

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Thu Nov 15 13:57:22 CET 2007


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/opengl32.def?rev=30459&r1=30458&r2=30459&view=diff
==============================================================================
--- 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 at 16=rosglDescribePixelFormat at 16
 wglGetCurrentContext at 0=rosglGetCurrentContext at 0
 wglGetCurrentDC at 0=rosglGetCurrentDC at 0
-;wglGetDefaultProcAddress=rosglGetDefaultProcAddress@
+wglGetDefaultProcAddress=rosglGetDefaultProcAddress at 4
 wglGetLayerPaletteEntries at 20=rosglGetLayerPaletteEntries at 20
 wglGetPixelFormat at 4=rosglGetPixelFormat at 4
 wglGetProcAddress at 4=rosglGetProcAddress at 4

Modified: trunk/reactos/dll/win32/opengl32/wgl.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/opengl32/wgl.c?rev=30459&r1=30458&r2=30459&view=diff
==============================================================================
--- 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!" );




More information about the Ros-diffs mailing list