WIP CrashReporter, misc refactoring

This commit is contained in:
Regalis
2015-09-19 15:14:47 +03:00
parent 16bf562837
commit f6966f06c3
86 changed files with 1616 additions and 631 deletions
+3 -3
View File
@@ -37,12 +37,12 @@ namespace Subsurface.Lights
{
if (shadowEffect == null)
{
shadowEffect = new BasicEffect(Game1.CurrGraphicsDevice);
shadowEffect = new BasicEffect(GameMain.CurrGraphicsDevice);
shadowEffect.VertexColorEnabled = true;
}
if (penumbraEffect == null)
{
penumbraEffect = new BasicEffect(Game1.CurrGraphicsDevice);
penumbraEffect = new BasicEffect(GameMain.CurrGraphicsDevice);
penumbraEffect.TextureEnabled = true;
//shadowEffect.VertexColorEnabled = true;
penumbraEffect.LightingEnabled = false;
@@ -225,7 +225,7 @@ namespace Subsurface.Lights
}
shadowEffect.World = cam.ShaderTransform
* Matrix.CreateOrthographic(Game1.GraphicsWidth, Game1.GraphicsHeight, -1, 1) * 0.5f;
* Matrix.CreateOrthographic(GameMain.GraphicsWidth, GameMain.GraphicsHeight, -1, 1) * 0.5f;
shadowEffect.CurrentTechnique.Passes[0].Apply();
graphicsDevice.DrawUserPrimitives<VertexPositionColor>(PrimitiveType.TriangleStrip, shadowVertices, 0, shadowVertexCount * 2 - 2);
+1 -1
View File
@@ -34,7 +34,7 @@ namespace Subsurface.Lights
var pp = graphics.PresentationParameters;
lightMap = new RenderTarget2D(graphics, Game1.GraphicsWidth, Game1.GraphicsHeight, false,
lightMap = new RenderTarget2D(graphics, GameMain.GraphicsWidth, GameMain.GraphicsHeight, false,
pp.BackBufferFormat, pp.DepthStencilFormat, pp.MultiSampleCount,
RenderTargetUsage.DiscardContents);
+2 -2
View File
@@ -47,7 +47,7 @@ namespace Subsurface.Lights
texture = lightTexture;
Game1.LightManager.AddLight(this);
GameMain.LightManager.AddLight(this);
}
public void Draw(SpriteBatch spriteBatch)
@@ -59,7 +59,7 @@ namespace Subsurface.Lights
public void Remove()
{
Game1.LightManager.RemoveLight(this);
GameMain.LightManager.RemoveLight(this);
}
}
}