Skip to content

Instantly share code, notes, and snippets.

@sortofsleepy
Created January 11, 2020 16:57
Show Gist options
  • Save sortofsleepy/fccb02cc9c2140ad0e273a410e6b52dd to your computer and use it in GitHub Desktop.
Save sortofsleepy/fccb02cc9c2140ad0e273a410e6b52dd to your computer and use it in GitHub Desktop.
How to initialize Cinder from main function instead of macro
int __stdcall WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int /*nCmdShow*/)\
{
HMODULE livepp = lpp::lppLoadAndRegister(L"../../../LivePP","project");
lpp::lppEnableAllCallingModulesSync(livepp);
lpp::lppInstallExceptionHandler(livepp);
cinder::app::RendererRef renderer(new ci::app::RendererGl);
ci::app::AppMsw::main<SphereManipulatorApp>(renderer, "Sphere App", [](App::Settings * settings) {
settings->setWindowSize(1280, 720);
settings->setMultiTouchEnabled(false);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment