Is it possible to start a Cinder App without CINDER_APP macro


The CINDER_APP is nice for launching simple programs but I would like to start my apps from my own main function.

Is there an easy way to replace the CINDER_APP macro to launch a Cinder app class from my own function? All documentation and tutorials use the CINDER_APP macro.

Ideally, I’d like to decuple a number of my Cinder apps into a single shared library (statically linked with libcinder) and expose the symbols so that I can launch them as part of another application such as a menu.


You can replace the CINDER_APP macro with its platform-specific equivalent; for example here’s the Mac’s:

Not having a ci::app:App at all is a subtler problem. It’s possible, but you have to have some knowledge of what relies on it under the hood. As an example, loading assets. However Cinder can definitely be used directly as a library.

EDIT: Rich Eakin reminded me you actually can load assets without an instance of App; it relies on Platform under the hood, so you could use that directly. But a call like say, getElapsedSeconds() would require an App instance.