get rid of unused span->start field
[mesa.git] / progs / xdemos / glxgears_fbconfig.c
index cf730e33811f6e4e4a469ada78710c36831b48b8..acbadd21ac52e6d8dec2ec14413f774788938dad 100644 (file)
@@ -32,6 +32,8 @@
  */
 
 
+#define GLX_GLXEXT_PROTOTYPES
+
 #include <math.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -44,7 +46,7 @@
 #include <assert.h>
 #include "pbutil.h"
 
-/* I had to the the SGIX versions of these because for some reason glxext.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.
  */
@@ -358,19 +360,19 @@ init_fbconfig_functions(Display *dpy, int scrnum)
 
    if ( glx_1_3_supported ) {
       choose_fbconfig = (PFNGLXCHOOSEFBCONFIGSGIXPROC) glXGetProcAddressARB( 
-               (GLbyte *) "glXChooseFBConfig");
+               (GLubyte *) "glXChooseFBConfig");
       get_visual_from_fbconfig = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) glXGetProcAddressARB( 
-               (GLbyte *) "glXGetVisualFromFBConfig");
+               (GLubyte *) "glXGetVisualFromFBConfig");
       create_new_context = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) glXGetProcAddressARB(
-               (GLbyte *) "glXCreateNewContext");
+               (GLubyte *) "glXCreateNewContext");
    }
    else if ( ext_version_supported ) {
       choose_fbconfig = (PFNGLXCHOOSEFBCONFIGSGIXPROC) glXGetProcAddressARB( 
-               (GLbyte *) "glXChooseFBConfigSGIX");
+               (GLubyte *) "glXChooseFBConfigSGIX");
       get_visual_from_fbconfig = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) glXGetProcAddressARB( 
-               (GLbyte *) "glXGetVisualFromFBConfigSGIX");
+               (GLubyte *) "glXGetVisualFromFBConfigSGIX");
       create_new_context = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) glXGetProcAddressARB(
-               (GLbyte *) "glXCreateContextWithConfigSGIX");
+               (GLubyte *) "glXCreateContextWithConfigSGIX");
    }
    else {
       printf( "This demo requires either GLX 1.3 or %s be supported.\n",
@@ -436,7 +438,7 @@ make_window( Display *dpy, const char *name,
    printf("\nThe following fbconfigs meet the requirements.  The first one "
          "will be used.\n\n");
    for ( i = 0 ; i < num_configs ; i++ ) {
-      PrintFBConfigInfo(dpy, fbconfig[i], GL_TRUE);
+      PrintFBConfigInfo(dpy, scrnum, fbconfig[i], GL_TRUE);
    }
 
    /* window attributes */
@@ -465,7 +467,7 @@ make_window( Display *dpy, const char *name,
                               None, (char **)NULL, 0, &sizehints);
    }
 
-   ctx = (*create_new_context)(dpy, fbconfig[0], GLX_RGBA_BIT, NULL, GL_TRUE);
+   ctx = (*create_new_context)(dpy, fbconfig[0], GLX_RGBA_TYPE, NULL, GL_TRUE);
    if (!ctx) {
       printf("Error: glXCreateNewContext failed\n");
       exit(1);
@@ -557,7 +559,7 @@ main(int argc, char *argv[])
    Display *dpy;
    Window win;
    GLXContext ctx;
-   char *dpyName = ":0";
+   const char *dpyName = NULL;
    GLboolean printInfo = GL_FALSE;
    int i;