I am reading chapter 10 of book (realtime collision detection by Christer Ericson). The GPU collision chapter first gives Convex collision detection code snippet. I implemented it in OpenGL as given in Table 10.1 and it works as advertised. I then followed suit with the concave collision detection based on the information given on page 422 in Table 10.2. But since the information about hardware occlusion query is not detailed enough, I could not get it to work. So far I have implemented it as follows.
Code: Select all
...check the reply below
Please don't suggest me to look out for alternative solutions (I know there are better solutions) rather than trying this. I am really surprised at why the book does not include workable demos. It only contains code snippets which one can easily copy from the book.
Thanks,
Mobeen