diff options
author | Brian Paul <[email protected]> | 1999-10-21 16:39:06 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 1999-10-21 16:39:06 +0000 |
commit | ac12609099dfe34a2934256bc0aa32446c9cc49d (patch) | |
tree | 61b10603e2ac60a0304ee10d3c9e1968cd4ac031 /progs/demos/multiarb.c | |
parent | bc937424f13094923d67e1409f3f9b6aa38b254f (diff) |
added -info command line option
Diffstat (limited to 'progs/demos/multiarb.c')
-rw-r--r-- | progs/demos/multiarb.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/progs/demos/multiarb.c b/progs/demos/multiarb.c index 267fbe95e30..831842a7382 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 ); |