All Realsoft 3D Applications create one application object, which define application specific properties.
To create an application object, call:
#include <oops/r3app.h> main(int argc, char **argv) { R3APP *app; app = R3AppCreate(&arg, &argv, R3AA_Company, "Realsoft", R3AA_AppIdentifier, "Realsoft3D", R3AA_AppName, "ShowImg", R3AA_OptionDesc, r3options, R3AA_NumOptions, R3NumArrayElements(r3options), R3AA_OptionsAddr, &opts, R3AA_Version, version, R3TAG_END); ...
R3AA_AppIdentifier and R3AA_Version determines the name and version of the application. These are use for identifying the program. For example, registry database name is derived from these.
R3AA_AppName just defines the name shown in the main window's title bar.
The OptionDesc, NumOptions and OptionsAddr specify startup options for the program.
For example, you may start Realsoft3D as follows:
myapp -lang English -frame 10 - play
The startup options must be defined as follows:
typedef struct myoptions { char *language; int frame; int play; } MYOPTIONS; static MYOPTIONS opts; static R3OPTIONDESC myoptions[] = { {"-lang", "language", "Language", R3OPT_SEPARG, R3OPT_STRING, "None", NULL, offsetof(MYOPTIONS, language)}, {"-frame", "frame", "Frame", R3OPT_SEPARG, R3OPT_INT, (void*)-1, NULL, offsetof(MYOPTIONS, frame)}, {"-play", "play", "Play", R3OPT_NOARG, R3OPT_INT, 0, "1", offsetof(MYOPTIONS, play)}, };