Chris Robinson : wgl: Fix for missing NV GLX extension.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Dec 6 05:49:03 CST 2006


Module: wine
Branch: master
Commit: 28c2ebb937c46bbdb2d2c15c32913ddba32a93f2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=28c2ebb937c46bbdb2d2c15c32913ddba32a93f2

Author: Chris Robinson <chris.kcat at gmail.com>
Date:   Tue Dec  5 21:30:36 2006 -0800

wgl: Fix for missing NV GLX extension.

---

 dlls/winex11.drv/opengl.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 3eb98b9..9178152 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -374,10 +374,6 @@ LOAD_FUNCPTR(glXMakeContextCurrent)
 LOAD_FUNCPTR(glXGetCurrentReadDrawable)
 LOAD_FUNCPTR(glXGetFBConfigs)
 
-/* NV GLX Extension */
-LOAD_FUNCPTR(glXAllocateMemoryNV)
-LOAD_FUNCPTR(glXFreeMemoryNV)
-
 /* Standard OpenGL calls */
 LOAD_FUNCPTR(glBindTexture)
 LOAD_FUNCPTR(glBitmap)
@@ -392,6 +388,15 @@ LOAD_FUNCPTR(glNewList)
 LOAD_FUNCPTR(glPixelStorei)
 #undef LOAD_FUNCPTR
 
+/* It doesn't matter if these fail. They'll only be used if the driver reports
+   the associated extension is available (and if a driver reports the extension
+   is available but fails to provide the functions, it's quite broken) */
+#define LOAD_FUNCPTR(f) p##f = (void*)pglXGetProcAddressARB((const unsigned char*)#f);
+/* NV GLX Extension */
+LOAD_FUNCPTR(glXAllocateMemoryNV)
+LOAD_FUNCPTR(glXFreeMemoryNV)
+#undef LOAD_FUNCPTR
+
     if(!X11DRV_WineGL_InitOpenglInfo()) {
         ERR("Intialization of OpenGL info failed, disabling OpenGL!\n");
         wine_dlclose(opengl_handle, NULL, 0);




More information about the wine-cvs mailing list