Began trying to fix primitive batch. Added a default camera to the configuration.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user