RenderAPI changes and removed Context parameter from Effect and Material

This commit is contained in:
Simon Lübeß
2022-11-27 17:18:16 +01:00
parent d47ac23e1b
commit dffd43a36f
14 changed files with 89 additions and 52 deletions
+4 -2
View File
@@ -568,7 +568,8 @@ namespace GlitchyEngine.Renderer
s_quadInstanceBuffer.SetData<BatchVertex>(s_rawQuadInstances.Ptr, s_setInstances, 0, .WriteDiscard);
s_currentEffect.Bind(Renderer._context);
s_currentEffect.ApplyChanges();
s_currentEffect.Bind();
s_quadBatchBinding.InstanceCount = s_setInstances;
s_quadBatchBinding.Bind();
RenderCommand.DrawIndexedInstanced(s_quadBatchBinding);
@@ -587,7 +588,8 @@ namespace GlitchyEngine.Renderer
s_circleInstanceBuffer.SetData<CircleBatchVertex>(s_rawCircleInstances.Ptr, s_setInstances, 0, .WriteDiscard);
s_currentCircleEffect.Bind(Renderer._context);
s_currentCircleEffect.ApplyChanges();
s_currentCircleEffect.Bind();
s_circleBatchBinding.InstanceCount = s_setInstances;
s_circleBatchBinding.Bind();
RenderCommand.DrawIndexedInstanced(s_circleBatchBinding);