Friday, August 21, 2009

Visual Studio Watch Window Tip #1

A very usefull debugging tip that I use a lot is the ability to watch dynamically allocated arrays. Look at the code above. An array is allocated dynamically and the debugger most often can't display the content of the array in the "watch window" since it often can't determine the size of the array. The array in the watch window will look like this:

The debugger shows only the first entry in the array. Usually when you want to watch a dynamically allocated array you "kind of" know it's size. In the above example I know the size of the array is 10. I can simply tell Visual Studio how many elements to display to get a proper view of the content of the array like this:

All you do is add the size of the array after the variable name, separated by a comma ",". Now you can watch the contents of any array.

Saturday, August 8, 2009

id Tech 5 Challenges

Course notes from SIGGRAPH 2009: Beyond Programmable Shading are available. I enjoyed reading the slides from J.M.P. van Waveren, id software. He writes a bit about the virtual texturing in Id Tech 5 and also about their approach to distribute the engine over multiple cores. He does not describe anyting in great detail. It's more like a coarse overview with some nice screenshots.