Reworked RenderTarget2D and corresponding API

This commit is contained in:
Simon Lübeß
2021-09-21 16:30:34 +02:00
parent 8e39d7988b
commit 229d2b578e
11 changed files with 178 additions and 36 deletions
+8 -5
View File
@@ -9,7 +9,7 @@ namespace GlitchyEngine.Renderer
Depth = 1,
Stencil = 2
}
public static class RenderCommand
{
private static RendererAPI _rendererAPI;
@@ -31,12 +31,15 @@ namespace GlitchyEngine.Renderer
{
_rendererAPI.Clear(renderTarget, color);
}
[Inline]
public static void Clear(DepthStencilTarget target, float depthValue, uint8 stencilValue, DepthStencilClearFlag clearFlags)
public static void Clear(DepthStencilTarget depthTarget, float depthValue, uint8 stencilValue, DepthStencilClearFlag clearFlags)
{
_rendererAPI.Clear(target, depthValue, stencilValue, clearFlags);
_rendererAPI.Clear(depthTarget, depthValue, stencilValue, clearFlags);
}
public static void Clear(RenderTarget2D renderTarget, float depthValue, uint8 stencilValue, DepthStencilClearFlag clearFlags)
{
_rendererAPI.Clear(renderTarget, depthValue, stencilValue, clearFlags);
}
[Inline]