Added Vertexcount to GeometryBinding and made Indexbuffer optional

This commit is contained in:
Simon Lübeß
2021-08-25 22:39:11 +02:00
parent a8bef51834
commit 099763e1e3
3 changed files with 19 additions and 4 deletions
@@ -32,10 +32,13 @@ namespace GlitchyEngine.Renderer
{
_context.nativeContext.ClearDepthStencilView(target.nativeView, (.)clearFlags, depthValue, stencilValue);
}
public override void DrawIndexed(GeometryBinding geometry)
{
_context.DrawIndexed(geometry.IndexCount, geometry.IndexByteOffset, 0);
if(geometry.IsIndexed)
_context.DrawIndexed(geometry.IndexCount, geometry.IndexByteOffset, 0);
else
_context.Draw(geometry.VertexCount, 0);
}
public override void DrawIndexedInstanced(GeometryBinding geometry)