Is it possible to not use the default App class?

Hello everyone, I am quite new to Cinder, and will be using it for a new Open Source project.

The problem I have is that the default Cinder app class is not flexible enough for what I need to use it for. Is there a way to use the Cinder library, but not use the default App class?

Thanks for your help in advance,

TMcSquared

I could really use some help with this because we need to start programming the graphics.

Sorry for sounding impatient, but I do need this information as quickly as possible.

I’m not an expert but it would be more helpful to phrase your question more specifically. What do you mean without the default App class? Consider describe what you are trying to achieve?

If you mean you want a WinMain function, as well as cinder, then you can do what I have done before which is to unroll the CINDER_APP macro and then add your code. This is probably shunned upon though :slight_smile:

Eg. Instead of:

CINDER_APP(…etc…)

Do:

int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
	---extra code----

	cinder::app::RendererRef renderer(new RendererGl());
	cinder::app::AppMsw::main<imageApp>(renderer, "imageApp", &imageApp::prepareSettings);
	return 0;
}

But you still have an App class and it doesn’t buy you too much.

I want to use the Cinder functionality, but control the rendering, setup, and updating loops myself. Unrolling the CINDER_APP() does not get rid of the App class, unfortunately.

Could you explain what Cinder’s App class is missing that makes you feel it’s not flexible enough?

Could it be that you’re trying to stick to doing things the way you’re used to? I remember coming from Flash, taking my first steps in Cinder and I became very frustrated with it because I was still thinking the Flash-way. It simply took a while to learn how Cinder is structured. Once I adopted the Cinder-way, the ride became smoother and my code became so much cleaner.

In any case: some parts of Cinder do not depend on the App classes at all and can be used directly. Just link to Cinder’s lib, include the headers and tinker away.

-Paul

thanks for the comment Paul, and yes I did realize that I would have to shift my train of thought that I’m used to, however, it’s not all that bad now that I’m open to other ways of doing things.

Thanks again,

Tre’