Began trying to fix primitive batch. Added a default camera to the configuration.

This commit is contained in:
2019-01-30 07:46:58 -06:00
parent 8387cbc604
commit e1e2bbb3d7
13 changed files with 68 additions and 40 deletions

View File

@@ -69,7 +69,7 @@ namespace RecrownedAthenaeum.SpecialTypes
/// <returns>The texture from the region.</returns>
public Texture2D ObtainRegionAsTexture(string name, GraphicsDevice graphicsDevice = null)
{
if (graphicsDevice == null) graphicsDevice = Configuration.graphicsDeviceManager.GraphicsDevice;
if (graphicsDevice == null) graphicsDevice = Configuration.GraphicsDeviceManager.GraphicsDevice;
return dictionaryOfRegions[name].AsTexture2D(graphicsDevice);
}
@@ -194,7 +194,7 @@ namespace RecrownedAthenaeum.SpecialTypes
if (regionTexture == null)
{
Color[] data = new Color[sourceRectangle.Width * sourceRectangle.Height];
if (graphicsDevice == null) graphicsDevice = Configuration.graphicsDeviceManager.GraphicsDevice;
if (graphicsDevice == null) graphicsDevice = Configuration.GraphicsDeviceManager.GraphicsDevice;
regionTexture = new Texture2D(graphicsDevice, sourceRectangle.Width, sourceRectangle.Height);
atlasTexture.GetData(0, sourceRectangle, data, 0, sourceRectangle.Width * sourceRectangle.Height);
regionTexture.SetData(data);