Mesa (master): glxgears_fbconfig: Use GLX 1. 3 name for function poiner types

Ian Romanick idr at kemper.freedesktop.org
Wed Feb 17 19:44:24 UTC 2010


Module: Mesa
Branch: master
Commit: 6518f6037cfcab3783e913b5275f9045799e49b2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6518f6037cfcab3783e913b5275f9045799e49b2

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Feb  5 16:14:27 2010 -0800

glxgears_fbconfig: Use GLX 1.3 name for function poiner types

---

 progs/xdemos/glxgears_fbconfig.c |   34 +++++++++++++++-------------------
 1 files changed, 15 insertions(+), 19 deletions(-)

diff --git a/progs/xdemos/glxgears_fbconfig.c b/progs/xdemos/glxgears_fbconfig.c
index 2dac00b..316480c 100644
--- a/progs/xdemos/glxgears_fbconfig.c
+++ b/progs/xdemos/glxgears_fbconfig.c
@@ -46,13 +46,9 @@
 #include <assert.h>
 #include "pbutil.h"
 
-/* I had to use the SGIX versions of these because for some reason glxext.h
- * doesn't define the core versions if GLX_VERSION_1_3 is defined, and glx.h
- * doesn't define them at all.  One or both header files is clearly broken.
- */
-static PFNGLXCHOOSEFBCONFIGSGIXPROC choose_fbconfig = NULL;
-static PFNGLXGETVISUALFROMFBCONFIGSGIXPROC get_visual_from_fbconfig = NULL;
-static PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC create_new_context = NULL;
+static PFNGLXCHOOSEFBCONFIGPROC choose_fbconfig = NULL;
+static PFNGLXGETVISUALFROMFBCONFIGPROC get_visual_from_fbconfig = NULL;
+static PFNGLXCREATENEWCONTEXTPROC create_new_context = NULL;
 
 #define BENCHMARK
 
@@ -359,20 +355,20 @@ init_fbconfig_functions(Display *dpy, int scrnum)
 	   ext_name, (ext_version_supported) ? "" : "not " );
 
    if ( glx_1_3_supported ) {
-      choose_fbconfig = (PFNGLXCHOOSEFBCONFIGSGIXPROC) glXGetProcAddressARB( 
-		(GLubyte *) "glXChooseFBConfig");
-      get_visual_from_fbconfig = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) glXGetProcAddressARB( 
-		(GLubyte *) "glXGetVisualFromFBConfig");
-      create_new_context = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) glXGetProcAddressARB(
-		(GLubyte *) "glXCreateNewContext");
+      choose_fbconfig = (PFNGLXCHOOSEFBCONFIGPROC)
+	 glXGetProcAddressARB((GLubyte *) "glXChooseFBConfig");
+      get_visual_from_fbconfig = (PFNGLXGETVISUALFROMFBCONFIGPROC)
+	 glXGetProcAddressARB((GLubyte *) "glXGetVisualFromFBConfig");
+      create_new_context = (PFNGLXCREATENEWCONTEXTPROC)
+	 glXGetProcAddressARB((GLubyte *) "glXCreateNewContext");
    }
    else if ( ext_version_supported ) {
-      choose_fbconfig = (PFNGLXCHOOSEFBCONFIGSGIXPROC) glXGetProcAddressARB( 
-		(GLubyte *) "glXChooseFBConfigSGIX");
-      get_visual_from_fbconfig = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) glXGetProcAddressARB( 
-		(GLubyte *) "glXGetVisualFromFBConfigSGIX");
-      create_new_context = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) glXGetProcAddressARB(
-		(GLubyte *) "glXCreateContextWithConfigSGIX");
+      choose_fbconfig = (PFNGLXCHOOSEFBCONFIGPROC)
+	 glXGetProcAddressARB((GLubyte *) "glXChooseFBConfigSGIX");
+      get_visual_from_fbconfig = (PFNGLXGETVISUALFROMFBCONFIGPROC)
+	 glXGetProcAddressARB((GLubyte *) "glXGetVisualFromFBConfigSGIX");
+      create_new_context = (PFNGLXCREATENEWCONTEXTPROC)
+	 glXGetProcAddressARB((GLubyte *) "glXCreateContextWithConfigSGIX");
    }
    else {
       printf( "This demo requires either GLX 1.3 or %s be supported.\n",




More information about the mesa-commit mailing list