mono/MonoGame — pull request #819 by RayBatts (2012-09-28 20:18:33+00:00)
Title: Ray-Plane intersect/WinRT ScreenSizeChange viewport fix

Two fixes in this:

1) In XNA, when the OnClientSizeChanged() has been called, the GraphicsDevice.Viewport field has been updated to the new bounds of the screen. It wasn't in MonoGame, so we need to set the viewport before triggering the callback. I know that the applychanges() below the code I've entered sets the viewport, but it needs to be done earlier so that clients can have access to the new viewport bounds as the callback happens. This change fixes that.

2) Ray.Intersect(Plane) wasn't implemented correctly. It didn't account for the offset of the plane, so any Ray.Intersect(plane) test was against the 0 plane.