R3AppCreate

FUNCTION:

R3AppCreate

TEMPLATE:

R3APP *R3AppCreate(int *argc, char ***argv, ...);

PARAMETERS:

argc, argv - parameters to main().

RETURN VALUE:

Application handle.

DESCRIPTION:

Initialize Real 3D application. The following tags can be passed to the function:

R3AA_AutoConfig

If TRUE, AutoConfig feature is activated and all libraries in the autoconfig directory are automatically installed. If FALSE, autoconfig feature is disabled no the application cannot be expanded dynamically.

R3AA_ErrorHook

Address of 'error hook' function. This function is used for reporting possible errors. If not given, R3Error() is used as default. Function must be of form: int (*)(char format, ...);

R3AA_Gui

If TRUE graphical windowed application is created. An asyncronous thread is created for running GUI. If FALSE, 'command line' application is resulted.

R3AA_OptionDesc

Tags for automatic argument parsing.

R3AA_NumOptions

Tags for automatic argument parsing.

R3AA_OptionsAddr

Tags for automatic argument parsing.

EXAMPLE:
 typedef struct myoptions = {
 char *color;
 char *startupfile;
 }MYOPTIONS;

 MYOPTIONS option_values;

 R3OPTIONDESC myoptions[] = {
 {"-ccol", "Color", "Startup", R3OPT_SEPARG, R3OPT_STRING, "grey", NULL,
 offsetof(MYOPTIONS, color)},
 {"-file", "file", "Startup", R3OPT_SEPARG, R3OPT_STRING, "startup", NULL,
 offsetof(MYOPTIONS, startupfile)},
 };

 app = R3AppCreate(&argc, &argv,
 R3AA_OptionDesc, myoptions,
 R3AA_NumOptions, R3NumArrayElements(myoptions),
 R3AA_OptionsAddr,&option_values,
 R3TAG_END);