Shawn Hargreaves Blog Once upon a time there lived a young
graphics coder named Johnny. One day Johnny wrote a program that
displayed a 3D model. As is frequently the case with people his
age, Johnny was somewhat careless and did not bother to set all
the renderstates which an older or wiser programmer would
undoubtedly have taken care of, but luckily for him these states
had sensible defaults, so his omission did not cause any
problems. The model was shiny. All was well with the world. The
next morning Johnny decided to add a framerate counter, so he
inserted a simple call to SpriteBatch.DrawString. Woe! The
framerate showed up ok, but the model no longer rendered
correctly. Disaster! Johnny has been bitten by the dreaded state
management monster. Keeping track of which states are set when,
and by who, is not particularly glamorous, but this is an
important part of creating a robust 3D program. If you get it
wrong, your graphics will display incorrectly. If you get it
right but change states too often, your