void myIdleFunc()
{
...
if (should_we_exit)
{
throw "MY_EXIT_MESSAGE";
}
}
int main()
{
try
{
...
glutMainLoop();
}
catch (const char* msg)
{
...
}
cleanup();
printf("program terminated\n");
return EXIT_SUCCESS;
}
AxoDosS
Member Since 18 Apr 2002Offline Last Active Jul 29 2012 10:26 AM

Find content
Male