New constructor of viewport.

[MOD] Modify the constructor of viewport.