Began trying to fix primitive batch. Added a default camera to the configuration.
This commit is contained in:
@@ -24,7 +24,7 @@ namespace RecrownedAthenaeum.Camera
|
||||
/// </summary>
|
||||
public Matrix Matrix { get; private set; }
|
||||
|
||||
private GraphicsDevice graphicsDevice = Configuration.graphicsDeviceManager.GraphicsDevice;
|
||||
private GraphicsDevice graphicsDevice;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs 2D camera.
|
||||
@@ -32,8 +32,7 @@ namespace RecrownedAthenaeum.Camera
|
||||
/// <param name="graphicsDevice">The graphics device to use. Will use graphics device from <see cref="Configuration"/>'s graphics device manager if this is null which it is by default.</param>
|
||||
public Camera2D(GraphicsDevice graphicsDevice = null)
|
||||
{
|
||||
if (graphicsDevice != null) this.graphicsDevice = graphicsDevice;
|
||||
if (this.graphicsDevice == null) throw new ArgumentNullException("Graphics device can't be null in setup and argument. One must not be null for use.");
|
||||
this.graphicsDevice = graphicsDevice ?? (Configuration.GraphicsDeviceManager.GraphicsDevice);
|
||||
|
||||
Zoom = 1f;
|
||||
Position.X = this.graphicsDevice.Viewport.Width * 0.5f;
|
||||
|
Reference in New Issue
Block a user