summaryrefslogtreecommitdiff
path: root/progs/xdemos
diff options
context:
space:
mode:
Diffstat (limited to 'progs/xdemos')
-rw-r--r--progs/xdemos/.gitignore (renamed from progs/xdemos/.cvsignore)0
-rw-r--r--progs/xdemos/Makefile2
-rw-r--r--progs/xdemos/glthreads.c2
-rw-r--r--progs/xdemos/glxcontexts.c4
-rw-r--r--progs/xdemos/glxgears_fbconfig.c2
-rw-r--r--progs/xdemos/glxheads.c2
-rw-r--r--progs/xdemos/glxinfo.c16
-rw-r--r--progs/xdemos/glxswapcontrol.c2
-rw-r--r--progs/xdemos/manywin.c2
-rw-r--r--progs/xdemos/opencloseopen.c2
-rw-r--r--progs/xdemos/pbinfo.c2
-rw-r--r--progs/xdemos/yuvrect_client.c2
12 files changed, 25 insertions, 13 deletions
diff --git a/progs/xdemos/.cvsignore b/progs/xdemos/.gitignore
index 4adffda2d1..4adffda2d1 100644
--- a/progs/xdemos/.cvsignore
+++ b/progs/xdemos/.gitignore
diff --git a/progs/xdemos/Makefile b/progs/xdemos/Makefile
index 4ca8b107a2..ec85464bec 100644
--- a/progs/xdemos/Makefile
+++ b/progs/xdemos/Makefile
@@ -24,11 +24,11 @@ PROGS = glthreads \
pbinfo \
pbdemo \
wincopy \
- xdemo \
xfont \
xrotfontdemo \
yuvrect_client
+# omit this XMesa API demo: xdemo
##### RULES #####
diff --git a/progs/xdemos/glthreads.c b/progs/xdemos/glthreads.c
index 83413383dd..989697fbca 100644
--- a/progs/xdemos/glthreads.c
+++ b/progs/xdemos/glthreads.c
@@ -473,7 +473,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(displayName);
if (!dpy) {
- fprintf(stderr, "Unable to open display %s\n", displayName);
+ fprintf(stderr, "Unable to open display %s\n", XDisplayName(displayName));
return -1;
}
}
diff --git a/progs/xdemos/glxcontexts.c b/progs/xdemos/glxcontexts.c
index fbc296ef62..a9ff326ed5 100644
--- a/progs/xdemos/glxcontexts.c
+++ b/progs/xdemos/glxcontexts.c
@@ -587,8 +587,8 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n",
- dpyName ? dpyName : getenv("DISPLAY"));
+ fprintf(stderr, "Error: couldn't open display %s\n",
+ XDisplayName(dpyName));
return -1;
}
diff --git a/progs/xdemos/glxgears_fbconfig.c b/progs/xdemos/glxgears_fbconfig.c
index acbadd21ac..2dac00b75d 100644
--- a/progs/xdemos/glxgears_fbconfig.c
+++ b/progs/xdemos/glxgears_fbconfig.c
@@ -575,7 +575,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName);
+ printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
return -1;
}
diff --git a/progs/xdemos/glxheads.c b/progs/xdemos/glxheads.c
index 0145a70e91..b3290e90d5 100644
--- a/progs/xdemos/glxheads.c
+++ b/progs/xdemos/glxheads.c
@@ -57,7 +57,7 @@ static int NumHeads = 0;
static void
Error(const char *display, const char *msg)
{
- fprintf(stderr, "Error on display %s - %s\n", display, msg);
+ fprintf(stderr, "Error on display %s - %s\n", XDisplayName(display), msg);
exit(1);
}
diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c
index fdd1c0523f..3e8e0be520 100644
--- a/progs/xdemos/glxinfo.c
+++ b/progs/xdemos/glxinfo.c
@@ -456,7 +456,19 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
}
printf("display: %s screen: %d\n", displayName, scrnum);
free(displayName);
- printf("direct rendering: %s\n", glXIsDirect(dpy, ctx) ? "Yes" : "No");
+ printf("direct rendering: ");
+ if (glXIsDirect(dpy, ctx)) {
+ printf("Yes\n");
+ } else {
+ if (!allowDirect) {
+ printf("No (-i specified)\n");
+ } else if (getenv("LIBGL_ALWAYS_INDIRECT")) {
+ printf("No (LIBGL_ALWAYS_INDIRECT set)\n");
+ } else {
+ printf("No (If you want to find out why, try setting "
+ "LIBGL_DEBUG=verbose)\n");
+ }
+ }
printf("server glx vendor string: %s\n", serverVendor);
printf("server glx version string: %s\n", serverVersion);
printf("server glx extensions:\n");
@@ -927,7 +939,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(displayName);
if (!dpy) {
- fprintf(stderr, "Error: unable to open display %s\n", displayName);
+ fprintf(stderr, "Error: unable to open display %s\n", XDisplayName(displayName));
return -1;
}
diff --git a/progs/xdemos/glxswapcontrol.c b/progs/xdemos/glxswapcontrol.c
index 0ed5ebe472..d9be984be5 100644
--- a/progs/xdemos/glxswapcontrol.c
+++ b/progs/xdemos/glxswapcontrol.c
@@ -749,7 +749,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName);
+ printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
return -1;
}
diff --git a/progs/xdemos/manywin.c b/progs/xdemos/manywin.c
index c9cca75134..cfea555210 100644
--- a/progs/xdemos/manywin.c
+++ b/progs/xdemos/manywin.c
@@ -59,7 +59,7 @@ static GLuint TexObj = 0;
static void
Error(const char *display, const char *msg)
{
- fprintf(stderr, "Error on display %s - %s\n", display, msg);
+ fprintf(stderr, "Error on display %s - %s\n", XDisplayName(display), msg);
exit(1);
}
diff --git a/progs/xdemos/opencloseopen.c b/progs/xdemos/opencloseopen.c
index 2e4de24c71..0b8d061843 100644
--- a/progs/xdemos/opencloseopen.c
+++ b/progs/xdemos/opencloseopen.c
@@ -91,7 +91,7 @@ make_window( const char * dpyName, const char *name,
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName);
+ printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
exit(1);
}
diff --git a/progs/xdemos/pbinfo.c b/progs/xdemos/pbinfo.c
index 88d93c8da6..b43adf1bb7 100644
--- a/progs/xdemos/pbinfo.c
+++ b/progs/xdemos/pbinfo.c
@@ -95,7 +95,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName ? dpyName : ":0");
+ printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
return 1;
}
diff --git a/progs/xdemos/yuvrect_client.c b/progs/xdemos/yuvrect_client.c
index 48f82cb759..e2b79a7c0e 100644
--- a/progs/xdemos/yuvrect_client.c
+++ b/progs/xdemos/yuvrect_client.c
@@ -296,7 +296,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
printf("Error: couldn't open display %s\n",
- dpyName ? dpyName : getenv("DISPLAY"));
+ XDisplayName(dpyName));
return -1;
}