Allow render targets to not clear (#3457)

This commit is contained in:
metalgearsloth
2022-11-11 09:33:18 +11:00
committed by GitHub
parent 81cd43f988
commit ca9ce7c7ed
3 changed files with 5 additions and 5 deletions

View File

@@ -114,7 +114,7 @@ namespace Robust.Client.Graphics.Clyde
return clydeTexture;
}
public void RenderInRenderTarget(IRenderTarget target, Action a, Color clearColor=default)
public void RenderInRenderTarget(IRenderTarget target, Action a, Color? clearColor)
{
_clyde.RenderInRenderTarget((RenderTargetBase) target, a, clearColor);
}
@@ -274,7 +274,7 @@ namespace Robust.Client.Graphics.Clyde
_renderHandle.DrawLine(@from, to, color * Modulate);
}
public override void RenderInRenderTarget(IRenderTarget target, Action a, Color clearColor = default)
public override void RenderInRenderTarget(IRenderTarget target, Action a, Color? clearColor)
{
_renderHandle.RenderInRenderTarget(target, a, clearColor);
}
@@ -368,7 +368,7 @@ namespace Robust.Client.Graphics.Clyde
_renderHandle.DrawLine(@from, to, color * Modulate);
}
public override void RenderInRenderTarget(IRenderTarget target, Action a, Color clearColor = default)
public override void RenderInRenderTarget(IRenderTarget target, Action a, Color? clearColor)
{
_renderHandle.RenderInRenderTarget(target, a, clearColor);
}

View File

@@ -183,7 +183,7 @@ namespace Robust.Client.Graphics
public abstract void DrawLine(Vector2 from, Vector2 to, Color color);
public abstract void RenderInRenderTarget(IRenderTarget target, Action a, Color clearColor=default);
public abstract void RenderInRenderTarget(IRenderTarget target, Action a, Color? clearColor);
}
/// <summary>

View File

@@ -9,7 +9,7 @@ namespace Robust.Client.Graphics
DrawingHandleScreen DrawingHandleScreen { get; }
DrawingHandleWorld DrawingHandleWorld { get; }
void RenderInRenderTarget(IRenderTarget target, Action a, Color clearColor=default);
void RenderInRenderTarget(IRenderTarget target, Action a, Color? clearColor);
void SetScissor(UIBox2i? scissorBox);
void DrawEntity(EntityUid entity, Vector2 position, Vector2 scale, Direction? overrideDirection);