From ac12609099dfe34a2934256bc0aa32446c9cc49d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 21 Oct 1999 16:39:06 +0000 Subject: added -info command line option --- progs/demos/multiarb.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'progs/demos/multiarb.c') diff --git a/progs/demos/multiarb.c b/progs/demos/multiarb.c index 267fbe95e3..831842a738 100644 --- a/progs/demos/multiarb.c +++ b/progs/demos/multiarb.c @@ -1,12 +1,20 @@ -/* $Id: multiarb.c,v 1.2 1999/10/13 12:02:13 brianp Exp $ */ +/* $Id: multiarb.c,v 1.3 1999/10/21 16:40:32 brianp Exp $ */ /* * GL_ARB_multitexture demo + * + * Command line options: + * -info print GL implementation information + * + * * Brian Paul November 1998 This program is in the public domain. */ /* * $Log: multiarb.c,v $ + * Revision 1.3 1999/10/21 16:40:32 brianp + * added -info command line option + * * Revision 1.2 1999/10/13 12:02:13 brianp * use texture objects now * @@ -224,7 +232,7 @@ static void SpecialKey( int key, int x, int y ) } -static void Init( void ) +static void Init( int argc, char *argv[] ) { GLuint texObj[2]; @@ -289,6 +297,13 @@ static void Init( void ) glClearColor(0.3, 0.3, 0.4, 1.0); ModeMenu(TEXBOTH); + + if (argc > 1 && strcmp(argv[1], "-info")==0) { + printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER)); + printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION)); + printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR)); + printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS)); + } } @@ -299,7 +314,7 @@ int main( int argc, char *argv[] ) glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE ); glutCreateWindow(argv[0] ); - Init(); + Init( argc, argv ); glutReshapeFunc( Reshape ); glutKeyboardFunc( Key ); -- cgit v1.2.3