WinForms and the big red ‘X’ of doom

You are making a WinForms app. All is going well, until one day your custom control disappears. In its place you just see a big red cross: What gives? Let us back up to remind ourselves how exceptions work: If your code does something wrong (such as dereferencing a null object or passing invalid parameters…


Compressed vertex data

Compressed data is a great thing, especially when the GPU hardware is able to decompress it for free while rendering. But what exactly does vertex data compression mean, and how do we enable it? XNA defaults to 32 bit floating point for most vertex data. For instance the VertexPositionNormalTexture struct is 32 bytes in size,…


Compressed GPU data formats

Consider the flow of data through a typical game: Customer downloads game from Marketplace Game data is stored in the filesystem Game loads the data Data is stored in memory CPU or GPU fetches data from memory CPU or GPU does awesome cool stuff with the data Making the data smaller has benefits at every…


StitchUp: generating shaders from HLSL fragments

Back in 2004 I wrote an article for a book called ShaderX3 about how to tackle the shader permutation problem by automatically generating shaders from combinations of smaller code fragments. Now Tim has created an XNA 4.0 implementation of this same idea.  Sweet!  (not to mention very flattering for me personally 🙂


Teaching myself not to procrastinate

I have a theory that agonizing over difficult decisions is always a waste of time. To decide between two or more options, we must predict how good an outcome each choice will produce. Decisions are only difficult when this is an approximate estimate, because if we knew for sure, we’d just pick the option with…


Procrastinating perfectionism

I find it fascinating to watch how different programmers tackle problems in different ways. Some like to think things through until they fully understand the optimal solution, then code it up in one quick burst. Others prefer to get something up and running as fast as possible, then iterate to gradually improve their algorithms and…


PDC talks available for download

PDC talks are now available to download in WMV or MP4 format, as well as for online streaming. Mine is here: