These days I want to rewritten my codes into several .h and .cpp files.
I think some common nodepaths, such as camera, window->get_render()… are used frequently and thus I want to state them as global variables so that they can be passed to different class and functions conveniently.
However, I found that the function open_framework needs two parameters (int argc, char *argv), which prevent me to initialize my framework and window unless in the main function. (I only know how to get the two parameters in main function).
so how can I initialize my framework out of the main function ? or it is necessary and must be finished in the main function?
Thanks in advance.