From: Andrew G. <and...@gm...> - 2008-08-27 15:18:35
|
A note about unit testing: If you are going to provide error behavior (in this case 'assert()') you should provide test cases that verify correct error behavior ("test all code paths"). pudman On Wed, Aug 27, 2008 at 11:14 AM, Henri Häkkinen <hen...@gm...> wrote: > Yes. I think this is a good point. We do an assert check in debug version, > but otherwise continue. I vote for this. > > On Tue, Aug 26, 2008 at 11:36 PM, Orhun Birsoy <orh...@gm...>wrote: > >> I'll ask a question from a completely different view. Note that I am not >> excatly proposing this, I am just mentioning it so that we can discuss... >> >> Do we need to check for a tolerance? In debug, we can do whatever we want >> (i.e. assert etc) but for release I don't believe we have to check anything. >> Just continue the calculations as if nothing happened. >> >> What happens when you load a singular matrix to OpenGL with >> glLoadMatrix(or glMultMatrix)? Spec mentions singular matrices several times >> and it basically says the results are undefined. >> >> From OpenGL Spec 3.0 page 58 >> If the GL implementation determines that the modelview >> matrix is uninvertible, then the entries in the inverted matrix are >> arbitrary. In >> any case, neither normal transformation nor use of the transformed normal >> may >> lead to GL interruption or termination. >> >> Why should glmMatInverse be any different? Such low level functions should >> not have such checks (or such behaviours defined). Higher level code should >> check whether the matrices they generate are well conditioned. >> >> <semiserious> >> We can always provide "safe" versions, which will have more defined >> behaviours. glmMatInverse4f_s anyone? >> </semiserious> >> >> -- >> Orhun Birsoy >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Glsdk-devel mailing list >> Gls...@li... >> https://lists.sourceforge.net/lists/listinfo/glsdk-devel >> >> > > > -- > Henri 'henux' Häkkinen > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Glsdk-devel mailing list > Gls...@li... > https://lists.sourceforge.net/lists/listinfo/glsdk-devel > > |