From: Robert P. <r...@al...> - 2007-10-23 00:06:54
|
I'm in accord with Mr. Baker on this one. If you want to debug your code without a zillion #ifdefs, you can create a stub freeglut library and link against it. It's a one-line change to swap in the real library. - Rob On 22 Oct 2007, at 19:13, Steve Baker wrote: > Fay John F Dr CTR USAF 46 SK wrote: >> Folks, >> >> What do people think of moving the check for initialization into >> a "#ifdef DEBUG" block where a call to an uninitialized "freeglut" >> will >> not cause a crash? >> > I think it's a terrible idea. The whole of freeglut presumes you've > called glutInit > as you are supposed to. Without that, VERY BAD THINGS will happen and > it's important the user knows about it. > > It's better the program exit cleanly with an unambiguous error > message than > try to carry on and thereby exhibit hard-to-diagnose problems later > on. > > Steve |