-/* $Id: multiarb.c,v 1.2 1999/10/13 12:02:13 brianp Exp $ */
+/* $Id: multiarb.c,v 1.5 2000/02/02 17:31:45 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.5 2000/02/02 17:31:45 brianp
+ * changed > to >=
+ *
+ * Revision 1.4 2000/02/02 01:07:21 brianp
+ * limit Drift to [0, 1]
+ *
+ * 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
*
{
if (Animate) {
Drift += 0.05;
+ if (Drift >= 1.0)
+ Drift = 0.0;
#ifdef GL_ARB_multitexture
glActiveTextureARB(GL_TEXTURE0_ARB);
}
-static void Init( void )
+static void Init( int argc, char *argv[] )
{
GLuint texObj[2];
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));
+ }
}
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
- Init();
+ Init( argc, argv );
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );