Arena.ArenaModel.OnSetViewport C# (CSharp) Method

OnSetViewport() public method

public OnSetViewport ( int width, int height ) : void
width int
height int
return void
        public override void OnSetViewport(int width, int height)
        {
            // Prevent a divide by zero, when window is too short
            // (you cant make a window of zero width).
            if (height == 0)
                height = 1;

            GI.Viewport(0, 0, width, height);

            fAspect = (float)width / (float)height;
        }