@hrydgard I don't think std::max() here is right, would never need to render to a surface larger than 512 right?

-[Unknown]