View Full Version : Command-line arguments and glutDisplayFunc

02-01-2004, 02:34 PM
I am writing a 'simple' program that uses command line arguments as parameters to draw various shapes in my program.

Consequently, different pictures will be drawn according to the command line arguments the user enters.

I am asking, is there a way to send arguments to the function you have registered with glutDisplayFunc? I have tried to do this but it will not compile.

Thanks for any help.

02-01-2004, 03:01 PM
Simplest thing to do, chuck the arguments into a global field and access them from the display callback. Nice and easy!

02-01-2004, 04:22 PM
When you say command line arguments, do you mean like dos line.

MyGLprogram.exe -D cube

or like have a command line that the user can type on while the program is running to add an object?