Added Camera, Renderer, ... and moved example to sandbox

This commit is contained in:
Simon Lübeß
2021-01-09 12:05:05 +01:00
parent 2159f8087a
commit 4054a9b0c2
12 changed files with 670 additions and 167 deletions
@@ -0,0 +1,27 @@
using GlitchyEngine.Math;
namespace GlitchyEngine.Renderer
{
extension RendererAPI
{
private GraphicsContext _context;
public GraphicsContext Context
{
get => _context;
set => _context = value;
}
public static override API Api => .D3D11;
public override void Clear(RenderTarget renderTarget, ColorRGBA clearColor)
{
_context.ClearRenderTarget(renderTarget, clearColor);
}
public override void DrawIndexed(GeometryBinding geometry)
{
_context.DrawIndexed(geometry.IndexCount, geometry.IndexByteOffset, 0);
}
}
}