BREAKING CHANGE: 4x4 matrices are now column major
This commit is contained in:
@@ -45,18 +45,10 @@ public class MonoGameTriangleBatch : Behaviour, ITriangleBatch, IFirstFrameUpdat
|
||||
|
||||
public void Begin(Matrix4x4? view = null, Matrix4x4? projection = null)
|
||||
{
|
||||
if (view != null)
|
||||
this.view = view.Value.ToXnaMatrix();
|
||||
else
|
||||
this.view = Matrix.Identity;
|
||||
Viewport viewport = graphicsDevice.Viewport;
|
||||
|
||||
if (projection != null)
|
||||
this.projection = projection.Value.ToXnaMatrix();
|
||||
else
|
||||
{
|
||||
Viewport viewport = graphicsDevice.Viewport;
|
||||
this.projection = Matrix.CreateOrthographicOffCenter(viewport.X, viewport.Width, viewport.Height, viewport.Y, 0, 1);
|
||||
}
|
||||
this.view = (view ?? Matrix4x4.Identity).Transposed.ToXnaMatrix();
|
||||
this.projection = (projection ?? Matrix4x4.CreateOrthographicViewCentered(viewport.Width, viewport.Height)).Transposed.ToXnaMatrix();
|
||||
}
|
||||
|
||||
public void End() => Flush();
|
||||
|
||||
Reference in New Issue
Block a user