From 29c909f81ceae4a0356718d6be0a14562c98c019 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 5 Apr 2005 20:43:06 +0000 Subject: Make glxgears_fbconfig compile and respect the DISPLAY setting. Add it to the Makefile as well. --- progs/xdemos/Makefile | 6 ++++++ progs/xdemos/glxgears_fbconfig.c | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'progs/xdemos') diff --git a/progs/xdemos/Makefile b/progs/xdemos/Makefile index cc2dd57a21..ddd1b0bfee 100644 --- a/progs/xdemos/Makefile +++ b/progs/xdemos/Makefile @@ -11,6 +11,7 @@ LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) PROGS = glthreads \ glxdemo \ glxgears \ + glxgears_fbconfig \ glxcontexts \ glxheads \ glxinfo \ @@ -64,6 +65,11 @@ pbdemo.o: pbdemo.c pbutil.h pbutil.o: pbutil.c pbutil.h $(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbutil.c +glxgears_fbconfig: glxgears_fbconfig.o pbutil.o + $(CC) glxgears_fbconfig.o pbutil.o $(APP_LIB_DEPS) -o $@ + +glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) glxgears_fbconfig.c xrotfontdemo: xrotfontdemo.o xuserotfont.o $(CC) xrotfontdemo.o xuserotfont.o $(APP_LIB_DEPS) -o $@ diff --git a/progs/xdemos/glxgears_fbconfig.c b/progs/xdemos/glxgears_fbconfig.c index cf730e3381..cadcaeccf8 100644 --- a/progs/xdemos/glxgears_fbconfig.c +++ b/progs/xdemos/glxgears_fbconfig.c @@ -32,6 +32,8 @@ */ +#define GLX_GLXEXT_PROTOTYPES + #include #include #include @@ -44,7 +46,7 @@ #include #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. */ @@ -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 */ @@ -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; -- cgit v1.2.3