WIP CrashReporter, misc refactoring
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user