From 751bdd72e88ca1ff143a6266a121ac08c0c45054 Mon Sep 17 00:00:00 2001 From: Recrown Date: Thu, 7 Feb 2019 23:44:39 -0600 Subject: [PATCH] Camera now uses correct graphics device reference. --- RecrownedAthenaeum/Camera/Camera2D.cs | 3 ++- RecrownedAthenaeum/Camera/Camera3D.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RecrownedAthenaeum/Camera/Camera2D.cs b/RecrownedAthenaeum/Camera/Camera2D.cs index 12c2329..f5d93ef 100644 --- a/RecrownedAthenaeum/Camera/Camera2D.cs +++ b/RecrownedAthenaeum/Camera/Camera2D.cs @@ -18,7 +18,8 @@ namespace RecrownedAthenaeum.Camera /// /// A 2D camera from the generic . /// - public Camera2D() : base() + /// The graphics device to use if not using the one in . + public Camera2D(GraphicsDevice graphicsDevice = null) : base(graphicsDevice) { } diff --git a/RecrownedAthenaeum/Camera/Camera3D.cs b/RecrownedAthenaeum/Camera/Camera3D.cs index 4a3f615..b2d8f96 100644 --- a/RecrownedAthenaeum/Camera/Camera3D.cs +++ b/RecrownedAthenaeum/Camera/Camera3D.cs @@ -65,7 +65,7 @@ namespace RecrownedAthenaeum.Camera lookAt = Vector3.Forward; upDirection = Vector3.Up; 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(); }