Camera now uses correct graphics device reference.
This commit is contained in:
parent
5ba5506b58
commit
751bdd72e8
@ -18,7 +18,8 @@ namespace RecrownedAthenaeum.Camera
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// A 2D camera from the generic <see cref="Camera3D"/>.
|
/// A 2D camera from the generic <see cref="Camera3D"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Camera2D() : base()
|
/// <param name="graphicsDevice">The graphics device to use if not using the one in <see cref="Configuration"/>.</param>
|
||||||
|
public Camera2D(GraphicsDevice graphicsDevice = null) : base(graphicsDevice)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ namespace RecrownedAthenaeum.Camera
|
|||||||
lookAt = Vector3.Forward;
|
lookAt = Vector3.Forward;
|
||||||
upDirection = Vector3.Up;
|
upDirection = Vector3.Up;
|
||||||
Center();
|
Center();
|
||||||
projectionMatrix = Matrix.CreateOrthographic(graphicsDevice.Viewport.Width, graphicsDevice.Viewport.Height, 0, 1);
|
projectionMatrix = Matrix.CreateOrthographic(this.graphicsDevice.Viewport.Width, this.graphicsDevice.Viewport.Height, 0, 1);
|
||||||
Apply();
|
Apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user