Bullet has partial support for glutLeaveMainLoop() via BT_USE_FREEGLUT, but
this is also available on OS X, although with slightly different syntax
(glutCheckLoop()). This patch unifies the two approaches for better
portability, using an exception fallback if neither is available.
This is an improved version of that presented in issue 540, I've tested it
under Linux with and without BT_USE_FREEGLUT, and everything is happy now.
(sorry, there was a build issue under non-freeglut in the old patch)
This is useful for detecting memory leaks and generally testing proper object
destruction under OS X (previously only available with freeglut enabled), as
well as providing an easy way to algorithmically re-run demos.
The introduction of DemoApplication::main(int,char**) is necessary as it
replaces the 'hardcoded' glutMainLoop() call from GlutStuff.cpp, but it
provides a convenient way for demos to get access to command line parameters
after freeglut has removed any glut specific arguments, and after the demo has
been constructed/initialized.
Original issue reported on code.google.com by ejtt...@gmail.com on 14 Sep 2011 at 5:02
Original issue reported on code.google.com by
ejtt...@gmail.com
on 14 Sep 2011 at 5:02Attachments: