Bring XNA compatibility to ToString
Just a few optimizations.
Merge pull request #1998 from Shqrdx/ViewportFix

Viewport fixes.