Fix for high resolutions

I was running your fork of BB under OS X 10.10 in fullscreen at 2880x1800 and found that the demo crashed just before rendering the torus. My branch contains a fix for this issue that should allow for arbitrarily high resolutions.