CINDER_APP
Main application macro.
Description
This macro wraps the native main()
function for the currently running platform.
For example, this is the macro for Linux.
#define CINDER_APP_LINUX( APP, RENDERER, ... ) \
int main( int argc, char* argv[] ) \
{ \
cinder::app::RendererRef renderer( new RENDERER ); \
cinder::app::AppLinux::main( renderer, #APP, argc, argv, ##__VA_ARGS__ ); \
return 0; \
}
The decision about which macro to use is located in App.h
Examples
Macro is at the bottom.
#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
using namespace ci;
using namespace ci::app;
class MyApp : public App {
public:
void setup() override;
void draw() override;
};
void MyApp::setup()
{
gl::enableDepthWrite();
gl::enableDepthRead();
}
void MyApp::draw()
{
gl::clear(Color::gray(0.2));
}
CINDER_APP(MyApp, RendererGl)