Add debug flag to dirty box draw
Added some more viewport functions