summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-12-09 22:34:40 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-12-09 22:34:40 +0000
commit65e30ac06ae6f1def740e7d35f127ed11a1d1788 (patch)
treed0b419414f995ae4cdc2d50726c14eccb32ca23e /progs
parent941efe8eda728f4cd2ed52359c4029b766e82db9 (diff)
minor tweaks
Diffstat (limited to 'progs')
-rw-r--r--progs/tests/miniglxtest.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/progs/tests/miniglxtest.c b/progs/tests/miniglxtest.c
index a1c1681e77e..075e48f7144 100644
--- a/progs/tests/miniglxtest.c
+++ b/progs/tests/miniglxtest.c
@@ -1,14 +1,20 @@
-/* $Id: miniglxtest.c,v 1.1.4.3 2002/11/27 21:04:18 brianp Exp $ */
+/* $Id: miniglxtest.c,v 1.1.4.4 2002/12/09 22:34:40 brianp Exp $ */
/*
* Test the mini GLX interface.
*/
+#define USE_MINI_GLX 1
-#include <GL/gl.h>
-#include <GL/miniglx.h>
#include <stdio.h>
#include <stdlib.h>
+#include <GL/gl.h>
+#if USE_MINI_GLX
+#include <GL/miniglx.h>
+#else
+#include <GL/glx.h>
+#define WRAP(x) x /* temporary! */
+#endif
static void redraw( Display *dpy, Window w, int rot )
@@ -45,7 +51,7 @@ static Window make_rgb_db_window( Display *dpy,
GLXContext ctx;
XVisualInfo *visinfo;
- scrnum = WRAP(DefaultScreen)( dpy );
+ scrnum = 0;
root = WRAP(RootWindow)( dpy, scrnum );
visinfo = WRAP(glXChooseVisual)( dpy, scrnum, attrib );
@@ -94,6 +100,10 @@ int main( int argc, char *argv[] )
Window win;
dpy = WRAP(XOpenDisplay)(NULL);
+ if (!dpy) {
+ printf("Error: XOpenDisplay failed\n");
+ return 1;
+ }
win = make_rgb_db_window( dpy, 800, 600);