Parsing command-line arguments

Command-line arguments to the main function define different parameters for user applications. The main function declaration always looks like this:

int main( int argc, char** argv );

The argc and argv arguments form a string array containing the application name and other necessary arguments. OSG provides a fast and safe osg::ArgumentParser to read and make use of them.

Get OpenSceneGraph 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.