Original Post
I´m reading Tricks of the Windows Game Programming Gurus and I´ve got a little problem with the Cohen-Sutherland Algorithm implementation. There´s a section of the code I don´t get:
// try and trivially reject
if((p1_code&p2_code))
return(0);
I tested the algorithm on paper tracing the values of the variables and, altough I think that I´m doing that correctly when I get to that part of the code I have to return to the caller function. It´s weird because the demo works ok. By the way, what method do you use to debug DirectX application, because in VC++ there´s a Run To Cursor option but each time I try to use it for a DirectX game my system crashes. Thanks in advance!