move 'main' functions into a separate folder, to make it easier to create standalone demos (console app without gui, or opengl app, and possibly even other versions, like a software renderer, producing pictures in the cloud)
Add a line in an example cpp file to allow a standalone version. See examples/BasicExample.cpp: B3_STANDALONE_EXAMPLE(BasicExampleCreateFunc)
This commit is contained in:
@@ -48,6 +48,17 @@ public:
|
||||
|
||||
};
|
||||
|
||||
CommonExampleInterface* StandaloneExampleCreateFunc(CommonExampleOptions& options);
|
||||
|
||||
#ifdef B3_USE_STANDALONE_EXAMPLE
|
||||
#define B3_STANDALONE_EXAMPLE(ExampleFunc) CommonExampleInterface* StandaloneExampleCreateFunc(CommonExampleOptions& options)\
|
||||
{\
|
||||
return ExampleFunc(options);\
|
||||
}
|
||||
#else//B3_USE_STANDALONE_EXAMPLE
|
||||
#define B3_STANDALONE_EXAMPLE(ExampleFunc)
|
||||
#endif //B3_USE_STANDALONE_EXAMPLE
|
||||
|
||||
|
||||
|
||||
#endif //COMMON_EXAMPLE_INTERFACE_H
|
||||
|
||||
Reference in New Issue
Block a user